mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 07:56:33 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user