儲存庫 vbox 的更動 73238
- 時間撮記:
- 2018-7-19 下午12:36:22 (6 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r73194 r73238 849 849 pState->ext.glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB, 850 850 &pState->caps.maxVertexShaderTemps)); 851 #ifdef DEBUG_sunlover 852 /// @todo Fix properly!!! Some Windows host drivers return 31 for the compatible OGL context (wglCreateContext). 853 if (pState->caps.maxVertexShaderTemps < 32) 854 pState->caps.maxVertexShaderTemps = 32; 855 #endif 851 856 VMSVGA3D_INIT_CHECKED_BOTH(pState, pContext, pOtherCtx, 852 857 pState->ext.glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, … … 1577 1582 break; 1578 1583 1584 case SVGA3D_R8G8B8A8_UNORM: 1585 pSurface->internalFormatGL = GL_RGBA8; 1586 pSurface->formatGL = GL_RGBA; 1587 pSurface->typeGL = GL_UNSIGNED_INT_8_8_8_8_REV; 1588 break; 1589 1579 1590 case SVGA3D_Z_D32: /* D3DFMT_D32 - WINED3DFMT_D32_UNORM */ 1580 1591 pSurface->internalFormatGL = GL_DEPTH_COMPONENT32; … … 1637 1648 break; 1638 1649 1650 case SVGA3D_DXT2: /* D3DFMT_DXT2 */ 1651 AssertMsgFailed(("Test me - SVGA3D_DXT2\n")); 1652 break; 1653 1639 1654 case SVGA3D_DXT3: /* D3DFMT_DXT3 - WINED3DFMT_DXT3 */ 1640 1655 pSurface->internalFormatGL = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; … … 1647 1662 AssertMsgFailed(("Test me - SVGA3D_DXT3\n")); 1648 1663 #endif 1664 break; 1665 1666 case SVGA3D_DXT4: /* D3DFMT_DXT4 */ 1667 AssertMsgFailed(("Test me - SVGA3D_DXT4\n")); 1649 1668 break; 1650 1669 … … 2099 2118 vmsvga3dOglSetUnpackParams(pState, pContext, pSurface, &SavedParams); 2100 2119 2101 /* Set the mipmap base and max level param ters. */2120 /* Set the mipmap base and max level parameters. */ 2102 2121 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); 2103 2122 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 2104 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, pSurface->faces[0].numMipLevels );2123 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, pSurface->faces[0].numMipLevels - 1); 2105 2124 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 2106 2125 … … 5272 5291 5273 5292 case SVGA3D_TS_TEXTURE_LOD_BIAS: /* float */ 5274 glTexParameterf(GL_TEXTURE_2D /** @todo flexible type */, GL_TEXTURE_LOD_BIAS, pTextureState[i]. value); /* Identical; default 0.0 identical too */5293 glTexParameterf(GL_TEXTURE_2D /** @todo flexible type */, GL_TEXTURE_LOD_BIAS, pTextureState[i].floatValue); /* Identical; default 0.0 identical too */ 5275 5294 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 5276 5295 break; 5277 5296 5278 5297 case SVGA3D_TS_TEXTURE_MIPMAP_LEVEL: /* uint32_t */ 5279 textureType = GL_TEXTURE_ BASE_LEVEL;5298 textureType = GL_TEXTURE_MAX_LEVEL; 5280 5299 val = pTextureState[i].value; 5281 5300 break; … … 6459 6478 #endif 6460 6479 6480 #if 0 6481 /* Dump render target to a bitmap. */ 6482 if (pContext->state.aRenderTargets[SVGA3D_RT_COLOR0] != SVGA3D_INVALID_ID) 6483 { 6484 vmsvga3dUpdateHeapBuffersForSurfaces(pThis, pContext->state.aRenderTargets[SVGA3D_RT_COLOR0]); 6485 PVMSVGA3DSURFACE pSurface; 6486 int rc2 = vmsvga3dSurfaceFromSid(pState, pContext->state.aRenderTargets[SVGA3D_RT_COLOR0], &pSurface); 6487 if (RT_SUCCESS(rc2)) 6488 vmsvga3dInfoSurfaceToBitmap(NULL, pSurface, "bmp", "rt", "-post"); 6489 } 6490 #endif 6491 6461 6492 return rc; 6462 6493 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器