SPIRV-Cross/reference/shaders-hlsl/asm/comp/storage-buffer-basic.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

27 lines
620 B
Plaintext

static const uint _3 = 1u;
static const uint _4 = 3u;
static const uint3 gl_WorkGroupSize = uint3(_3, 2u, _4);
RWByteAddressBuffer _8 : register(u0);
RWByteAddressBuffer _9 : register(u1);
static uint3 gl_WorkGroupID;
struct SPIRV_Cross_Input
{
uint3 gl_WorkGroupID : SV_GroupID;
};
static uint3 _22 = gl_WorkGroupSize;
void comp_main()
{
_8.Store(gl_WorkGroupID.x * 4 + 0, asuint(asfloat(_9.Load(gl_WorkGroupID.x * 4 + 0)) + asfloat(_8.Load(gl_WorkGroupID.x * 4 + 0))));
}
[numthreads(1, 2, 3)]
void main(SPIRV_Cross_Input stage_input)
{
gl_WorkGroupID = stage_input.gl_WorkGroupID;
comp_main();
}