diff --git a/reference/shaders-hlsl/comp/specialization-constant-workgroup.comp b/reference/shaders-hlsl/comp/specialization-constant-workgroup.comp new file mode 100644 index 00000000..61a55659 --- /dev/null +++ b/reference/shaders-hlsl/comp/specialization-constant-workgroup.comp @@ -0,0 +1,16 @@ +const uint _13 = 1u; +const uint _15 = 1u; +const uint3 gl_WorkGroupSize = uint3(_13, 10u, _15); + +RWByteAddressBuffer _10 : register(u0); + +void comp_main() +{ + _10.Store3(0, gl_WorkGroupSize); +} + +[numthreads(1, 10, 1)] +void main() +{ + comp_main(); +} diff --git a/shaders-hlsl/comp/specialization-constant-workgroup.comp b/shaders-hlsl/comp/specialization-constant-workgroup.comp new file mode 100644 index 00000000..3beeb8c1 --- /dev/null +++ b/shaders-hlsl/comp/specialization-constant-workgroup.comp @@ -0,0 +1,12 @@ +#version 310 es +layout(local_size_x_id = 3, local_size_y = 10, local_size_z_id = 20) in; + +layout(binding = 0) buffer SSBO +{ + uvec3 wg_size; +}; + +void main() +{ + wg_size = gl_WorkGroupSize; +}