- Timestamp:
- Aug 28, 2020 6:28:26 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
r85369 r85938 5153 5153 AssertReturn(!cVertexDivisor || cVertexDivisor == numVertexDecls, VERR_INVALID_PARAMETER); 5154 5154 5155 #if 0 5156 /* Dump render target to a bitmap. */ 5157 if (pContext->state.aRenderTargets[SVGA3D_RT_COLOR0] != SVGA3D_INVALID_ID) 5158 { 5159 vmsvga3dUpdateHeapBuffersForSurfaces(pThisCC, pContext->state.aRenderTargets[SVGA3D_RT_COLOR0]); 5160 PVMSVGA3DSURFACE pSurface; 5161 int rc2 = vmsvga3dSurfaceFromSid(pState, pContext->state.aRenderTargets[SVGA3D_RT_COLOR0], &pSurface); 5162 if (RT_SUCCESS(rc2)) 5163 vmsvga3dInfoSurfaceToBitmap(NULL, pSurface, "bmpd3d", "rt", "-pre"); 5164 } 5165 for (int iTex = 0; iTex < SVGA3D_MAX_SAMPLERS_PS; ++iTex) 5166 { 5167 IDirect3DBaseTexture9 *pBaseTexture = 0; 5168 hr = pContext->pDevice->GetTexture(iTex, &pBaseTexture); 5169 if (hr == S_OK && pBaseTexture) 5170 { 5171 D3DSURFACE_DESC surfDesc; 5172 RT_ZERO(surfDesc); 5173 5174 IDirect3DTexture9 *pTexture = (IDirect3DTexture9 *)pBaseTexture; 5175 pTexture->GetLevelDesc(0, &surfDesc); 5176 5177 Log(("Texture[%d]: %dx%d\n", 5178 iTex, surfDesc.Width, surfDesc.Height)); 5179 D3D_RELEASE(pBaseTexture); 5180 } 5181 } 5182 #endif 5183 5155 5184 /* 5156 5185 * Process all vertex declarations. Each vertex buffer surface is represented by one stream source id. … … 5348 5377 5349 5378 /* Render with an index buffer */ 5350 Log(("DrawIndexedPrimitive %x startindex=%d numVertices=%d, primitivecount=%d index format=%s index bias=%d stride=%d\n", 5351 PrimitiveTypeD3D, pVertexDecl[0].rangeHint.first, numVertices, pRange[iPrimitive].primitiveCount, 5379 Log(("DrawIndexedPrimitive %x startindex=%d (indexArray.offset 0x%x) range [%d:%d) numVertices=%d, primitivecount=%d index format=%s index bias=%d stride=%d\n", 5380 PrimitiveTypeD3D, pRange[iPrimitive].indexArray.offset / pRange[iPrimitive].indexWidth, pRange[iPrimitive].indexArray.offset, 5381 pVertexDecl[0].rangeHint.first, pVertexDecl[0].rangeHint.last, numVertices, pRange[iPrimitive].primitiveCount, 5352 5382 (pRange[iPrimitive].indexWidth == sizeof(uint16_t)) ? "D3DFMT_INDEX16" : "D3DFMT_INDEX32", 5353 5383 pRange[iPrimitive].indexBias, strideVertex)); … … 5424 5454 vmsvga3dInfoSurfaceToBitmap(NULL, pSurface, "bmpd3d", "rt", "-post"); 5425 5455 # if 0 5426 /* Stage 0 texture. */ 5427 if (pContext->aSidActiveTextures[0] != SVGA3D_INVALID_ID) 5428 { 5429 vmsvga3dUpdateHeapBuffersForSurfaces(pThisCC, pContext->aSidActiveTextures[0]); 5430 rc2 = vmsvga3dSurfaceFromSid(pState, pContext->aSidActiveTextures[0], &pSurface); 5431 if (RT_SUCCESS(rc2)) 5432 vmsvga3dInfoSurfaceToBitmap(NULL, pSurface, "bmpd3d", "rt", "-post-tx"); 5456 for (i = 0; i < SVGA3D_MAX_SAMPLERS_PS; ++i) 5457 { 5458 if (pContext->aSidActiveTextures[i] != SVGA3D_INVALID_ID) 5459 { 5460 char szSuffix[32]; 5461 RTStrPrintf2(szSuffix, sizeof(szSuffix), "-tx%d", i); 5462 vmsvga3dUpdateHeapBuffersForSurfaces(pThisCC, pContext->aSidActiveTextures[i]); 5463 rc2 = vmsvga3dSurfaceFromSid(pState, pContext->aSidActiveTextures[i], &pSurface); 5464 if (RT_SUCCESS(rc2)) 5465 vmsvga3dInfoSurfaceToBitmap(NULL, pSurface, "bmpd3d", "rt", szSuffix); 5466 } 5433 5467 } 5434 5468 # endif … … 5478 5512 AssertReturn(pState, VERR_NO_MEMORY); 5479 5513 5480 Log(("vmsvga3dShaderDefine %x shid=% x type=%s cbData=%x\n", cid, shid, (type == SVGA3D_SHADERTYPE_VS) ? "VERTEX" : "PIXEL", cbData));5514 Log(("vmsvga3dShaderDefine %x shid=%d type=%s cbData=%d\n", cid, shid, (type == SVGA3D_SHADERTYPE_VS) ? "VERTEX" : "PIXEL", cbData)); 5481 5515 5482 5516 PVMSVGA3DCONTEXT pContext; … … 5585 5619 PVMSVGA3DSHADER pShader = NULL; 5586 5620 5587 Log(("vmsvga3dShaderDestroy %x shid=% xtype=%s\n", cid, shid, (type == SVGA3D_SHADERTYPE_VS) ? "VERTEX" : "PIXEL"));5621 Log(("vmsvga3dShaderDestroy %x shid=%d type=%s\n", cid, shid, (type == SVGA3D_SHADERTYPE_VS) ? "VERTEX" : "PIXEL")); 5588 5622 5589 5623 PVMSVGA3DCONTEXT pContext;
Note:
See TracChangeset
for help on using the changeset viewer.