SPIRV-Cross/reference/opt/shaders-hlsl/comp/num-workgroups-alone.comp
Hans-Kristian Arntzen 226d837d7e HLSL: Use same logic as GLSL for picking cbuffer block name.
HLSL just picked the variable name which did not work as expected for
some users. Use the same logic as GLSL and set up declared_block_names,
so the actual name can be queried later.
2018-10-22 09:50:04 +02:00

18 lines
289 B
Plaintext

RWByteAddressBuffer _10 : register(u0);
cbuffer SPIRV_Cross_NumWorkgroups : register(b0)
{
uint3 SPIRV_Cross_NumWorkgroups_1_count : packoffset(c0);
};
void comp_main()
{
_10.Store3(0, SPIRV_Cross_NumWorkgroups_1_count);
}
[numthreads(1, 1, 1)]
void main()
{
comp_main();
}