|
|
@@ -3379,7 +3379,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- srv[ii] = texture.m_srv;
|
|
|
+ srv[ii] = texture.m_srv;
|
|
|
sampler[ii] = texture.m_sampler;
|
|
|
}
|
|
|
}
|
|
|
@@ -3727,10 +3727,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|
|
{
|
|
|
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;
|
|
|
- numInstances = draw.m_numInstances;
|
|
|
- numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
|
|
+ numInstances = draw.m_numInstances;
|
|
|
+ numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
|
|
|
|
|
deviceCtx->DrawIndexedInstanced(numIndices
|
|
|
, draw.m_numInstances
|