Changeset 69242 in vbox
- Timestamp:
- Oct 24, 2017 4:22:20 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 118555
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r69146 r69242 4055 4055 STAM_REL_COUNTER_INC(&pSVGAState->StatR3Cmd3dDrawPrimitives); 4056 4056 4057 uint32_t cVertexDivisor = (pHdr->size - sizeof(*pCmd) - sizeof(SVGA3dVertexDecl) * pCmd->numVertexDecls - sizeof(SVGA3dPrimitiveRange) * pCmd->numRanges) ;4057 uint32_t cVertexDivisor = (pHdr->size - sizeof(*pCmd) - sizeof(SVGA3dVertexDecl) * pCmd->numVertexDecls - sizeof(SVGA3dPrimitiveRange) * pCmd->numRanges) / sizeof(uint32_t); 4058 4058 Assert(pCmd->numRanges <= SVGA3D_MAX_DRAW_PRIMITIVE_RANGES); 4059 4059 Assert(pCmd->numVertexDecls <= SVGA3D_MAX_VERTEX_ARRAYS); -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
r69163 r69242 5237 5237 AssertReturn(numRanges && numRanges <= SVGA3D_MAX_DRAW_PRIMITIVE_RANGES, VERR_INVALID_PARAMETER); 5238 5238 AssertReturn(!cVertexDivisor || cVertexDivisor == numVertexDecls, VERR_INVALID_PARAMETER); 5239 /** @todo */5240 Assert(!cVertexDivisor);5241 5239 5242 5240 rc = vmsvga3dContextFromCid(pState, cid, &pContext); … … 5284 5282 if (RT_FAILURE(rc)) 5285 5283 goto internal_error; 5284 5285 if (cVertexDivisor) 5286 { 5287 LogFunc(("SetStreamSourceFreq[%d]=%x\n", iCurrentStreamId, pVertexDivisor[iCurrentStreamId].value)); 5288 HRESULT hr2 = pContext->pDevice->SetStreamSourceFreq(iCurrentStreamId, pVertexDivisor[iCurrentStreamId].value); 5289 Assert(SUCCEEDED(hr2)); 5290 } 5286 5291 5287 5292 iCurrentVertex = iVertex; … … 5463 5468 hr = pContext->pDevice->SetStreamSource(i, NULL, 0, 0); 5464 5469 AssertMsgReturn(hr == D3D_OK, ("vmsvga3dDrawPrimitives: SetStreamSource failed with %x\n", hr), VERR_INTERNAL_ERROR); 5470 } 5471 } 5472 5473 if (cVertexDivisor) 5474 { 5475 /* "When you are finished rendering the instance data, be sure to reset the vertex stream frequency back..." */ 5476 for (uint32_t i = 0; i < cVertexDivisor; ++i) 5477 { 5478 HRESULT hr2 = pContext->pDevice->SetStreamSourceFreq(i, 1); 5479 Assert(SUCCEEDED(hr2)); 5465 5480 } 5466 5481 }
Note:
See TracChangeset
for help on using the changeset viewer.