mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-09 01:00:51 +00:00
Implement OpKill support
This commit is contained in:
@@ -65,6 +65,7 @@ ThreadState::ThreadState(uint32_t workgroupIdx, Debugger &debug, const GlobalSta
|
||||
workgroupIndex = workgroupIdx;
|
||||
nextInstruction = 0;
|
||||
helperInvocation = false;
|
||||
killed = false;
|
||||
}
|
||||
|
||||
ThreadState::~ThreadState()
|
||||
@@ -76,7 +77,7 @@ ThreadState::~ThreadState()
|
||||
|
||||
bool ThreadState::Finished() const
|
||||
{
|
||||
return helperInvocation || callstack.empty();
|
||||
return helperInvocation || killed || callstack.empty();
|
||||
}
|
||||
|
||||
void ThreadState::FillCallstack(ShaderDebugState &state)
|
||||
@@ -1880,6 +1881,18 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray<ThreadState>
|
||||
break;
|
||||
}
|
||||
|
||||
case Op::Kill:
|
||||
{
|
||||
killed = true;
|
||||
|
||||
// destroy all stack frames
|
||||
for(StackFrame *exitingFrame : callstack)
|
||||
delete exitingFrame;
|
||||
|
||||
callstack.clear();
|
||||
|
||||
break;
|
||||
}
|
||||
case Op::Return:
|
||||
case Op::ReturnValue:
|
||||
{
|
||||
|
||||
@@ -198,6 +198,7 @@ struct ThreadState
|
||||
// index in the pixel quad
|
||||
uint32_t workgroupIndex;
|
||||
bool helperInvocation;
|
||||
bool killed;
|
||||
|
||||
const ShaderVariable &GetSrc(Id id) const;
|
||||
|
||||
|
||||
@@ -649,6 +649,10 @@ void main()
|
||||
vec4(posone*1.0f, posone*2.0f, posone*3.0f, posone*4.0f), c);
|
||||
break;
|
||||
}
|
||||
case 80:
|
||||
{
|
||||
discard;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user