Spirv debugger handle quadScope case when subgroupSize > workgroupSize

This commit is contained in:
Jake Turner
2026-05-06 18:34:25 +01:00
parent 2b634742ae
commit a9bafd2723
+11 -4
View File
@@ -6745,16 +6745,16 @@ ShaderDebugTrace *VulkanReplay::DebugComputeCommon(ShaderStage stage, uint32_t e
uint32_t quadZ = compData->threadid[2];
quadId = quadX + (quadY * countQuadX) + (quadZ * countQuadY * countQuadX);
quadLaneIndex = (compData->threadid[0] % quadW) + (compData->threadid[1] % quadH) * 2;
apiWrapper->thread_props[lane][(size_t)rdcspv::ThreadProperty::QuadLane] = quadLaneIndex;
apiWrapper->thread_props[lane][(size_t)rdcspv::ThreadProperty::QuadId] =
quadId + quadIdOffset;
}
if(hasWorkgroupScope)
{
if(hasQuadScope)
{
// There won't be any data them for inactive lanes
if(subgroupData->isActive == 0)
continue;
// quad scope, derive the lane from the quad layout
lane = quadId * 4 + quadLaneIndex;
}
@@ -6766,6 +6766,13 @@ ShaderDebugTrace *VulkanReplay::DebugComputeCommon(ShaderStage stage, uint32_t e
}
}
if(hasQuadScope)
{
apiWrapper->thread_props[lane][(size_t)rdcspv::ThreadProperty::QuadLane] = quadLaneIndex;
apiWrapper->thread_props[lane][(size_t)rdcspv::ThreadProperty::QuadId] =
quadId + quadIdOffset;
}
if(rdcfixedarray<uint32_t, 3>(compData->threadid) == threadid && subgroupData->isActive)
laneIndex = lane;