Changeset 54771 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Mar 16, 2015 1:13:47 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r54766 r54771 3085 3085 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 3086 3086 3087 /* Set the unpacking parameters. */ 3088 VMSVGAPACKPARAMS SavedParams; 3089 vmsvga3dSetUnpackParams(pState, pContext, pSurface, &SavedParams); 3090 3087 3091 if (pSurface->fDirty) 3088 3092 { 3089 /* Set the unacpking parameters. */3090 VMSVGAPACKPARAMS SavedParams;3091 vmsvga3dSetUnpackParams(pState, pContext, pSurface, &SavedParams);3092 3093 3093 Log(("vmsvga3dCreateTexture: sync dirty texture\n")); 3094 3094 for (uint32_t i = 0; i < pSurface->faces[0].numMipLevels; i++) 3095 3095 { 3096 if (pSurface->pMipmapLevels[i].fDirty) 3096 /* Paranoia: Always do level 0 here to mirror the non-dirty case. */ 3097 if (pSurface->pMipmapLevels[i].fDirty || i == 0) 3097 3098 { 3098 Log(("vmsvga3dCreateTexture: sync dirty texture mipmap level %d (pitch %x)\n", i, pSurface->pMipmapLevels[i].cbSurfacePitch)); 3099 if (pSurface->pMipmapLevels[i].fDirty) 3100 Log(("vmsvga3dCreateTexture: sync dirty texture mipmap level %d (pitch %x)\n", i, pSurface->pMipmapLevels[i].cbSurfacePitch)); 3099 3101 3100 3102 glTexImage2D(GL_TEXTURE_2D, … … 3114 3116 } 3115 3117 pSurface->fDirty = false; 3116 3117 /* Restore packing parameters. */3118 vmsvga3dRestoreUnpackParams(pState, pContext, pSurface, &SavedParams);3119 3118 } 3120 3119 else 3121 3120 { 3122 /* Reserve texture memory. */ 3121 /* Allocate and initialize texture memory. (Passing the zero filled pSurfaceData solves 3122 the fedora 21 corruption issues (launchpad, background, search field, login).) */ 3123 3123 glTexImage2D(GL_TEXTURE_2D, 3124 3124 0, … … 3129 3129 pSurface->formatGL, 3130 3130 pSurface->typeGL, 3131 NULL);3131 pSurface->pMipmapLevels[0].pSurfaceData); 3132 3132 VMSVGA3D_CHECK_LAST_ERROR_WARN(pState, pContext); 3133 3133 } 3134 3135 /* Restore unpacking parameters. */ 3136 vmsvga3dRestoreUnpackParams(pState, pContext, pSurface, &SavedParams); 3134 3137 3135 3138 /* Restore the old active texture. */
Note:
See TracChangeset
for help on using the changeset viewer.