Jelajahi Sumber

[spirv] Update SPIRV-Tools and SPIRV-Headers (#2431)

This also picks up the change that adds OpName for flattened resource
arrays.
Ehsan 6 tahun lalu
induk
melakukan
99d1561514

+ 1 - 1
external/SPIRV-Headers

@@ -1 +1 @@
-Subproject commit 29c11140baaf9f7fdaa39a583672c556bf1795a1
+Subproject commit 059a49598c3c8e4113a67aebd93a0c2b973754de

+ 1 - 1
external/SPIRV-Tools

@@ -1 +1 @@
-Subproject commit bbd80462f5c89e9a225edabaca1215032c62e459
+Subproject commit 1eb89172a82b436d8037e8a8c29c80f7e1f7df74

+ 14 - 14
tools/clang/test/CodeGenSPIRV/vk.binding.cl.flatten-arrays.example1-optimized.hlsl

@@ -2,21 +2,21 @@
 
 // CHECK: OpDecorate %AnotherTexture Binding 5
 // CHECK: OpDecorate %NextTexture Binding 6
-// CHECK: OpDecorate [[MyTextures0:%\d+]] Binding 0
-// CHECK: OpDecorate [[MyTextures1:%\d+]] Binding 1
-// CHECK: OpDecorate [[MyTextures2:%\d+]] Binding 2
-// CHECK: OpDecorate [[MyTextures3:%\d+]] Binding 3
-// CHECK: OpDecorate [[MyTextures4:%\d+]] Binding 4
-// CHECK: OpDecorate [[MySamplers0:%\d+]] Binding 7
-// CHECK: OpDecorate [[MySamplers1:%\d+]] Binding 8
+// CHECK: OpDecorate %MyTextures_0_ Binding 0
+// CHECK: OpDecorate %MyTextures_1_ Binding 1
+// CHECK: OpDecorate %MyTextures_2_ Binding 2
+// CHECK: OpDecorate %MyTextures_3_ Binding 3
+// CHECK: OpDecorate %MyTextures_4_ Binding 4
+// CHECK: OpDecorate %MySamplers_0_ Binding 7
+// CHECK: OpDecorate %MySamplers_1_ Binding 8
 
-// CHECK: [[MyTextures0]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[MyTextures1]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[MyTextures2]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[MyTextures3]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[MyTextures4]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[MySamplers0]] = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant
-// CHECK: [[MySamplers1]] = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant
+// CHECK: %MyTextures_0_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %MyTextures_1_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %MyTextures_2_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %MyTextures_3_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %MyTextures_4_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %MySamplers_0_ = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant
+// CHECK: %MySamplers_1_ = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant
 Texture2D    MyTextures[5] : register(t0);
 Texture2D    NextTexture;  // This is suppose to be t6.
 Texture2D    AnotherTexture : register(t5);

+ 14 - 14
tools/clang/test/CodeGenSPIRV/vk.binding.cl.flatten-arrays.example2-optimized.hlsl

@@ -3,21 +3,21 @@
 // CHECK: OpDecorate %AnotherTexture Binding 3
 // CHECK: OpDecorate %MySampler Binding 2
 // CHECK: OpDecorate %MySampler2 Binding 9
-// CHECK: OpDecorate [[MyTextures0:%\d+]] Binding 4
-// CHECK: OpDecorate [[MyTextures1:%\d+]] Binding 5
-// CHECK: OpDecorate [[MyTextures2:%\d+]] Binding 6
-// CHECK: OpDecorate [[MyTextures3:%\d+]] Binding 7
-// CHECK: OpDecorate [[MyTextures4:%\d+]] Binding 8
-// CHECK: OpDecorate [[MyTextures20:%\d+]] Binding 0
-// CHECK: OpDecorate [[MyTextures21:%\d+]] Binding 1
+// CHECK: OpDecorate %MyTextures_0_ Binding 4
+// CHECK: OpDecorate %MyTextures_1_ Binding 5
+// CHECK: OpDecorate %MyTextures_2_ Binding 6
+// CHECK: OpDecorate %MyTextures_3_ Binding 7
+// CHECK: OpDecorate %MyTextures_4_ Binding 8
+// CHECK: OpDecorate %MyTextures2_0_ Binding 0
+// CHECK: OpDecorate %MyTextures2_1_ Binding 1
 
-// CHECK:  [[MyTextures0:%\d+]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK:  [[MyTextures1:%\d+]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK:  [[MyTextures2:%\d+]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK:  [[MyTextures3:%\d+]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK:  [[MyTextures4:%\d+]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[MyTextures20:%\d+]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[MyTextures21:%\d+]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK:  %MyTextures_0_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK:  %MyTextures_1_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK:  %MyTextures_2_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK:  %MyTextures_3_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK:  %MyTextures_4_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %MyTextures2_0_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %MyTextures2_1_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
 
 Texture2D    MyTextures[5]; // five array elements cannot fit in [0-2] binding slots, so it should take slot [4-8].
 Texture2D    AnotherTexture : register(t3); // force binding number 3.

+ 9 - 9
tools/clang/test/CodeGenSPIRV/vk.binding.cl.flatten-arrays.example3.hlsl

@@ -12,15 +12,15 @@ struct PS_OUTPUT {
 
 SamplerState		S;
 
-// CHECK: OpDecorate [[elem1:%\d+]] Binding 1
-// CHECK: OpDecorate [[elem2:%\d+]] Binding 2
-// CHECK: OpDecorate [[elem3:%\d+]] Binding 3
-// CHECK: OpDecorate [[elem4:%\d+]] Binding 4
-
-// CHECK: [[elem1]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[elem2]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[elem3]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
-// CHECK: [[elem4]] = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: OpDecorate %T_0_ Binding 1
+// CHECK: OpDecorate %T_1_ Binding 2
+// CHECK: OpDecorate %T_2_ Binding 3
+// CHECK: OpDecorate %T_3_ Binding 4
+
+// CHECK: %T_0_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %T_1_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %T_2_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
+// CHECK: %T_3_ = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant
 
 Texture2D<float>	T[4];