Changeset 81903 in vbox for trunk/src/VBox
- Timestamp:
- Nov 17, 2019 10:42:29 AM (5 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r81899 r81903 5838 5838 int vmsvga3dDrawPrimitivesProcessVertexDecls(PVGASTATE pThis, PVMSVGA3DCONTEXT pContext, 5839 5839 uint32_t iVertexDeclBase, uint32_t numVertexDecls, 5840 SVGA3dVertexDecl *pVertexDecl, SVGA3dVertexDivisor const *paVertexDivisors) 5840 SVGA3dVertexDecl *pVertexDecl, 5841 SVGA3dVertexDivisor const *paVertexDivisors, uint32_t cInstances) 5841 5842 { 5842 5843 PVMSVGA3DSTATE pState = pThis->svga.p3dState; … … 5909 5910 5910 5911 GLuint divisor = paVertexDivisors && paVertexDivisors[index].s.instanceData ? 1 : 0; 5911 if (pVertexDecl[iVertex].array.stride == 0 && divisor == 0)5912 if (pVertexDecl[iVertex].array.stride == 0) 5912 5913 { 5913 5914 /* Zero stride means that the attribute pointer must not be increased. 5914 5915 * See comment about stride in vmsvga3dDrawPrimitives. 5915 5916 */ 5916 LogRelMax(8, ("VMSVGA: Warning: zero stride array (instancing %s)\n", paVertexDivisors ? "on" : "off")); 5917 AssertFailed(); 5918 divisor = 1; 5917 if (!divisor) 5918 { 5919 LogRelMax(8, ("VMSVGA: zero stride array (instancing %s %d)\n", paVertexDivisors ? "on" : "off", cInstances)); 5920 AssertFailed(); 5921 } 5922 5923 divisor = cInstances; /* This attrib must never advance. */ 5919 5924 } 5920 5925 pState->ext.glVertexAttribDivisor(index, divisor); … … 6246 6251 6247 6252 rc = vmsvga3dDrawPrimitivesProcessVertexDecls(pThis, pContext, iCurrentVertex, iVertex - iCurrentVertex, 6248 &pVertexDecl[iCurrentVertex], pVertexDivisor );6253 &pVertexDecl[iCurrentVertex], pVertexDivisor, cInstances); 6249 6254 AssertRCReturn(rc, rc); 6250 6255 -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
r81899 r81903 5163 5163 if (cVertexDivisor) 5164 5164 { 5165 LogFunc(("SetStreamSourceFreq[%d]=%x\n", iCurrentStreamId, pVertexDivisor[iCurrent StreamId].value));5165 LogFunc(("SetStreamSourceFreq[%d]=%x\n", iCurrentStreamId, pVertexDivisor[iCurrentVertex].value)); 5166 5166 HRESULT hr2 = pContext->pDevice->SetStreamSourceFreq(iCurrentStreamId, 5167 pVertexDivisor[iCurrent StreamId].value);5167 pVertexDivisor[iCurrentVertex].value); 5168 5168 Assert(SUCCEEDED(hr2)); RT_NOREF(hr2); 5169 5169 }
Note:
See TracChangeset
for help on using the changeset viewer.