mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
DXIL Reflection for compute shaders correctly detect threadIdInGroup
Searches for "dx.op.threadId" was also incorrectly matching "dx.op.threadIdInGroup"
This commit is contained in:
@@ -576,7 +576,17 @@ void Program::FetchComputeProperties(DXBC::Reflection *reflection)
|
||||
{
|
||||
const Function &f = *m_Functions[i];
|
||||
|
||||
if(f.name.beginsWith("dx.op.threadId"))
|
||||
// Match "dx.op.threadIdGroup" before "dx.op.threadId"
|
||||
if(f.name.beginsWith("dx.op.threadIdInGroup"))
|
||||
{
|
||||
SigParameter param;
|
||||
param.systemValue = ShaderBuiltin::GroupThreadIndex;
|
||||
param.compCount = 3;
|
||||
param.regChannelMask = param.channelUsedMask = 0x7;
|
||||
param.semanticIdxName = param.semanticName = "threadIdInGroup";
|
||||
reflection->InputSig.push_back(param);
|
||||
}
|
||||
else if(f.name.beginsWith("dx.op.threadId"))
|
||||
{
|
||||
SigParameter param;
|
||||
param.systemValue = ShaderBuiltin::DispatchThreadIndex;
|
||||
@@ -594,15 +604,6 @@ void Program::FetchComputeProperties(DXBC::Reflection *reflection)
|
||||
param.semanticIdxName = param.semanticName = "groupID";
|
||||
reflection->InputSig.push_back(param);
|
||||
}
|
||||
else if(f.name.beginsWith("dx.op.threadIdInGroup"))
|
||||
{
|
||||
SigParameter param;
|
||||
param.systemValue = ShaderBuiltin::GroupThreadIndex;
|
||||
param.compCount = 3;
|
||||
param.regChannelMask = param.channelUsedMask = 0x7;
|
||||
param.semanticIdxName = param.semanticName = "threadIdInGroup";
|
||||
reflection->InputSig.push_back(param);
|
||||
}
|
||||
else if(f.name.beginsWith("dx.op.flattenedThreadIdInGroup"))
|
||||
{
|
||||
SigParameter param;
|
||||
|
||||
Reference in New Issue
Block a user