Add test for specialization constant workgroup size on HLSL.

This commit is contained in:
Hans-Kristian Arntzen 2017-09-29 10:21:02 +02:00
parent 84f8c9935b
commit 825f07c04a
2 changed files with 28 additions and 0 deletions

View File

@ -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();
}

View File

@ -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;
}