Browse Source

[spirv] Update SPIRV-Tools for bug fixes (#1585)

* Removed dangling OpDecorateId
* Stopped scalarizing spec constant sized arrays
* Added a bunch validation checks

Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1528
Lei Zhang 7 years ago
parent
commit
0b2ce6a5ee

+ 1 - 1
external/SPIRV-Tools

@@ -1 +1 @@
-Subproject commit 146eb3bdcf5b7dc021edb3ca9bb9aac18ae904c0
+Subproject commit 497958d899c3f5fb4a4bda1a942c6fd7c0132ba6

+ 4 - 1
tools/clang/test/CodeGenSPIRV/attribute.instance.gs.hlsl

@@ -2,6 +2,9 @@
 
 
 // CHECK: OpExecutionMode %main Invocations 42
 // CHECK: OpExecutionMode %main Invocations 42
 
 
+struct S { float4 val : VAL; };
+
 [maxvertexcount(2)]
 [maxvertexcount(2)]
 [instance(42)]
 [instance(42)]
-void main() {}
+void main(point in uint id[1] : VertexID, inout LineStream<S> outData) {
+}

+ 4 - 1
tools/clang/test/CodeGenSPIRV/attribute.instance.missing.gs.hlsl

@@ -2,5 +2,8 @@
 
 
 // CHECK: OpExecutionMode %main Invocations 1
 // CHECK: OpExecutionMode %main Invocations 1
 
 
+struct S { float4 val : VAL; };
+
 [maxvertexcount(2)]
 [maxvertexcount(2)]
-void main() {}
+void main(point in uint id[1] : VertexID, inout LineStream<S> outData) {
+}

+ 4 - 1
tools/clang/test/CodeGenSPIRV/attribute.max-vertex-count.hlsl

@@ -2,5 +2,8 @@
 
 
 // CHECK: OpExecutionMode %main OutputVertices 3
 // CHECK: OpExecutionMode %main OutputVertices 3
 
 
+struct S { float4 val : VAL; };
+
 [maxvertexcount(3)]
 [maxvertexcount(3)]
-void main() {}
+void main(point in uint id[1] : VertexID, inout LineStream<S> outData) {
+}

+ 4 - 1
tools/clang/test/CodeGenSPIRV/primitive.line.gs.hlsl

@@ -2,5 +2,8 @@
 
 
 // CHECK: OpExecutionMode %main InputLines
 // CHECK: OpExecutionMode %main InputLines
 
 
+struct S { float4 val : VAL; };
+
 [maxvertexcount(3)]
 [maxvertexcount(3)]
-void main(line in uint id[2] : VertexID) {}
+void main(line in uint id[2] : VertexID, inout LineStream<S> outData) {
+}

+ 4 - 1
tools/clang/test/CodeGenSPIRV/primitive.lineadj.gs.hlsl

@@ -2,5 +2,8 @@
 
 
 // CHECK: OpExecutionMode %main InputLinesAdjacency
 // CHECK: OpExecutionMode %main InputLinesAdjacency
 
 
+struct S { float4 val : VAL; };
+
 [maxvertexcount(3)]
 [maxvertexcount(3)]
-void main(lineadj in uint id[4] : VertexID) {}
+void main(lineadj in uint id[4] : VertexID, inout LineStream<S> outData) {
+}

+ 4 - 1
tools/clang/test/CodeGenSPIRV/primitive.point.gs.hlsl

@@ -2,5 +2,8 @@
 
 
 // CHECK: OpExecutionMode %main InputPoints
 // CHECK: OpExecutionMode %main InputPoints
 
 
+struct S { float4 val : VAL; };
+
 [maxvertexcount(3)]
 [maxvertexcount(3)]
-void main(point in uint id[1] : VertexID) {}
+void main(point in uint id[1] : VertexID, inout LineStream<S> outData) {
+}

+ 4 - 1
tools/clang/test/CodeGenSPIRV/primitive.triangle.gs.hlsl

@@ -2,5 +2,8 @@
 
 
 // CHECK: OpExecutionMode %main Triangles
 // CHECK: OpExecutionMode %main Triangles
 
 
+struct S { float4 val : VAL; };
+
 [maxvertexcount(3)]
 [maxvertexcount(3)]
-void main(triangle in uint i[3] : VertexID) {}
+void main(triangle in uint id[3] : VertexID, inout LineStream<S> outData) {
+}

+ 4 - 1
tools/clang/test/CodeGenSPIRV/primitive.triangleadj.gs.hlsl

@@ -2,5 +2,8 @@
 
 
 // CHECK: OpExecutionMode %main InputTrianglesAdjacency
 // CHECK: OpExecutionMode %main InputTrianglesAdjacency
 
 
+struct S { float4 val : VAL; };
+
 [maxvertexcount(3)]
 [maxvertexcount(3)]
-void main(triangleadj in uint id[6] : VertexID) {}
+void main(triangleadj in uint id[6] : VertexID, inout LineStream<S> outData) {
+}