Skip to content

Commit f600cb3

Browse files
committed
Fix tests
1 parent 5a5c6f0 commit f600cb3

10 files changed

Lines changed: 3 additions & 77 deletions

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.access.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
vk::SampledTexture2D<float4> tex2d;
99

1010
void main() {
11-
// CHECK: [[pos1:%[0-9]+]] = OpLoad %v2uint %pos1
11+
// CHECK: OpStore %pos1 [[cu12]]
12+
// CHECK-NEXT: [[pos1:%[0-9]+]] = OpLoad %v2uint %pos1
1213
// CHECK-NEXT: [[tex1_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_2d_sampled_image]] %tex2d
1314
// CHECK-NEXT: [[tex_img:%[0-9]+]] = OpImage [[type_2d_image]] [[tex1_load]]
1415
// CHECK-NEXT: [[result1:%[0-9]+]] = OpImageFetch %v4float [[tex_img]] [[pos1]] Lod %uint_0

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.gather-cmp-red.hlsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
// CHECK: [[v2fc:%[0-9]+]] = OpConstantComposite %v2float %float_0_5 %float_0_25
66
// CHECK: [[v2ic:%[0-9]+]] = OpConstantComposite %v2int %int_2 %int_3
7-
// CHECK: [[v3fc:%[0-9]+]] = OpConstantComposite %v3float %float_0_5 %float_0_25 %float_0
87

98
// CHECK: [[type_2d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 2D 0 0 0 1 Unknown
109
// CHECK: [[type_2d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_2d_image]]

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.get-dimensions.hlsl

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,6 @@ void main() {
7272
// CHECK-NEXT: OpStore %i_height [[query_1_int]]
7373
tex2d.GetDimensions(i_width, i_height);
7474

75-
// CHECK: [[t1d_load:%[0-9]+]] = OpLoad [[type_1d_sampled_image]] %tex1d
76-
// CHECK-NEXT: [[image1d:%[0-9]+]] = OpImage [[type_1d_image]] [[t1d_load]]
77-
// CHECK-NEXT: [[query1d:%[0-9]+]] = OpImageQuerySizeLod %uint [[image1d]] %int_0
78-
// CHECK-NEXT: OpStore %width [[query1d]]
79-
tex1d.GetDimensions(width);
80-
81-
// CHECK: [[t1da_load:%[0-9]+]] = OpLoad [[type_1d_sampled_image_array]] %tex1dArray
82-
// CHECK-NEXT: [[image1da:%[0-9]+]] = OpImage [[type_1d_image_array]] [[t1da_load]]
83-
// CHECK-NEXT: [[query1da:%[0-9]+]] = OpImageQuerySizeLod %v2uint [[image1da]] %int_0
84-
// CHECK-NEXT: [[query1da0:%[0-9]+]] = OpCompositeExtract %uint [[query1da]] 0
85-
// CHECK-NEXT: OpStore %width [[query1da0]]
86-
// CHECK-NEXT: [[query1da1:%[0-9]+]] = OpCompositeExtract %uint [[query1da]] 1
87-
// CHECK-NEXT: OpStore %elements [[query1da1]]
88-
tex1dArray.GetDimensions(width, elements);
89-
9075
// CHECK: [[t1_load:%[0-9]+]] = OpLoad [[type_2d_sampled_image]] %tex2d
9176
// CHECK-NEXT: [[image2:%[0-9]+]] = OpImage [[type_2d_image]] [[t1_load]]
9277
// CHECK-NEXT: [[mip:%[0-9]+]] = OpLoad %uint %mipLevel
@@ -102,13 +87,6 @@ void main() {
10287
// CHECK-NEXT: OpStore %i_numLevels [[query_level_2_int]]
10388
tex2d.GetDimensions(mipLevel, i_width, i_height, i_numLevels);
10489

105-
// CHECK: [[t3d_load:%[0-9]+]] = OpLoad [[type_3d_sampled_image]] %tex3d
106-
// CHECK-NEXT: [[image3d:%[0-9]+]] = OpImage [[type_3d_image]] [[t3d_load]]
107-
// CHECK-NEXT: [[query3d:%[0-9]+]] = OpImageQuerySizeLod %v3uint [[image3d]] %int_0
108-
// CHECK-NEXT: [[query3d_0:%[0-9]+]] = OpCompositeExtract %uint [[query3d]] 0
109-
// CHECK-NEXT: OpStore %width [[query3d_0]]
110-
tex3d.GetDimensions(width, height, elements);
111-
11290
#ifdef ERROR
11391
// ERROR: error: Output argument must be an l-value
11492
tex2d.GetDimensions(mipLevel, 0, height, numLevels);

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.sample-bias.hlsl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,5 @@ float4 main() : SV_Target {
3131
uint status;
3232
float4 val4 = tex2d.SampleBias(float2(0.5, 0.25), 0.5f, int2(2, 3), 2.5f, status);
3333

34-
// CHECK: [[tex1d_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_1d_sampled_image]] %tex1d
35-
// CHECK: [[sampled_1d:%[a-zA-Z0-9_]+]] = OpImageSampleImplicitLod %v4float [[tex1d_load]] %float_0_5 Bias|ConstOffset %float_0_5 %int_1
36-
float4 val5 = tex1d.SampleBias(0.5, 0.5f, 1);
37-
38-
// CHECK: [[tex1da_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_1d_sampled_image_array]] %tex1dArray
39-
// CHECK: [[sampled_1da:%[a-zA-Z0-9_]+]] = OpImageSampleImplicitLod %v4float [[tex1da_load]] {{%[0-9]+}} Bias|ConstOffset %float_0_5 %int_1
40-
float4 val6 = tex1dArray.SampleBias(float2(0.5, 0), 0.5f, 1);
41-
42-
// CHECK: [[tex3d_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_3d_sampled_image]] %tex3d
43-
// CHECK: [[sampled_3d:%[a-zA-Z0-9_]+]] = OpImageSampleImplicitLod %v4float [[tex3d_load]] [[v3fc]] Bias|ConstOffset %float_0_5 [[v3ic]]
44-
float4 val7 = tex3d.SampleBias(float3(0.5, 0.25, 0), 0.5f, int3(1, 2, 3));
45-
4634
return 1.0;
4735
}

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.sample-cmp-bias.hlsl

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@
66
// CHECK: [[v2fc:%[0-9]+]] = OpConstantComposite %v2float %float_0_5 %float_0_25
77
// CHECK: [[v2ic:%[0-9]+]] = OpConstantComposite %v2int %int_2 %int_3
88

9-
// CHECK: [[type_1d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 1D 0 0 0 1 Unknown
10-
// CHECK: [[type_1d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_1d_image]]
11-
// CHECK: [[type_1d_image_array:%[a-zA-Z0-9_]+]] = OpTypeImage %float 1D 0 1 0 1 Unknown
12-
// CHECK: [[type_1d_sampled_image_array:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_1d_image_array]]
139
// CHECK: [[type_2d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 2D 0 0 0 1 Unknown
1410
// CHECK: [[type_2d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_2d_image]]
1511

16-
vk::SampledTexture1D<float4> tex1d;
17-
vk::SampledTexture1DArray<float4> tex1dArray;
1812
vk::SampledTexture2D<float4> tex2d;
1913

2014
float4 main() : SV_Target {
@@ -37,21 +31,5 @@ float4 main() : SV_Target {
3731
uint status;
3832
float val4 = tex2d.SampleCmpBias(float2(0.5, 0.25), 1.0f, 0.5f, int2(2, 3), 2.5f, status);
3933

40-
// CHECK: [[tex1d_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_1d_sampled_image]] %tex1d
41-
// CHECK: [[sampled_1d:%[a-zA-Z0-9_]+]] = OpImageSampleDrefImplicitLod %float [[tex1d_load]] %float_0_5 %float_1 Bias %float_0_5
42-
float val5 = tex1d.SampleCmpBias(0.5, 1.0f, 0.5f);
43-
44-
// CHECK: [[tex1da_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_1d_sampled_image_array]] %tex1dArray
45-
// CHECK: [[sampled_1da:%[a-zA-Z0-9_]+]] = OpImageSampleDrefImplicitLod %float [[tex1da_load]] {{%[0-9]+}} %float_1 Bias %float_0_5
46-
float val6 = tex1dArray.SampleCmpBias(float2(0.5, 0), 1.0f, 0.5f);
47-
48-
// CHECK: [[tex1d_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_1d_sampled_image]] %tex1d
49-
// CHECK: [[sampled_1d:%[a-zA-Z0-9_]+]] = OpImageSampleDrefImplicitLod %float [[tex1d_load]] %float_0_5 %float_1 Bias %float_0_5
50-
float val5 = tex1d.SampleCmpBias(0.5, 1.0f, 0.5f);
51-
52-
// CHECK: [[tex1da_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_1d_sampled_image_array]] %tex1dArray
53-
// CHECK: [[sampled_1da:%[a-zA-Z0-9_]+]] = OpImageSampleDrefImplicitLod %float [[tex1da_load]] {{%[0-9]+}} %float_1 Bias %float_0_5
54-
float val6 = tex1dArray.SampleCmpBias(float2(0.5, 0), 1.0f, 0.5f);
55-
5634
return 1.0;
5735
}

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.sample-cmp-grad.hlsl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,9 @@
88
// CHECK: [[v2f_2:%[0-9]+]] = OpConstantComposite %v2float %float_2 %float_2
99
// CHECK: [[v2ic:%[0-9]+]] = OpConstantComposite %v2int %int_2 %int_3
1010

11-
// CHECK: [[type_1d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 1D 0 0 0 1 Unknown
12-
// CHECK: [[type_1d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_1d_image]]
13-
// CHECK: [[type_1d_image_array:%[a-zA-Z0-9_]+]] = OpTypeImage %float 1D 0 1 0 1 Unknown
14-
// CHECK: [[type_1d_sampled_image_array:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_1d_image_array]]
1511
// CHECK: [[type_2d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 2D 0 0 0 1 Unknown
1612
// CHECK: [[type_2d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_2d_image]]
1713

18-
vk::SampledTexture1D<float4> tex1d;
19-
vk::SampledTexture1DArray<float4> tex1dArray;
2014
vk::SampledTexture2D<float4> tex2d;
2115

2216
float4 main() : SV_Target {
@@ -39,13 +33,5 @@ float4 main() : SV_Target {
3933
uint status;
4034
float val4 = tex2d.SampleCmpGrad(float2(0.5, 0.25), 1.0f, float2(1, 1), float2(2, 2), int2(2,3), 0.5, status);
4135

42-
// CHECK: [[tex1d_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_1d_sampled_image]] %tex1d
43-
// CHECK: [[sampled_1d:%[a-zA-Z0-9_]+]] = OpImageSampleDrefExplicitLod %float [[tex1d_load]] %float_0_5 %float_1 Grad %float_1 %float_2
44-
float val5 = tex1d.SampleCmpGrad(0.5, 1.0f, 1.0f, 2.0f);
45-
46-
// CHECK: [[tex1da_load:%[a-zA-Z0-9_]+]] = OpLoad [[type_1d_sampled_image_array]] %tex1dArray
47-
// CHECK: [[sampled_1da:%[a-zA-Z0-9_]+]] = OpImageSampleDrefExplicitLod %float [[tex1da_load]] {{%[0-9]+}} %float_1 Grad %float_1 %float_2
48-
float val6 = tex1dArray.SampleCmpGrad(float2(0.5, 0), 1.0f, 1.0f, 2.0f);
49-
5036
return 1.0;
5137
}

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.sample-cmp-level-zero.hlsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
// CHECK: [[v2fc:%[0-9]+]] = OpConstantComposite %v2float %float_0_5 %float_0_25
66
// CHECK: [[v2ic:%[0-9]+]] = OpConstantComposite %v2int %int_2 %int_3
7-
// CHECK: [[v3fc:%[0-9]+]] = OpConstantComposite %v3float %float_0_5 %float_0_25 %float_0
87

98
// CHECK: [[type_2d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 2D 0 0 0 1 Unknown
109
// CHECK: [[type_2d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_2d_image]]

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.sample-cmp-level.hlsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
// CHECK: [[v2fc:%[0-9]+]] = OpConstantComposite %v2float %float_0_5 %float_0_25
66
// CHECK: [[v2ic:%[0-9]+]] = OpConstantComposite %v2int %int_2 %int_3
7-
// CHECK: [[v3fc:%[0-9]+]] = OpConstantComposite %v3float %float_0_5 %float_0_25 %float_0
87

98
// CHECK: [[type_2d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 2D 0 0 0 1 Unknown
109
// CHECK: [[type_2d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_2d_image]]

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.sample-cmp.hlsl

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

66
// CHECK: [[v2fc:%[0-9]+]] = OpConstantComposite %v2float %float_0_5 %float_0_25
77
// CHECK: [[v2ic:%[0-9]+]] = OpConstantComposite %v2int %int_2 %int_3
8-
// CHECK: [[v3fc:%[0-9]+]] = OpConstantComposite %v3float %float_0_5 %float_0_25 %float_0
98

109
// CHECK: [[type_2d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 2D 0 0 0 1 Unknown
1110
// CHECK: [[type_2d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_2d_image]]
@@ -32,5 +31,5 @@ float4 main() : SV_Target {
3231
uint status;
3332
float val4 = tex2d.SampleCmp(float2(0.5, 0.25), 2.0f, int2(2,3), 0.5, status);
3433

35-
return 1.0;
34+
return 1.0;
3635
}

tools/clang/test/CodeGenSPIRV/SampledTexture/SampledTexture2D/vk.sampledtexture2d.sample-grad.hlsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// CHECK: [[v2f_1:%[0-9]+]] = OpConstantComposite %v2float %float_1 %float_1
88
// CHECK: [[v2f_2:%[0-9]+]] = OpConstantComposite %v2float %float_2 %float_2
99
// CHECK: [[v2ic:%[0-9]+]] = OpConstantComposite %v2int %int_2 %int_3
10-
// CHECK: [[v3fc:%[0-9]+]] = OpConstantComposite %v3float %float_0_5 %float_0_25 %float_0
1110

1211
// CHECK: [[type_2d_image:%[a-zA-Z0-9_]+]] = OpTypeImage %float 2D 0 0 0 1 Unknown
1312
// CHECK: [[type_2d_sampled_image:%[a-zA-Z0-9_]+]] = OpTypeSampledImage [[type_2d_image]]

0 commit comments

Comments
 (0)