Skip post-vs fetch for instanced drawcalls with no instances

This commit is contained in:
baldurk
2018-02-26 12:08:43 +00:00
parent 0dbdba178f
commit 8047e2ea1f
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -189,7 +189,8 @@ void D3D11Replay::InitPostVSBuffers(uint32_t eventId)
const DrawcallDescription *drawcall = m_pDevice->GetDrawcall(eventId);
if(drawcall->numIndices == 0)
if(drawcall->numIndices == 0 ||
((drawcall->flags & DrawFlags::Instanced) && drawcall->numInstances == 0))
return;
DXBC::DXBCFile *dxbcVS = wrappedVS->GetDXBC();
+1 -1
View File
@@ -175,7 +175,7 @@ void D3D12Replay::InitPostVSBuffers(uint32_t eventId)
const DrawcallDescription *drawcall = m_pDevice->GetDrawcall(eventId);
if(drawcall->numIndices == 0)
if(drawcall->numIndices == 0 || drawcall->numInstances == 0)
return;
DXBC::DXBCFile *dxbcVS = vs->GetDXBC();
+2 -1
View File
@@ -164,7 +164,8 @@ void GLReplay::InitPostVSBuffers(uint32_t eventId)
const DrawcallDescription *drawcall = m_pDriver->GetDrawcall(eventId);
if(drawcall->numIndices == 0)
if(drawcall->numIndices == 0 ||
((drawcall->flags & DrawFlags::Instanced) && drawcall->numInstances == 0))
{
// draw is 0 length, nothing to do
m_PostVSData[eventId] = GLPostVSData();