Reflect explicit wave size out of compute shaders if present in DXIL

This commit is contained in:
baldurk
2025-03-17 15:36:33 +00:00
parent a20214452f
commit 59fbd3d820
3 changed files with 8 additions and 0 deletions
@@ -495,6 +495,7 @@ struct Reflection
rdcarray<SigParameter> PatchConstantSig;
uint32_t DispatchThreadsDimension[3];
uint32_t WaveSize = 0;
};
class DXBCContainer;
@@ -158,6 +158,7 @@ enum class ShaderEntryTag
Compute = 4,
Mesh = 9,
Amplification = 10,
WaveSize = 11,
};
enum class ResField
@@ -735,6 +735,12 @@ void Program::FetchComputeProperties(DXBC::Reflection *reflection)
reflection->DispatchThreadsDimension[2] = getival<uint32_t>(threadDim.children[2]);
return;
}
else if(shaderTypeTag == ShaderEntryTag::WaveSize)
{
Metadata &sizeData = *tags.children[t + 1];
RDCASSERTEQUAL(sizeData.children.size(), 1);
reflection->WaveSize = getival<uint32_t>(sizeData.children[0]);
}
}
break;