Add fetch of subgroup data via GPU readback, handling helpers in PS

This commit is contained in:
baldurk
2025-02-10 17:52:30 +00:00
parent 8d3f40b0a9
commit af4bd659e0
3 changed files with 927 additions and 222 deletions
@@ -241,6 +241,7 @@ struct ThreadState
uint32_t workgroupIndex = 0;
bool helperInvocation = false;
bool dead = true;
bool elected = false;
const ShaderVariable &GetSrc(Id id) const;
void WritePointerValue(Id pointer, const ShaderVariable &val);
@@ -1507,6 +1507,9 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s
lane.dead = apiWrapper->GetThreadProperty(i, ThreadProperty::Active) == 0;
if(patchData.threadScope & ThreadScope::Subgroup)
lane.elected = apiWrapper->GetThreadProperty(i, ThreadProperty::Elected) != 0;
// now that the globals are allocated and their storage won't move, we can take pointers to them
for(const PointerId &p : pointerIDs)
p.Set(*this, global, lane);
File diff suppressed because it is too large Load Diff