@@ -2274,7 +2274,7 @@ inline void DeviceContextBase<ImplementationTraits>::Draw(const DrawAttribs& Att
2274
2274
if (m_pPipelineState)
2275
2275
{
2276
2276
const PRIMITIVE_TOPOLOGY Topology = m_pPipelineState->GetGraphicsPipelineDesc ().PrimitiveTopology ;
2277
- m_Stats.PrimitiveCounts [Topology] += GetPrimitiveCount (Topology, Attribs.NumVertices );
2277
+ m_Stats.PrimitiveCounts [Topology] += GetPrimitiveCount (Topology, Attribs.NumVertices ) * Attribs. NumInstances ;
2278
2278
}
2279
2279
++m_Stats.CommandCounters .Draw ;
2280
2280
}
@@ -2301,7 +2301,7 @@ inline void DeviceContextBase<ImplementationTraits>::DrawIndexed(const DrawIndex
2301
2301
if (m_pPipelineState)
2302
2302
{
2303
2303
const PRIMITIVE_TOPOLOGY Topology = m_pPipelineState->GetGraphicsPipelineDesc ().PrimitiveTopology ;
2304
- m_Stats.PrimitiveCounts [Topology] += GetPrimitiveCount (Topology, Attribs.NumIndices );
2304
+ m_Stats.PrimitiveCounts [Topology] += GetPrimitiveCount (Topology, Attribs.NumIndices ) * Attribs. NumInstances ;
2305
2305
}
2306
2306
++m_Stats.CommandCounters .DrawIndexed ;
2307
2307
}
@@ -2433,7 +2433,7 @@ inline void DeviceContextBase<ImplementationTraits>::MultiDraw(const MultiDrawAt
2433
2433
{
2434
2434
const PRIMITIVE_TOPOLOGY Topology = m_pPipelineState->GetGraphicsPipelineDesc ().PrimitiveTopology ;
2435
2435
for (Uint32 i = 0 ; i < Attribs.DrawCount ; ++i)
2436
- m_Stats.PrimitiveCounts [Topology] += GetPrimitiveCount (Topology, Attribs.pDrawItems [i].NumVertices );
2436
+ m_Stats.PrimitiveCounts [Topology] += GetPrimitiveCount (Topology, Attribs.pDrawItems [i].NumVertices ) * Attribs. NumInstances ;
2437
2437
}
2438
2438
if (m_NativeMultiDrawSupported)
2439
2439
++m_Stats.CommandCounters .MultiDraw ;
@@ -2464,7 +2464,7 @@ inline void DeviceContextBase<ImplementationTraits>::MultiDrawIndexed(const Mult
2464
2464
{
2465
2465
const PRIMITIVE_TOPOLOGY Topology = m_pPipelineState->GetGraphicsPipelineDesc ().PrimitiveTopology ;
2466
2466
for (Uint32 i = 0 ; i < Attribs.DrawCount ; ++i)
2467
- m_Stats.PrimitiveCounts [Topology] += GetPrimitiveCount (Topology, Attribs.pDrawItems [i].NumIndices );
2467
+ m_Stats.PrimitiveCounts [Topology] += GetPrimitiveCount (Topology, Attribs.pDrawItems [i].NumIndices ) * Attribs. NumInstances ;
2468
2468
}
2469
2469
if (m_NativeMultiDrawSupported)
2470
2470
++m_Stats.CommandCounters .MultiDrawIndexed ;
0 commit comments