From 68bf87d68fdf5d6a5684ec312130c0d38946d939 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 27 Mar 2015 01:15:15 +0000 Subject: [PATCH] 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!) --- renderdoc/driver/d3d11/shaders/dxbc_debug.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d11/shaders/dxbc_debug.cpp b/renderdoc/driver/d3d11/shaders/dxbc_debug.cpp index 44e356cb2..98493a084 100644 --- a/renderdoc/driver/d3d11/shaders/dxbc_debug.cpp +++ b/renderdoc/driver/d3d11/shaders/dxbc_debug.cpp @@ -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; + } } } }