Ignore void return values in the SPIRV debugger

Do not call SetDst() which won't create a ShaderVariableChange
Would also prevent a non-null return value being used for the next void return function
This commit is contained in:
Jake Turner
2025-05-19 16:42:38 +01:00
parent 8133364057
commit fe53dd874e
2 changed files with 7 additions and 2 deletions
@@ -3994,8 +3994,10 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray<ThreadState>
}
else
{
SetDst(call.result, returnValue);
returnValue.name.clear();
if(hasReturnValueData)
SetDst(call.result, returnValue);
returnValue = ShaderVariable();
hasReturnValueData = false;
// The instruction after a function call is defined to be a convergence point, mark that we entered it
enteredPoints.push_back(nextInstruction);
}
@@ -4040,10 +4042,12 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray<ThreadState>
else
{
returnValue.name = "<return value>";
hasReturnValueData = false;
if(opdata.op == Op::ReturnValue)
{
OpReturnValue ret(it);
hasReturnValueData = true;
returnValue = GetSrc(ret.value);
}
@@ -238,6 +238,7 @@ struct ThreadState
uint32_t convergenceInstruction;
uint32_t functionReturnPoint;
ShaderVariable returnValue;
bool hasReturnValueData;
rdcarray<StackFrame *> callstack;
// the list of IDs that are currently valid and live