SPIRV-Cross/reference/shaders-hlsl/asm/comp/specialization-constant-workgroup.asm.comp
James Ross-Gowan 1f16f0d260 Use 'static const' for spec constants in HLSL
If 'const' is used, the shader expects the variable to be backed by a
constant buffer. 'static const' is probably preferred for a value that
is initialized with a constant in the HLSL source code.

FXC also emits a warning for 'const' variables with initializers, since
'static const' was probably intended.
2017-10-21 19:19:32 +11:00

17 lines
284 B
Plaintext

static const uint _5 = 9u;
static const uint _6 = 4u;
static const uint3 gl_WorkGroupSize = uint3(_5, 20u, _6);
RWByteAddressBuffer _4 : register(u0);
void comp_main()
{
_4.Store(0, asuint(asfloat(_4.Load(0)) + 1.0f));
}
[numthreads(9, 20, 4)]
void main()
{
comp_main();
}