third_party/spirv-cross/shaders-msl/comp/spec-constant-work-group-size.comp
raw| 1 | #version 450 |
| 2 | layout(local_size_x_id = 10, local_size_y = 20) in; |
| 3 | |
| 4 | layout(constant_id = 0) const int a = 1; |
| 5 | layout(constant_id = 1) const int b = 2; |
| 6 | |
| 7 | layout(set = 1, binding = 0) writeonly buffer SSBO |
| 8 | { |
| 9 | int v[]; |
| 10 | }; |
| 11 | |
| 12 | void main() |
| 13 | { |
| 14 | int spec_const_array_size[b]; |
| 15 | spec_const_array_size[a] = a; |
| 16 | v[a + gl_WorkGroupSize.x + gl_WorkGroupSize.y] = b + spec_const_array_size[1 - a]; |
| 17 | } |