Apply index offset when mesh picking in D3D12

This commit is contained in:
baldurk
2016-11-18 16:03:53 +01:00
parent 37c13027bd
commit 9be8d9b3cc
+2
View File
@@ -2370,6 +2370,7 @@ uint32_t D3D12DebugManager::PickVertex(uint32_t eventID, const MeshDisplay &cfg,
if(cfg.position.idxByteWidth && ib)
{
sdesc.Buffer.FirstElement = cfg.position.idxoffs / (cfg.position.idxByteWidth);
sdesc.Buffer.NumElements = cfg.position.numVerts;
m_WrappedDevice->CreateShaderResourceView(ib, &sdesc, GetCPUHandle(PICK_IB_SRV));
}
@@ -2379,6 +2380,7 @@ uint32_t D3D12DebugManager::PickVertex(uint32_t eventID, const MeshDisplay &cfg,
m_WrappedDevice->CreateShaderResourceView(NULL, &sdesc, GetCPUHandle(PICK_IB_SRV));
}
sdesc.Buffer.FirstElement = 0;
sdesc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
if(vb)