From 3013be8d52233faac3ca022f240ad62258a353a8 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 13 Sep 2022 15:33:45 +0100 Subject: [PATCH] Fix use of wrong instruction counter when instruction info is sparse --- qrenderdoc/Windows/ShaderViewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Windows/ShaderViewer.cpp b/qrenderdoc/Windows/ShaderViewer.cpp index 9170ae1dd..bd7e0685f 100644 --- a/qrenderdoc/Windows/ShaderViewer.cpp +++ b/qrenderdoc/Windows/ShaderViewer.cpp @@ -670,7 +670,7 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR } if(disasmLine > 0) - m_AsmLine2Inst[disasmLine] = (int)inst; + m_AsmLine2Inst[disasmLine] = (int)instInfo.instruction; if(line.fileIndex < 0) continue; @@ -686,7 +686,7 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR prevLine = line; - m_Location2Inst[line].push_back(inst); + m_Location2Inst[line].push_back(instInfo.instruction); } // if we don't have line mapping info, assume we also don't have useful high-level variable