diff options
Diffstat (limited to 'tests/glsl')
| -rw-r--r-- | tests/glsl/compute-shader-layout-id.slang | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/glsl/compute-shader-layout-id.slang b/tests/glsl/compute-shader-layout-id.slang new file mode 100644 index 000000000..bee8137d8 --- /dev/null +++ b/tests/glsl/compute-shader-layout-id.slang @@ -0,0 +1,19 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry main -allow-glsl +#version 450 + +[vk::constant_id(1)] +const int constValue1 = 0; + +[vk::constant_id(2)] +const int constValue3 = 5; + +// CHECK-DAG: OpExecutionModeId %main LocalSizeId %[[C0:[0-9A-Za-z_]+]] %[[C1:[0-9A-Za-z_]+]] %[[C2:[0-9A-Za-z_]+]] +// CHECK-DAG: OpDecorate %[[C0]] SpecId 1 +// CHECK-DAG: OpDecorate %[[C1]] SpecId 0 +// CHECK-DAG: OpDecorate %[[C2]] SpecId 2 + +layout(local_size_x_id = 1, local_size_y_id = 0, local_size_z = constValue3) in; +void main() +{ +} + |
