blob: 3ad6c373b0696f8cb9e5baa26da619e1edd850f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly
struct Foo {
column_major float3x2 m;
};
struct Params {
Foo *foo;
};
// CHECK: %[[PTR0:[A-Za-z0-9_]+]] = OpAccessChain %_ptr_PhysicalStorageBuffer__arr_v3float_int_2 %{{.*}} %int_0
// CHECK: %[[PTR1:[A-Za-z0-9_]+]] = OpAccessChain %_ptr_PhysicalStorageBuffer_v3float %[[PTR0]] %int_1
// CHECK: %[[PTR2:[A-Za-z0-9_]+]] = OpAccessChain %_ptr_PhysicalStorageBuffer_float %[[PTR1]] %int_2
ConstantBuffer<Params> params;
[shader("compute")]
[numthreads(1,1,1)]
void main() {
params.foo.m[2][1] += 1.0;
}
|