mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-11 16:33:38 +00:00
D3D12 Workgroup debugger, add padding lanes to align to subgroup size
This commit is contained in:
1 parent
53ad61b6a5
commit
ede0c1d0ee
1 file changed
+14
-1
@@ -3767,7 +3767,20 @@ ShaderDebugTrace *D3D12Replay::DebugThread(uint32_t eventId,
|
||||
0U, 0U);
|
||||
}
|
||||
|
||||
// plain single thread case
|
||||
// Add inactive padding lanes to round up to the subgroup size
|
||||
const uint32_t numPaddingThreads = AlignUp(numThreads, subgroupSize) - numThreads;
|
||||
if(numPaddingThreads > 0)
|
||||
{
|
||||
uint32_t newNumThreads = numThreads + numPaddingThreads;
|
||||
workgroupProperties.resize(newNumThreads);
|
||||
for(uint32_t i = numThreads; i < newNumThreads; ++i)
|
||||
{
|
||||
workgroupProperties[i][DXILDebug::ThreadProperty::Active] = 0;
|
||||
workgroupProperties[i][DXILDebug::ThreadProperty::SubgroupIdx] = i % subgroupSize;
|
||||
}
|
||||
numThreads = newNumThreads;
|
||||
}
|
||||
|
||||
DXILDebug::Debugger *debugger = new DXILDebug::Debugger();
|
||||
ret = debugger->BeginDebug(eventId, dxbc, refl, activeLaneIndex, numThreads);
|
||||
DXILDebug::GlobalState &globalState = debugger->GetGlobalState();
|
||||
|
||||
Reference in new issue
Block a user