Changeset 54786 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
- Timestamp:
- Mar 16, 2015 2:38:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r54785 r54786 6116 6116 6117 6117 /* Active the right texture unit for subsequent texture state changes. */ 6118 if (pTextureState[i].stage != currentStage) 6119 { 6120 pState->ext.glActiveTexture(GL_TEXTURE0 + pTextureState[i].stage); 6121 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 6122 currentStage = pTextureState[i].stage; 6118 if (pTextureState[i].stage != currentStage || i == 0) 6119 { 6120 /** @todo Is this the appropriate limit for all kinds of textures? It is the 6121 * size of aSidActiveTexture and for binding/unbinding we cannot exceed it. */ 6122 if (pTextureState[i].stage < SVGA3D_MAX_TEXTURE_STAGE) 6123 { 6124 pState->ext.glActiveTexture(GL_TEXTURE0 + pTextureState[i].stage); 6125 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 6126 currentStage = pTextureState[i].stage; 6127 } 6128 else 6129 { 6130 AssertMsgFailed(("pTextureState[%d].stage=%#x name=%#x\n", i, pTextureState[i].stage, pTextureState[i].name)); 6131 continue; 6132 } 6123 6133 } 6124 6134 … … 6162 6172 { 6163 6173 Log(("SVGA3D_TS_BIND_TEXTURE: stage %d, texture surface id=%x replacing=%x\n", 6164 pTextureState[i].stage, pTextureState[i].value, pContext->aSidActiveTexture[currentStage]));6174 currentStage, pTextureState[i].value, pContext->aSidActiveTexture[currentStage])); 6165 6175 6166 6176 pContext->aSidActiveTexture[currentStage] = SVGA3D_INVALID_ID; … … 6182 6192 6183 6193 Log(("SVGA3D_TS_BIND_TEXTURE: stage %d, texture surface id=%x (%d,%d) replacing=%x\n", 6184 pTextureState[i].stage, pTextureState[i].value, pSurface->pMipmapLevels[0].size.width,6194 currentStage, pTextureState[i].value, pSurface->pMipmapLevels[0].size.width, 6185 6195 pSurface->pMipmapLevels[0].size.height, pContext->aSidActiveTexture[currentStage])); 6186 6196 … … 6264 6274 else 6265 6275 val = vmsvga3dTextureFilter2OGL((SVGA3dTextureFilter)minFilter); 6266 6267 6276 break; 6268 6277 }
Note:
See TracChangeset
for help on using the changeset viewer.