blob: c2ed4a3d83f2337e3596a4ae7a6cac74605cd847 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import "glsl";
//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly -O0
// CHECK-DAG: %[[CONST:[A-Za-z0-9_]+]] = OpConstantComposite %v3int %int_1 %int_2 %int_3
// CHECK: OpBitcast %v3uint %[[CONST]]
RWStructuredBuffer<int> outputBuffer;
[shader("compute")]
[numthreads(1u, 2u, 3)]
void compute()
{
const int x = gl_WorkGroupSize.x;
outputBuffer[0] = x;
}
|