Fix use of wrong instruction counter when instruction info is sparse

This commit is contained in:
baldurk
2022-09-13 17:24:42 +01:00
parent 6ed5ac046b
commit 3013be8d52
+2 -2
View File
@@ -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