Skip to content

Commit a3904f6

Browse files
committed
Refresh CodeGenSPIRV checkpoint checks
1 parent 1e5fa7c commit a3904f6

5 files changed

+30
-23
lines changed

tools/clang/test/CodeGenSPIRV/cast.flat-conversion.matrix.hlsl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ RWStructuredBuffer<T> t_output;
2121
// stored in both cases is the same because the decoration, which is checked
2222
// above, is what determines the layout in memory for the value.
2323

24-
// CHECK: [[row0:%[0-9]+]] = OpConstantComposite %v3float %float_0 %float_1 %float_2
25-
// CHECK: [[row1:%[0-9]+]] = OpConstantComposite %v3float %float_3 %float_4 %float_5
26-
// CHECK: [[mat:%[0-9]+]] = OpConstantComposite %mat2v3float %33 %34
27-
// CHECK: [[s:%[0-9]+]] = OpConstantComposite %S %35
24+
// CHECK: [[mat:%[0-9]+]] = OpLoad %mat2v3float
25+
// CHECK: [[e00:%[0-9]+]] = OpCompositeExtract %float [[mat]] 0 0
26+
// CHECK: [[e01:%[0-9]+]] = OpCompositeExtract %float [[mat]] 0 1
27+
// CHECK: [[e02:%[0-9]+]] = OpCompositeExtract %float [[mat]] 0 2
28+
// CHECK: [[e10:%[0-9]+]] = OpCompositeExtract %float [[mat]] 1 0
29+
// CHECK: [[e11:%[0-9]+]] = OpCompositeExtract %float [[mat]] 1 1
30+
// CHECK: [[e12:%[0-9]+]] = OpCompositeExtract %float [[mat]] 1 2
2831

2932
void main() {
3033
S s;
@@ -36,14 +39,14 @@ void main() {
3639
}
3740
}
3841
// CHECK: [[tptr:%[0-9]+]] = OpAccessChain %_ptr_Uniform_T %t_output %int_0 %uint_0
39-
// CHECK: [[tarr:%[0-9]+]] = OpCompositeConstruct %_arr_float_uint_6
42+
// CHECK: [[tarr:%[0-9]+]] = OpCompositeConstruct %_arr_float_uint_6 [[e00]] [[e01]] [[e02]] [[e10]] [[e11]] [[e12]]
4043
// CHECK: [[tval:%[0-9]+]] = OpCompositeConstruct %T [[tarr]]
4144
// CHECK: OpStore [[tptr]] [[tval]]
4245
T t = (T)(s);
4346
t_output[0] = t;
4447

4548
// CHECK: [[sptr:%[0-9]+]] = OpAccessChain %_ptr_Uniform_S %s_output %int_0 %uint_0
46-
// CHECK: [[sval:%[0-9]+]] = OpCompositeConstruct %S
49+
// CHECK: [[sval:%[0-9]+]] = OpCompositeConstruct %S [[mat]]
4750
// CHECK: OpStore [[sptr]] [[sval]]
4851
s = (S)t;
4952
s_output[0] = s;

tools/clang/test/CodeGenSPIRV/type.rwstructured-buffer.array.counter.indirect.hlsl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ void func(RWStructuredBuffer<uint> local) {
2020

2121
float4 main(PSInput input) : SV_TARGET
2222
{
23-
// CHECK: [[ac2:%[0-9]+]] = OpAccessChain %_ptr_Uniform_int %counter_var_g_rwbuffer {{%[0-9]+}} %uint_0
23+
// CHECK: [[counter_struct:%[0-9]+]] = OpAccessChain %_ptr_Uniform_type_ACSBuffer_counter %counter_var_g_rwbuffer {{%[0-9]+}}
24+
// CHECK: [[ac2:%[0-9]+]] = OpAccessChain %_ptr_Uniform_int [[counter_struct]] %uint_0
2425
// CHECK: OpAtomicIAdd %int [[ac2]] %uint_1 %uint_0 %int_1
2526
func(g_rwbuffer[input.idx]);
2627

27-
// CHECK: [[ac2_0:%[0-9]+]] = OpAccessChain %_ptr_Uniform_uint %g_rwbuffer {{%[0-9]+}} %int_0 %uint_0
28+
// CHECK: [[rwbuffer_struct:%[0-9]+]] = OpAccessChain %_ptr_Uniform_type_RWStructuredBuffer_uint %g_rwbuffer {{%[0-9]+}}
29+
// CHECK: [[ac2_0:%[0-9]+]] = OpAccessChain %_ptr_Uniform_uint [[rwbuffer_struct]] %int_0 %uint_0
2830
// CHECK: OpLoad %uint [[ac2_0]]
2931
return g_rwbuffer[input.idx][0];
3032
}

tools/clang/test/CodeGenSPIRV/type.rwstructured-buffer.array.counter.indirect2.hlsl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ float4 main(PSInput input) : SV_TARGET
1818
{
1919
RWStructuredBuffer<uint> l_rwbuffer[5] = g_rwbuffer;
2020

21-
// CHECK: [[ac2:%[0-9]+]] = OpAccessChain %_ptr_Uniform_int %counter_var_g_rwbuffer %int_0 %uint_0
21+
// CHECK: [[counter_struct:%[0-9]+]] = OpAccessChain %_ptr_Uniform_type_ACSBuffer_counter %counter_var_g_rwbuffer %int_0
22+
// CHECK: [[ac2:%[0-9]+]] = OpAccessChain %_ptr_Uniform_int [[counter_struct]] %uint_0
2223
// CHECK: OpAtomicIAdd %int [[ac2]] %uint_1 %uint_0 %int_1
2324
l_rwbuffer[0].IncrementCounter();
2425

25-
// CHECK: [[ac2_0:%[0-9]+]] = OpAccessChain %_ptr_Uniform_uint %g_rwbuffer {{%[0-9]+}} %int_0 %uint_0
26+
// CHECK: [[rwbuffer_struct:%[0-9]+]] = OpAccessChain %_ptr_Uniform_type_RWStructuredBuffer_uint %g_rwbuffer {{%[0-9]+}}
27+
// CHECK: [[ac2_0:%[0-9]+]] = OpAccessChain %_ptr_Uniform_uint [[rwbuffer_struct]] %int_0 %uint_0
2628
// CHECK: OpLoad %uint [[ac2_0]]
2729
return l_rwbuffer[input.idx][0];
2830
}

tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resources.optimized.hlsl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
// Check the names
44
//
55
// CHECK: OpName %secondGlobal_t "secondGlobal.t"
6-
// CHECK: OpName %[[fg0:firstGlobal_[0-9]+__t]] "firstGlobal{{.*}}.t"
7-
// CHECK: OpName %[[fg1:firstGlobal_[0-9]+__t]] "firstGlobal{{.*}}.t"
8-
// CHECK: OpName %[[fg2:firstGlobal_[0-9]+__t]] "firstGlobal{{.*}}.t"
9-
// CHECK: OpName %[[fg3:firstGlobal_[0-9]+__t]] "firstGlobal{{.*}}.t"
6+
// CHECK: OpName %[[fg0:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.t"
7+
// CHECK: OpName %[[fg1:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.t"
8+
// CHECK: OpName %[[fg2:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.t"
9+
// CHECK: OpName %[[fg3:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.t"
1010
// CHECK: OpName %secondGlobal_tt_0__s "secondGlobal.tt[0].s"
1111
// CHECK: OpName %secondGlobal_tt_1__s "secondGlobal.tt[1].s"
12-
// CHECK: OpName %[[fgtt0_0:firstGlobal_[0-9]+__tt_0__s]] "firstGlobal{{.*}}.tt[0].s"
13-
// CHECK: OpName %[[fgtt0_1:firstGlobal_[0-9]+__tt_1__s]] "firstGlobal{{.*}}.tt[1].s"
14-
// CHECK: OpName %[[fgtt1_0:firstGlobal_[0-9]+__tt_0__s]] "firstGlobal{{.*}}.tt[0].s"
15-
// CHECK: OpName %[[fgtt1_1:firstGlobal_[0-9]+__tt_1__s]] "firstGlobal{{.*}}.tt[1].s"
16-
// CHECK: OpName %[[fgtt2_0:firstGlobal_[0-9]+__tt_0__s]] "firstGlobal{{.*}}.tt[0].s"
17-
// CHECK: OpName %[[fgtt2_1:firstGlobal_[0-9]+__tt_1__s]] "firstGlobal{{.*}}.tt[1].s"
18-
// CHECK: OpName %[[fgtt3_0:firstGlobal_[0-9]+__tt_0__s]] "firstGlobal{{.*}}.tt[0].s"
19-
// CHECK: OpName %[[fgtt3_1:firstGlobal_[0-9]+__tt_1__s]] "firstGlobal{{.*}}.tt[1].s"
12+
// CHECK: OpName %[[fgtt0_0:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.tt[0].s"
13+
// CHECK: OpName %[[fgtt0_1:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.tt[1].s"
14+
// CHECK: OpName %[[fgtt1_0:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.tt[0].s"
15+
// CHECK: OpName %[[fgtt1_1:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.tt[1].s"
16+
// CHECK: OpName %[[fgtt2_0:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.tt[0].s"
17+
// CHECK: OpName %[[fgtt2_1:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.tt[1].s"
18+
// CHECK: OpName %[[fgtt3_0:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.tt[0].s"
19+
// CHECK: OpName %[[fgtt3_1:[0-9A-Za-z_]+]] "firstGlobal{{.*}}.tt[1].s"
2020

2121
// Check flattening of bindings
2222
// Explanation: Only the resources that are used will have a binding assignment

tools/clang/test/CodeGenSPIRV/vk.spec-constant.reuse.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
[shader("pixel")]
77
float4 main(float4 position : SV_Position) : SV_Target0 {
8-
// CHECK: OpConstantComposite %v4bool %y %y %y %y
8+
// CHECK: OpSpecConstantComposite %v4bool %y %y %y %y
99
return y ? position : 1.0;
1010
}

0 commit comments

Comments
 (0)