浏览代码

[spirv] Refresh SPIRV-Tools for new validation and bug fixes (#1615)

Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1598
Lei Zhang 6 年之前
父节点
当前提交
ef9d3fda8e

+ 1 - 1
external/SPIRV-Tools

@@ -1 +1 @@
-Subproject commit 5bc30788fd8acf1c73b2a33f4b5fea371b6c9094
+Subproject commit 6e85d1a6fc75c4d37ccf7772fbb05e11b4fd69b0

+ 1 - 4
tools/clang/test/CodeGenSPIRV/legal-examples/12-switch-stmt-select-fail.hlsl

@@ -1,9 +1,6 @@
 // Run: %dxc -T cs_6_0 -E main -O3
 
-// TODO: This example is expected to trigger validation failure. The validator
-// is not checking it yet.
-
-// CHECK: OpPhi %_ptr_Uniform_type_StructuredBuffer_S %gSBuffer1 {{%\d+}} %gSBuffer2 {{%\d+}}
+// CHECK: Using pointers with OpPhi requires capability
 
 struct S {
   float4 f;

+ 2 - 2
tools/clang/test/CodeGenSPIRV/legal-examples/19-multi-func-ret-fail.hlsl

@@ -1,6 +1,6 @@
 // Run: %dxc -T cs_6_0 -E main -O3
 
-// CHECK: Using pointers with OpSelect requires capability
+// CHECK: Using pointers with OpPhi requires capability
 
 struct S {
   float4 f;
@@ -13,7 +13,7 @@ RWStructuredBuffer<S> gRWSBuffer1;
 RWStructuredBuffer<S> gRWSBuffer2;
 
 RWStructuredBuffer<S> foo(int l) {
-  if (l == 0) {       // Compiler does not know which branch will be taken: 
+  if (l == 0) {       // Compiler does not know which branch will be taken:
                       // Branch taken depends on input i.
     return gRWSBuffer1;
   } else {

+ 2 - 3
tools/clang/unittests/SPIRV/CodeGenSPIRVTest.cpp

@@ -1706,9 +1706,8 @@ TEST_F(FileTest, LegalizationExample11) {
   runFileTest("legal-examples/11-if-stmt-const-ok.hlsl");
 }
 TEST_F(FileTest, LegalizationExample12) {
-  // TODO: this is expected to trigger ValFailure! Validator is not
-  // checking this case yet.
-  runFileTest("legal-examples/12-switch-stmt-select-fail.hlsl");
+  runFileTest("legal-examples/12-switch-stmt-select-fail.hlsl",
+              Expect::ValFailure);
 }
 TEST_F(FileTest, LegalizationExample13) {
   runFileTest("legal-examples/13-switch-stmt-const-ok.hlsl");