yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Julius IkkalaImplement specialization constant support in numthreads / local_size (#5963)cbdc7e121

master
538 B19 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry main -allow-glsl
2#version 450
3
4[vk::constant_id(1)]
5const int constValue1 = 0;
6
7[vk::constant_id(2)]
8const int constValue3 = 5;
9
10// CHECK-DAG: OpExecutionModeId %main LocalSizeId %[[C0:[0-9A-Za-z_]+]] %[[C1:[0-9A-Za-z_]+]] %[[C2:[0-9A-Za-z_]+]]
11// CHECK-DAG: OpDecorate %[[C0]] SpecId 1
12// CHECK-DAG: OpDecorate %[[C1]] SpecId 0
13// CHECK-DAG: OpDecorate %[[C2]] SpecId 2
14
15layout(local_size_x_id = 1, local_size_y_id = 0, local_size_z = constValue3) in;
16void main()
17{
18}
19