mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 06:26:30 +00:00
Fix structure stride calculation for array inputs
* This could cause multiple primitive data to be incorrect
This commit is contained in:
@@ -1337,9 +1337,6 @@ ShaderDebugTrace D3D11Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
|
||||
(dxbc->m_InputSig[i].regChannelMask & 0x4 ? 1 : 0) +
|
||||
(dxbc->m_InputSig[i].regChannelMask & 0x8 ? 1 : 0);
|
||||
|
||||
if(included)
|
||||
structureStride += 4 * numCols;
|
||||
|
||||
std::string name = dxbc->m_InputSig[i].semanticIdxName;
|
||||
|
||||
// arrays of interpolators are handled really weirdly. They use cbuffer
|
||||
@@ -1398,6 +1395,12 @@ ShaderDebugTrace D3D11Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
|
||||
make_rdcpair(dxbc->m_InputSig[i].semanticIndex, nextIdx - 1)));
|
||||
}
|
||||
|
||||
if(included)
|
||||
{
|
||||
// in UAV structs, arrays are packed tightly, so just multiply by arrayLength
|
||||
structureStride += 4 * numCols * RDCMAX(1, arrayLength);
|
||||
}
|
||||
|
||||
// as another side effect of the above, an element declared as a 1-length array won't be
|
||||
// detected but it WILL be put in its own register (not packed together), so detect this
|
||||
// case too.
|
||||
|
||||
Reference in New Issue
Block a user