This commit is contained in:
Branimir Karadžić 2015-04-08 23:25:17 -07:00
parent c69f29cb36
commit 5cd313e342
3 changed files with 12 additions and 10 deletions

View file

@ -3727,7 +3727,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
{ {
if (UINT32_MAX == draw.m_numIndices) if (UINT32_MAX == draw.m_numIndices)
{ {
numIndices = m_indexBuffers[draw.m_indexBuffer.idx].m_size/2; const IndexBufferD3D11& ib = m_indexBuffers[draw.m_indexBuffer.idx];
const uint32_t indexSize = 0 == (ib.m_flags & BGFX_BUFFER_INDEX32) ? 2 : 4;
numIndices = ib.m_size/indexSize;
numPrimsSubmitted = numIndices/prim.m_div - prim.m_sub; numPrimsSubmitted = numIndices/prim.m_div - prim.m_sub;
numInstances = draw.m_numInstances; numInstances = draw.m_numInstances;
numPrimsRendered = numPrimsSubmitted*draw.m_numInstances; numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;