mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-06 14:04:04 +00:00
Make sure to match to right declaration type when looking for stride
* ld_structured was just looking for UAVs before, but this opcode is also used for SRVs and we need to find the right declaration to get the stride correctly (otherwise we'll either get 0 if there are no UAVs, or pick a UAV incorrectly!)
This commit is contained in:
1 parent
25ce9f2a5a
commit
68bf87d68f
1 file changed
+8
-1
@@ -2122,13 +2122,20 @@ State State::GetNext(GlobalState &global, State quad[4]) const
|
||||
{
|
||||
ASMDecl &decl = s.dxbc->m_Declarations[i];
|
||||
|
||||
if(decl.operand.type == TYPE_UNORDERED_ACCESS_VIEW &&
|
||||
if(decl.operand.type == TYPE_UNORDERED_ACCESS_VIEW && !srv &&
|
||||
decl.operand.indices[0].index == resIndex &&
|
||||
decl.declaration == OPCODE_DCL_UNORDERED_ACCESS_VIEW_STRUCTURED)
|
||||
{
|
||||
stride = decl.stride;
|
||||
break;
|
||||
}
|
||||
if(decl.operand.type == TYPE_RESOURCE && srv &&
|
||||
decl.operand.indices[0].index == resIndex &&
|
||||
decl.declaration == OPCODE_DCL_RESOURCE_STRUCTURED)
|
||||
{
|
||||
stride = decl.stride;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user