| 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[0] = 10; |
| 16 |
spec_const_array_size[1] = 40; |
| 17 |
spec_const_array_size[a] = a; |
| 18 |
v[a + gl_WorkGroupSize.x + gl_WorkGroupSize.y + gl_GlobalInvocationID.x] = b + spec_const_array_size[1 - a]; |
| 19 |
} |