mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Don't return an index byte stride if postvs data doesn't use indices
* Since we use the index byte stride to indicate whether a draw is indexed or not, returning a valid value here is misleading.
This commit is contained in:
@@ -114,14 +114,20 @@ MeshFormat D3D11Replay::GetPostVSBuffers(uint32_t eventId, uint32_t instID, uint
|
||||
|
||||
MeshFormat ret;
|
||||
|
||||
if(s.useIndices && s.idxBuf)
|
||||
ret.indexResourceId = ((WrappedID3D11Buffer *)s.idxBuf)->GetResourceID();
|
||||
else
|
||||
ret.indexResourceId = ResourceId();
|
||||
ret.indexByteOffset = 0;
|
||||
ret.indexByteStride = s.idxFmt == DXGI_FORMAT_R16_UINT ? 2 : 4;
|
||||
ret.baseVertex = 0;
|
||||
|
||||
if(s.useIndices && s.idxBuf)
|
||||
{
|
||||
ret.indexResourceId = ((WrappedID3D11Buffer *)s.idxBuf)->GetResourceID();
|
||||
ret.indexByteStride = s.idxFmt == DXGI_FORMAT_R16_UINT ? 2 : 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.indexResourceId = ResourceId();
|
||||
ret.indexByteStride = 0;
|
||||
}
|
||||
|
||||
if(s.buf)
|
||||
ret.vertexResourceId = ((WrappedID3D11Buffer *)s.buf)->GetResourceID();
|
||||
else
|
||||
|
||||
@@ -1862,11 +1862,16 @@ MeshFormat GLReplay::GetPostVSBuffers(uint32_t eventId, uint32_t instID, uint32_
|
||||
MeshFormat ret;
|
||||
|
||||
if(s.useIndices && s.idxBuf)
|
||||
{
|
||||
ret.indexResourceId = m_pDriver->GetResourceManager()->GetID(BufferRes(ctx, s.idxBuf));
|
||||
ret.indexByteStride = s.idxByteWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.indexResourceId = ResourceId();
|
||||
ret.indexByteStride = 0;
|
||||
}
|
||||
ret.indexByteOffset = 0;
|
||||
ret.indexByteStride = s.idxByteWidth;
|
||||
ret.baseVertex = 0;
|
||||
|
||||
if(s.buf)
|
||||
|
||||
Reference in New Issue
Block a user