From 0e58bbd5aafdb54ed566a3859aae24c468e01fd2 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 12 Jan 2018 11:24:37 -0500 Subject: [PATCH] Update known-good spirv-tools. Optimizations used in HLSL legalization now sweep away unused types. --- .../hlsl.aliasOpaque.frag.out | 5 ----- .../hlsl.flattenOpaque.frag.out | 7 ------ .../hlsl.flattenOpaqueInit.vert.out | 4 ---- .../hlsl.flattenOpaqueInitMix.vert.out | 5 ----- .../hlsl.flattenSubset.frag.out | 22 +------------------ .../hlsl.flattenSubset2.frag.out | 13 ----------- .../hlsl.partialFlattenLocal.vert.out | 8 ------- .../hlsl.partialFlattenMixed.vert.out | 12 +--------- known_good.json | 2 +- 9 files changed, 3 insertions(+), 75 deletions(-) diff --git a/Test/baseLegalResults/hlsl.aliasOpaque.frag.out b/Test/baseLegalResults/hlsl.aliasOpaque.frag.out index d69c2963..3bf38eaf 100644 --- a/Test/baseLegalResults/hlsl.aliasOpaque.frag.out +++ b/Test/baseLegalResults/hlsl.aliasOpaque.frag.out @@ -11,10 +11,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" - Name 9 "OS" - MemberName 9(OS) 0 "ss" - MemberName 9(OS) 1 "a" - MemberName 9(OS) 2 "tex" Name 47 "gss" Name 51 "gtex" Name 62 "@entryPointOutput" @@ -26,7 +22,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 6: TypeSampler 7: TypeFloat 32 8: TypeImage 7(float) 2D sampled format:Unknown - 9(OS): TypeStruct 6 7(float) 8 11: TypeVector 7(float) 4 32: TypeSampledImage 8 34: TypeVector 7(float) 2 diff --git a/Test/baseLegalResults/hlsl.flattenOpaque.frag.out b/Test/baseLegalResults/hlsl.flattenOpaque.frag.out index dace2698..4b687450 100644 --- a/Test/baseLegalResults/hlsl.flattenOpaque.frag.out +++ b/Test/baseLegalResults/hlsl.flattenOpaque.frag.out @@ -11,11 +11,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" - Name 7 "os" - MemberName 7(os) 0 "s2D" - Name 23 "os2" - MemberName 23(os2) 0 "s2D" - MemberName 23(os2) 1 "tex" Name 38 "tex" Name 82 "s.s2D" Name 97 "s2.s2D" @@ -29,12 +24,10 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 2: TypeVoid 3: TypeFunction 2 6: TypeSampler - 7(os): TypeStruct 6 9: TypeFloat 32 10: TypeVector 9(float) 4 15: TypeVector 9(float) 2 22: TypeImage 9(float) 2D sampled format:Unknown - 23(os2): TypeStruct 6 22 37: TypePointer UniformConstant 22 38(tex): 37(ptr) Variable UniformConstant 45: TypeSampledImage 22 diff --git a/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out b/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out index 70128105..1ca88ad5 100644 --- a/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out +++ b/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out @@ -10,9 +10,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize EntryPoint Vertex 4 "main" 80 Source HLSL 500 Name 4 "main" - Name 9 "FxaaTex" - MemberName 9(FxaaTex) 0 "smpl" - MemberName 9(FxaaTex) 1 "tex" Name 43 "g_tInputTexture_sampler" Name 47 "g_tInputTexture" Name 80 "@entryPointOutput" @@ -24,7 +21,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 6: TypeSampler 7: TypeFloat 32 8: TypeImage 7(float) 2D sampled format:Unknown - 9(FxaaTex): TypeStruct 6 8 11: TypeVector 7(float) 4 31: TypeSampledImage 8 33: TypeVector 7(float) 2 diff --git a/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out b/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out index b6079b0d..ee8126c6 100644 --- a/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out +++ b/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out @@ -10,10 +10,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize EntryPoint Vertex 4 "main" 57 Source HLSL 500 Name 4 "main" - Name 9 "FxaaTex" - MemberName 9(FxaaTex) 0 "smpl" - MemberName 9(FxaaTex) 1 "tex" - MemberName 9(FxaaTex) 2 "f" Name 44 "g_tInputTexture_sampler" Name 47 "g_tInputTexture" Name 57 "@entryPointOutput" @@ -25,7 +21,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 6: TypeSampler 7: TypeFloat 32 8: TypeImage 7(float) 2D sampled format:Unknown - 9(FxaaTex): TypeStruct 6 8 7(float) 11: TypeVector 7(float) 4 28: TypeSampledImage 8 36: TypeVector 7(float) 2 diff --git a/Test/baseLegalResults/hlsl.flattenSubset.frag.out b/Test/baseLegalResults/hlsl.flattenSubset.frag.out index 8eedabae..c18a9e9e 100755 --- a/Test/baseLegalResults/hlsl.flattenSubset.frag.out +++ b/Test/baseLegalResults/hlsl.flattenSubset.frag.out @@ -2,7 +2,7 @@ hlsl.flattenSubset.frag WARNING: AST will form illegal SPIR-V; need to transform to legalize // Module Version 10000 // Generated by (magic number): 80003 -// Id's are bound by 72 +// Id's are bound by 66 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -11,23 +11,7 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" - Name 15 "S0" - MemberName 15(S0) 0 "x" - MemberName 15(S0) 1 "y" - MemberName 15(S0) 2 "ss" - Name 16 "S1" - MemberName 16(S1) 0 "b" - MemberName 16(S1) 1 "samplerState" - MemberName 16(S1) 2 "s0" - MemberName 16(S1) 3 "a" Name 21 "samp" - Name 25 "S2" - MemberName 25(S2) 0 "a1" - MemberName 25(S2) 1 "a2" - MemberName 25(S2) 2 "a3" - MemberName 25(S2) 3 "a4" - MemberName 25(S2) 4 "a5" - MemberName 25(S2) 5 "resources" Name 33 "tex" Name 47 "vpos" Name 50 "@entryPointOutput" @@ -40,12 +24,8 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 6: TypeFloat 32 7: TypeVector 6(float) 4 13: TypeSampler - 14: TypeInt 32 1 - 15(S0): TypeStruct 14(int) 14(int) 13 - 16(S1): TypeStruct 6(float) 13 15(S0) 14(int) 20: TypePointer UniformConstant 13 21(samp): 20(ptr) Variable UniformConstant - 25(S2): TypeStruct 14(int) 14(int) 14(int) 14(int) 14(int) 16(S1) 31: TypeImage 6(float) 2D sampled format:Unknown 32: TypePointer UniformConstant 31 33(tex): 32(ptr) Variable UniformConstant diff --git a/Test/baseLegalResults/hlsl.flattenSubset2.frag.out b/Test/baseLegalResults/hlsl.flattenSubset2.frag.out index af394c70..e4f43429 100755 --- a/Test/baseLegalResults/hlsl.flattenSubset2.frag.out +++ b/Test/baseLegalResults/hlsl.flattenSubset2.frag.out @@ -11,15 +11,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" - Name 14 "Nested" - MemberName 14(Nested) 0 "y" - MemberName 14(Nested) 1 "texNested" - Name 15 "A" - MemberName 15(A) 0 "n" - MemberName 15(A) 1 "x" - Name 25 "B" - MemberName 25(B) 0 "n" - MemberName 25(B) 1 "tex" Name 49 "vpos" Name 52 "@entryPointOutput" Decorate 49(vpos) Location 0 @@ -28,10 +19,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 - 13: TypeImage 6(float) 2D sampled format:Unknown - 14(Nested): TypeStruct 6(float) 13 - 15(A): TypeStruct 14(Nested) 6(float) - 25(B): TypeStruct 14(Nested) 13 43: 6(float) Constant 0 44: 7(fvec4) ConstantComposite 43 43 43 43 48: TypePointer Input 7(fvec4) diff --git a/Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out b/Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out index d3e66608..06d125d1 100755 --- a/Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out +++ b/Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out @@ -10,12 +10,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize EntryPoint Vertex 4 "main" 83 86 Source HLSL 500 Name 4 "main" - Name 22 "Packed" - MemberName 22(Packed) 0 "tex" - MemberName 22(Packed) 1 "pos" - MemberName 22(Packed) 2 "uv" - MemberName 22(Packed) 3 "x" - MemberName 22(Packed) 4 "n" Name 83 "pos" Name 86 "@entryPointOutput" Decorate 83(pos) Location 0 @@ -24,7 +18,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 - 13: TypeImage 6(float) 2D sampled format:Unknown 14: TypeVector 6(float) 3 15: TypeInt 32 0 16: 15(int) Constant 3 @@ -33,7 +26,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 19: 15(int) Constant 2 20: TypeArray 18(fvec2) 19 21: TypeInt 32 1 - 22(Packed): TypeStruct 13 17 20 6(float) 21(int) 25: 21(int) Constant 0 31: 21(int) Constant 1 32: 6(float) Constant 0 diff --git a/Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out b/Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out index 3ad17631..ce9ec885 100755 --- a/Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out +++ b/Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out @@ -2,7 +2,7 @@ hlsl.partialFlattenMixed.vert WARNING: AST will form illegal SPIR-V; need to transform to legalize // Module Version 10000 // Generated by (magic number): 80003 -// Id's are bound by 45 +// Id's are bound by 36 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -10,10 +10,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize EntryPoint Vertex 4 "main" 32 35 Source HLSL 500 Name 4 "main" - Name 18 "Packed" - MemberName 18(Packed) 0 "a" - MemberName 18(Packed) 1 "membTex" - MemberName 18(Packed) 2 "b" Name 32 "pos" Name 35 "@entryPointOutput" Decorate 32(pos) Location 0 @@ -22,12 +18,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 - 13: TypeInt 32 1 - 14: TypeImage 6(float) 2D sampled format:Unknown - 15: TypeInt 32 0 - 16: 15(int) Constant 2 - 17: TypeArray 14 16 - 18(Packed): TypeStruct 13(int) 17 13(int) 31: TypePointer Input 7(fvec4) 32(pos): 31(ptr) Variable Input 34: TypePointer Output 7(fvec4) diff --git a/known_good.json b/known_good.json index ac367bf9..49cad461 100644 --- a/known_good.json +++ b/known_good.json @@ -5,7 +5,7 @@ "site" : "github", "subrepo" : "KhronosGroup/SPIRV-Tools", "subdir" : "External/spirv-tools", - "commit" : "716718a5e969f6b4e73cbc864db59a754a83aab3" + "commit" : "eb0c73dad6102fc0d4f03c62fe910348bae43a11" }, { "name" : "spirv-tools/external/spirv-headers",