HLSL: Flatten structs for all non-arrayed I/O interfaces.
authorJohn Kessenich <cepheus@frii.com>
Fri, 11 Aug 2017 06:17:26 +0000 (00:17 -0600)
committerJohn Kessenich <cepheus@frii.com>
Fri, 11 Aug 2017 06:17:26 +0000 (00:17 -0600)
15 files changed:
Test/baseResults/hlsl.domain.2.tese.out
Test/baseResults/hlsl.entry-in.frag.out
Test/baseResults/hlsl.multiDescriptorSet.frag.out
Test/baseResults/hlsl.scalarCast.vert.out
Test/baseResults/hlsl.semantic.geom.out
Test/baseResults/hlsl.semantic.vert.out
Test/baseResults/hlsl.struct.frag.out
Test/baseResults/hlsl.struct.split-1.vert.out
Test/baseResults/hlsl.struct.split.array.geom.out
Test/baseResults/hlsl.struct.split.assign.frag.out
Test/baseResults/hlsl.struct.split.call.vert.out
Test/baseResults/hlsl.struct.split.nested.geom.out
Test/baseResults/hlsl.structarray.flatten.geom.out
Test/baseResults/hlsl.structin.vert.out
hlsl/hlslParseHelper.cpp

index 75e2265..0f42131 100644 (file)
@@ -104,10 +104,7 @@ triangle order = none
 0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor,  temp float foo})
 0:25            Constant:
 0:25              2 (const int)
-0:25          foo: direct index for structure ( temp float)
-0:25            'pcf_data' (layout( location=2) patch in structure{ temp float foo})
-0:25            Constant:
-0:25              0 (const int)
+0:?           'pcf_data.foo' (layout( location=2) patch in float)
 0:25      move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
@@ -140,7 +137,7 @@ triangle order = none
 0:?     'tesscoord' ( patch in 3-component vector of float TessCoord)
 0:?     'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
-0:?     'pcf_data' (layout( location=2) patch in structure{ temp float foo})
+0:?     'pcf_data.foo' (layout( location=2) patch in float)
 
 
 Linked tessellation evaluation stage:
@@ -251,10 +248,7 @@ triangle order = none
 0:?             'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor,  temp float flInsideTessFactor,  temp float foo})
 0:25            Constant:
 0:25              2 (const int)
-0:25          foo: direct index for structure ( temp float)
-0:25            'pcf_data' (layout( location=2) patch in structure{ temp float foo})
-0:25            Constant:
-0:25              0 (const int)
+0:?           'pcf_data.foo' (layout( location=2) patch in float)
 0:25      move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' ( temp 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
 0:?         'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos,  temp 3-component vector of float norm})
@@ -287,16 +281,16 @@ triangle order = none
 0:?     'tesscoord' ( patch in 3-component vector of float TessCoord)
 0:?     'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
 0:?     'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
-0:?     'pcf_data' (layout( location=2) patch in structure{ temp float foo})
+0:?     'pcf_data.foo' (layout( location=2) patch in float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 101
+// Id's are bound by 98
 
                               Capability Tessellation
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint TessellationEvaluation 4  "main" 52 67 73 80 84 94 98
+                              EntryPoint TessellationEvaluation 4  "main" 52 67 71 77 81 91 95
                               ExecutionMode 4 Triangles
                               Source HLSL 500
                               Name 4  "main"
@@ -318,30 +312,27 @@ triangle order = none
                               Name 48  "pcf_data"
                               Name 52  "pcf_data.flTessFactor"
                               Name 67  "pcf_data.flInsideTessFactor"
-                              Name 71  "pcf_in_t"
-                              MemberName 71(pcf_in_t) 0  "foo"
-                              Name 73  "pcf_data"
-                              Name 78  "i"
-                              Name 80  "i"
-                              Name 82  "tesscoord"
-                              Name 84  "tesscoord"
-                              Name 86  "flattenTemp"
-                              Name 88  "param"
-                              Name 90  "param"
-                              Name 94  "@entryPointOutput.pos"
-                              Name 98  "@entryPointOutput.norm"
+                              Name 71  "pcf_data.foo"
+                              Name 75  "i"
+                              Name 77  "i"
+                              Name 79  "tesscoord"
+                              Name 81  "tesscoord"
+                              Name 83  "flattenTemp"
+                              Name 85  "param"
+                              Name 87  "param"
+                              Name 91  "@entryPointOutput.pos"
+                              Name 95  "@entryPointOutput.norm"
                               Decorate 52(pcf_data.flTessFactor) Patch
                               Decorate 52(pcf_data.flTessFactor) BuiltIn TessLevelOuter
                               Decorate 67(pcf_data.flInsideTessFactor) Patch
                               Decorate 67(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner
-                              MemberDecorate 71(pcf_in_t) 0 Patch
-                              Decorate 73(pcf_data) Patch
-                              Decorate 73(pcf_data) Location 2
-                              Decorate 80(i) Location 0
-                              Decorate 84(tesscoord) Patch
-                              Decorate 84(tesscoord) BuiltIn TessCoord
-                              Decorate 94(@entryPointOutput.pos) Location 0
-                              Decorate 98(@entryPointOutput.norm) Location 1
+                              Decorate 71(pcf_data.foo) Patch
+                              Decorate 71(pcf_data.foo) Location 2
+                              Decorate 77(i) Location 0
+                              Decorate 81(tesscoord) Patch
+                              Decorate 81(tesscoord) BuiltIn TessCoord
+                              Decorate 91(@entryPointOutput.pos) Location 0
+                              Decorate 95(@entryPointOutput.norm) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -375,26 +366,24 @@ triangle order = none
               65:             TypeArray 6(float) 64
               66:             TypePointer Input 65
 67(pcf_data.flInsideTessFactor):     66(ptr) Variable Input
-    71(pcf_in_t):             TypeStruct 6(float)
-              72:             TypePointer Input 71(pcf_in_t)
-    73(pcf_data):     72(ptr) Variable Input
-              77:             TypePointer Function 15
-              79:             TypePointer Input 15
-           80(i):     79(ptr) Variable Input
-              83:             TypePointer Input 13(fvec3)
-   84(tesscoord):     83(ptr) Variable Input
-              93:             TypePointer Output 12(fvec4)
-94(@entryPointOutput.pos):     93(ptr) Variable Output
-              97:             TypePointer Output 13(fvec3)
-98(@entryPointOutput.norm):     97(ptr) Variable Output
+71(pcf_data.foo):     53(ptr) Variable Input
+              74:             TypePointer Function 15
+              76:             TypePointer Input 15
+           77(i):     76(ptr) Variable Input
+              80:             TypePointer Input 13(fvec3)
+   81(tesscoord):     80(ptr) Variable Input
+              90:             TypePointer Output 12(fvec4)
+91(@entryPointOutput.pos):     90(ptr) Variable Output
+              94:             TypePointer Output 13(fvec3)
+95(@entryPointOutput.norm):     94(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
     48(pcf_data):     11(ptr) Variable Function
-           78(i):     77(ptr) Variable Function
-   82(tesscoord):     16(ptr) Variable Function
- 86(flattenTemp):     24(ptr) Variable Function
-       88(param):     11(ptr) Variable Function
-       90(param):     16(ptr) Variable Function
+           75(i):     74(ptr) Variable Function
+   79(tesscoord):     16(ptr) Variable Function
+ 83(flattenTemp):     24(ptr) Variable Function
+       85(param):     11(ptr) Variable Function
+       87(param):     16(ptr) Variable Function
               54:     53(ptr) AccessChain 52(pcf_data.flTessFactor) 27
               55:    6(float) Load 54
               56:     30(ptr) AccessChain 48(pcf_data) 27 27
@@ -411,27 +400,26 @@ triangle order = none
               69:    6(float) Load 68
               70:     30(ptr) AccessChain 48(pcf_data) 37
                               Store 70 69
-              74:     53(ptr) AccessChain 73(pcf_data) 27
-              75:    6(float) Load 74
-              76:     30(ptr) AccessChain 48(pcf_data) 60
-                              Store 76 75
-              81:          15 Load 80(i)
-                              Store 78(i) 81
-              85:   13(fvec3) Load 84(tesscoord)
-                              Store 82(tesscoord) 85
-              87:          15 Load 78(i)
-              89:10(pcf_in_t) Load 48(pcf_data)
-                              Store 88(param) 89
-              91:   13(fvec3) Load 82(tesscoord)
-                              Store 90(param) 91
-              92: 17(gs_in_t) FunctionCall 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;) 88(param) 87 90(param)
-                              Store 86(flattenTemp) 92
-              95:     35(ptr) AccessChain 86(flattenTemp) 27
-              96:   12(fvec4) Load 95
-                              Store 94(@entryPointOutput.pos) 96
-              99:     16(ptr) AccessChain 86(flattenTemp) 37
-             100:   13(fvec3) Load 99
-                              Store 98(@entryPointOutput.norm) 100
+              72:    6(float) Load 71(pcf_data.foo)
+              73:     30(ptr) AccessChain 48(pcf_data) 60
+                              Store 73 72
+              78:          15 Load 77(i)
+                              Store 75(i) 78
+              82:   13(fvec3) Load 81(tesscoord)
+                              Store 79(tesscoord) 82
+              84:          15 Load 75(i)
+              86:10(pcf_in_t) Load 48(pcf_data)
+                              Store 85(param) 86
+              88:   13(fvec3) Load 79(tesscoord)
+                              Store 87(param) 88
+              89: 17(gs_in_t) FunctionCall 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;) 85(param) 84 87(param)
+                              Store 83(flattenTemp) 89
+              92:     35(ptr) AccessChain 83(flattenTemp) 27
+              93:   12(fvec4) Load 92
+                              Store 91(@entryPointOutput.pos) 93
+              96:     16(ptr) AccessChain 83(flattenTemp) 37
+              97:   13(fvec3) Load 96
+                              Store 95(@entryPointOutput.norm) 97
                               Return
                               FunctionEnd
 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;): 17(gs_in_t) Function None 18
index 454b2f9..f274793 100755 (executable)
@@ -57,10 +57,7 @@ gl_FragCoord origin is upper left
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              0 (const int)
-0:13          v: direct index for structure ( temp 2-component vector of float)
-0:13            'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:13            Constant:
-0:13              0 (const int)
+0:?           'i.v' (layout( location=0) in 2-component vector of float)
 0:13        move second child to first child ( temp 4-component vector of float)
 0:13          fragCoord: direct index for structure ( temp 4-component vector of float)
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
@@ -72,10 +69,7 @@ gl_FragCoord origin is upper left
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              2 (const int)
-0:13          i2: direct index for structure ( flat temp 2-component vector of int)
-0:13            'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:13            Constant:
-0:13              1 (const int)
+0:?           'i.i2' (layout( location=1) flat in 2-component vector of int)
 0:13      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:13        Function Call: @PixelShaderFunction(struct-InParam-vf2-vf4-vi21; ( temp 4-component vector of float)
@@ -83,7 +77,8 @@ gl_FragCoord origin is upper left
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'i.fragCoord' ( in 4-component vector of float FragCoord)
-0:?     'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
+0:?     'i.v' (layout( location=0) in 2-component vector of float)
+0:?     'i.i2' (layout( location=1) flat in 2-component vector of int)
 
 
 Linked fragment stage:
@@ -147,10 +142,7 @@ gl_FragCoord origin is upper left
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              0 (const int)
-0:13          v: direct index for structure ( temp 2-component vector of float)
-0:13            'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:13            Constant:
-0:13              0 (const int)
+0:?           'i.v' (layout( location=0) in 2-component vector of float)
 0:13        move second child to first child ( temp 4-component vector of float)
 0:13          fragCoord: direct index for structure ( temp 4-component vector of float)
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
@@ -162,10 +154,7 @@ gl_FragCoord origin is upper left
 0:?             'i' ( temp structure{ temp 2-component vector of float v,  temp 4-component vector of float fragCoord,  temp 2-component vector of int i2})
 0:13            Constant:
 0:13              2 (const int)
-0:13          i2: direct index for structure ( flat temp 2-component vector of int)
-0:13            'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
-0:13            Constant:
-0:13              1 (const int)
+0:?           'i.i2' (layout( location=1) flat in 2-component vector of int)
 0:13      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:13        Function Call: @PixelShaderFunction(struct-InParam-vf2-vf4-vi21; ( temp 4-component vector of float)
@@ -173,16 +162,17 @@ gl_FragCoord origin is upper left
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'i.fragCoord' ( in 4-component vector of float FragCoord)
-0:?     'i' (layout( location=0) in structure{ temp 2-component vector of float v,  flat temp 2-component vector of int i2})
+0:?     'i.v' (layout( location=0) in 2-component vector of float)
+0:?     'i.i2' (layout( location=1) flat in 2-component vector of int)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 77
+// Id's are bound by 74
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "PixelShaderFunction" 56 63 73
+                              EntryPoint Fragment 4  "PixelShaderFunction" 55 60 65 70
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "PixelShaderFunction"
@@ -200,17 +190,16 @@ gl_FragCoord origin is upper left
                               Name 40  "ret2"
                               Name 41  "param"
                               Name 53  "i"
-                              Name 54  "InParam"
-                              MemberName 54(InParam) 0  "v"
-                              MemberName 54(InParam) 1  "i2"
-                              Name 56  "i"
-                              Name 63  "i.fragCoord"
-                              Name 73  "@entryPointOutput"
-                              Name 74  "param"
-                              MemberDecorate 54(InParam) 1 Flat
-                              Decorate 56(i) Location 0
-                              Decorate 63(i.fragCoord) BuiltIn FragCoord
-                              Decorate 73(@entryPointOutput) Location 0
+                              Name 55  "i.v"
+                              Name 60  "i.fragCoord"
+                              Name 65  "i.i2"
+                              Name 70  "@entryPointOutput"
+                              Name 71  "param"
+                              Decorate 55(i.v) Location 0
+                              Decorate 60(i.fragCoord) BuiltIn FragCoord
+                              Decorate 65(i.i2) Flat
+                              Decorate 65(i.i2) Location 1
+                              Decorate 70(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -229,37 +218,34 @@ gl_FragCoord origin is upper left
               27:      9(int) Constant 1
               28:     22(int) Constant 0
               44:             TypePointer Function 8(fvec4)
-     54(InParam):             TypeStruct 7(fvec2) 10(ivec2)
-              55:             TypePointer Input 54(InParam)
-           56(i):     55(ptr) Variable Input
-              57:             TypePointer Input 7(fvec2)
-              60:             TypePointer Function 7(fvec2)
-              62:             TypePointer Input 8(fvec4)
- 63(i.fragCoord):     62(ptr) Variable Input
-              66:      9(int) Constant 2
-              67:             TypePointer Input 10(ivec2)
-              70:             TypePointer Function 10(ivec2)
-              72:             TypePointer Output 8(fvec4)
-73(@entryPointOutput):     72(ptr) Variable Output
+              54:             TypePointer Input 7(fvec2)
+         55(i.v):     54(ptr) Variable Input
+              57:             TypePointer Function 7(fvec2)
+              59:             TypePointer Input 8(fvec4)
+ 60(i.fragCoord):     59(ptr) Variable Input
+              63:      9(int) Constant 2
+              64:             TypePointer Input 10(ivec2)
+        65(i.i2):     64(ptr) Variable Input
+              67:             TypePointer Function 10(ivec2)
+              69:             TypePointer Output 8(fvec4)
+70(@entryPointOutput):     69(ptr) Variable Output
 4(PixelShaderFunction):           2 Function None 3
                5:             Label
            53(i):     12(ptr) Variable Function
-       74(param):     12(ptr) Variable Function
-              58:     57(ptr) AccessChain 56(i) 21
-              59:    7(fvec2) Load 58
-              61:     60(ptr) AccessChain 53(i) 21
-                              Store 61 59
-              64:    8(fvec4) Load 63(i.fragCoord)
-              65:     44(ptr) AccessChain 53(i) 27
-                              Store 65 64
-              68:     67(ptr) AccessChain 56(i) 27
-              69:   10(ivec2) Load 68
-              71:     70(ptr) AccessChain 53(i) 66
-                              Store 71 69
-              75: 11(InParam) Load 53(i)
-                              Store 74(param) 75
-              76:    8(fvec4) FunctionCall 19(@PixelShaderFunction(struct-InParam-vf2-vf4-vi21;) 74(param)
-                              Store 73(@entryPointOutput) 76
+       71(param):     12(ptr) Variable Function
+              56:    7(fvec2) Load 55(i.v)
+              58:     57(ptr) AccessChain 53(i) 21
+                              Store 58 56
+              61:    8(fvec4) Load 60(i.fragCoord)
+              62:     44(ptr) AccessChain 53(i) 27
+                              Store 62 61
+              66:   10(ivec2) Load 65(i.i2)
+              68:     67(ptr) AccessChain 53(i) 63
+                              Store 68 66
+              72: 11(InParam) Load 53(i)
+                              Store 71(param) 72
+              73:    8(fvec4) FunctionCall 19(@PixelShaderFunction(struct-InParam-vf2-vf4-vi21;) 71(param)
+                              Store 70(@entryPointOutput) 73
                               Return
                               FunctionEnd
 15(fun(struct-InParam-vf2-vf4-vi21;):    6(float) Function None 13
index 17e8823..1c0e503 100644 (file)
@@ -1,12 +1,12 @@
 hlsl.multiDescriptorSet.frag
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 95
+// Id's are bound by 92
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 78 83 89
+                              EntryPoint Fragment 4  "main" 78 82 86
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -30,13 +30,11 @@ hlsl.multiDescriptorSet.frag
                               Name 63  "samLinearA"
                               Name 76  "input"
                               Name 78  "input.Pos"
-                              Name 81  "PS_INPUT"
-                              MemberName 81(PS_INPUT) 0  "Tex"
-                              Name 83  "input"
-                              Name 89  "@entryPointOutput"
-                              Name 90  "param"
-                              Name 93  "txDiffuseB"
-                              Name 94  "samLinearB"
+                              Name 82  "input.Tex"
+                              Name 86  "@entryPointOutput"
+                              Name 87  "param"
+                              Name 90  "txDiffuseB"
+                              Name 91  "samLinearB"
                               MemberDecorate 23(cbChangesEveryFrame) 0 RowMajor
                               MemberDecorate 23(cbChangesEveryFrame) 0 Offset 0
                               MemberDecorate 23(cbChangesEveryFrame) 0 MatrixStride 16
@@ -61,12 +59,12 @@ hlsl.multiDescriptorSet.frag
                               Decorate 63(samLinearA) DescriptorSet 0
                               Decorate 63(samLinearA) Binding 1
                               Decorate 78(input.Pos) BuiltIn FragCoord
-                              Decorate 83(input) Location 0
-                              Decorate 89(@entryPointOutput) Location 0
-                              Decorate 93(txDiffuseB) DescriptorSet 1
-                              Decorate 93(txDiffuseB) Binding 0
-                              Decorate 94(samLinearB) DescriptorSet 1
-                              Decorate 94(samLinearB) Binding 1
+                              Decorate 82(input.Tex) Location 0
+                              Decorate 86(@entryPointOutput) Location 0
+                              Decorate 90(txDiffuseB) DescriptorSet 1
+                              Decorate 90(txDiffuseB) Binding 0
+                              Decorate 91(samLinearB) DescriptorSet 1
+                              Decorate 91(samLinearB) Binding 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -105,29 +103,26 @@ hlsl.multiDescriptorSet.frag
               70:             TypePointer Uniform 7(fvec4)
               77:             TypePointer Input 7(fvec4)
    78(input.Pos):     77(ptr) Variable Input
-    81(PS_INPUT):             TypeStruct 8(fvec2)
-              82:             TypePointer Input 81(PS_INPUT)
-       83(input):     82(ptr) Variable Input
-              84:             TypePointer Input 8(fvec2)
-              88:             TypePointer Output 7(fvec4)
-89(@entryPointOutput):     88(ptr) Variable Output
-  93(txDiffuseB):     58(ptr) Variable UniformConstant
-  94(samLinearB):     62(ptr) Variable UniformConstant
+              81:             TypePointer Input 8(fvec2)
+   82(input.Tex):     81(ptr) Variable Input
+              85:             TypePointer Output 7(fvec4)
+86(@entryPointOutput):     85(ptr) Variable Output
+  90(txDiffuseB):     58(ptr) Variable UniformConstant
+  91(samLinearB):     62(ptr) Variable UniformConstant
          4(main):           2 Function None 3
                5:             Label
        76(input):     10(ptr) Variable Function
-       90(param):     10(ptr) Variable Function
+       87(param):     10(ptr) Variable Function
               79:    7(fvec4) Load 78(input.Pos)
               80:     29(ptr) AccessChain 76(input) 21
                               Store 80 79
-              85:     84(ptr) AccessChain 83(input) 21
-              86:    8(fvec2) Load 85
-              87:     53(ptr) AccessChain 76(input) 52
-                              Store 87 86
-              91: 9(PS_INPUT) Load 76(input)
-                              Store 90(param) 91
-              92:    7(fvec4) FunctionCall 13(@main(struct-PS_INPUT-vf4-vf21;) 90(param)
-                              Store 89(@entryPointOutput) 92
+              83:    8(fvec2) Load 82(input.Tex)
+              84:     53(ptr) AccessChain 76(input) 52
+                              Store 84 83
+              88: 9(PS_INPUT) Load 76(input)
+                              Store 87(param) 88
+              89:    7(fvec4) FunctionCall 13(@main(struct-PS_INPUT-vf4-vf21;) 87(param)
+                              Store 86(@entryPointOutput) 89
                               Return
                               FunctionEnd
 13(@main(struct-PS_INPUT-vf4-vf21;):    7(fvec4) Function None 11
index 2ed9f2b..70a8512 100755 (executable)
@@ -149,17 +149,14 @@ Shader version: 500
 0:29            Constant:
 0:29              0 (const int)
 0:29        move second child to first child ( temp 2-component vector of float)
-0:29          texCoord: direct index for structure ( temp 2-component vector of float)
-0:29            '@entryPointOutput' (layout( location=0) out structure{ temp 2-component vector of float texCoord})
-0:29            Constant:
-0:29              0 (const int)
+0:?           '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float)
 0:29          texCoord: direct index for structure ( temp 2-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29            Constant:
 0:29              1 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.position' ( out 4-component vector of float Position)
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 2-component vector of float texCoord})
+0:?     '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float)
 
 
 Linked vertex stage:
@@ -315,26 +312,23 @@ Shader version: 500
 0:29            Constant:
 0:29              0 (const int)
 0:29        move second child to first child ( temp 2-component vector of float)
-0:29          texCoord: direct index for structure ( temp 2-component vector of float)
-0:29            '@entryPointOutput' (layout( location=0) out structure{ temp 2-component vector of float texCoord})
-0:29            Constant:
-0:29              0 (const int)
+0:?           '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float)
 0:29          texCoord: direct index for structure ( temp 2-component vector of float)
 0:29            'flattenTemp' ( temp structure{ temp 4-component vector of float position,  temp 2-component vector of float texCoord})
 0:29            Constant:
 0:29              1 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.position' ( out 4-component vector of float Position)
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 2-component vector of float texCoord})
+0:?     '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 123
+// Id's are bound by 120
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 108 116
+                              EntryPoint Vertex 4  "main" 108 115
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "VertexOut"
@@ -360,11 +354,9 @@ Shader version: 500
                               Name 98  "v5"
                               Name 105  "flattenTemp"
                               Name 108  "@entryPointOutput.position"
-                              Name 114  "VertexOut"
-                              MemberName 114(VertexOut) 0  "texCoord"
-                              Name 116  "@entryPointOutput"
+                              Name 115  "@entryPointOutput.texCoord"
                               Decorate 108(@entryPointOutput.position) BuiltIn Position
-                              Decorate 116(@entryPointOutput) Location 0
+                              Decorate 115(@entryPointOutput.texCoord) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -395,12 +387,10 @@ Shader version: 500
              109:             TypeInt 32 1
              110:    109(int) Constant 0
              111:             TypePointer Function 7(fvec4)
-  114(VertexOut):             TypeStruct 8(fvec2)
-             115:             TypePointer Output 114(VertexOut)
-116(@entryPointOutput):    115(ptr) Variable Output
-             117:    109(int) Constant 1
-             118:             TypePointer Function 8(fvec2)
-             121:             TypePointer Output 8(fvec2)
+             114:             TypePointer Output 8(fvec2)
+115(@entryPointOutput.texCoord):    114(ptr) Variable Output
+             116:    109(int) Constant 1
+             117:             TypePointer Function 8(fvec2)
          4(main):           2 Function None 3
                5:             Label
 105(flattenTemp):     87(ptr) Variable Function
@@ -409,10 +399,9 @@ Shader version: 500
              112:    111(ptr) AccessChain 105(flattenTemp) 110
              113:    7(fvec4) Load 112
                               Store 108(@entryPointOutput.position) 113
-             119:    118(ptr) AccessChain 105(flattenTemp) 117
-             120:    8(fvec2) Load 119
-             122:    121(ptr) AccessChain 116(@entryPointOutput) 110
-                              Store 122 120
+             118:    117(ptr) AccessChain 105(flattenTemp) 116
+             119:    8(fvec2) Load 118
+                              Store 115(@entryPointOutput.texCoord) 119
                               Return
                               FunctionEnd
          11(r0():9(VertexOut) Function None 10
index 8886518..f7b82b6 100755 (executable)
@@ -51,10 +51,7 @@ output primitive = line_strip
 0:15              Constant:
 0:15                4 (const int)
 0:15          move second child to first child ( temp int)
-0:15            ii: direct index for structure ( temp int)
-0:15              'OutputStream' (layout( location=0) out structure{ temp int ii})
-0:15              Constant:
-0:15                0 (const int)
+0:?             'OutputStream.ii' (layout( location=0) out int)
 0:15            ii: direct index for structure ( temp int)
 0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
 0:15              Constant:
@@ -74,7 +71,7 @@ output primitive = line_strip
 0:?     'OutputStream.clip0' ( out float Position)
 0:?     'OutputStream.vpai' ( out uint ViewportIndex)
 0:?     'OutputStream.rtai' ( out uint Layer)
-0:?     'OutputStream' (layout( location=0) out structure{ temp int ii})
+0:?     'OutputStream.ii' (layout( location=0) out int)
 0:?     'OutputStream.clip0' ( out 1-element array of float ClipDistance)
 0:?     'OutputStream.cull0' ( out 1-element array of float CullDistance)
 
@@ -134,10 +131,7 @@ output primitive = line_strip
 0:15              Constant:
 0:15                4 (const int)
 0:15          move second child to first child ( temp int)
-0:15            ii: direct index for structure ( temp int)
-0:15              'OutputStream' (layout( location=0) out structure{ temp int ii})
-0:15              Constant:
-0:15                0 (const int)
+0:?             'OutputStream.ii' (layout( location=0) out int)
 0:15            ii: direct index for structure ( temp int)
 0:15              's' ( temp structure{ temp float clip0,  temp float clip0,  temp float cull0,  temp uint vpai,  temp uint rtai,  temp int ii})
 0:15              Constant:
@@ -157,13 +151,13 @@ output primitive = line_strip
 0:?     'OutputStream.clip0' ( out float Position)
 0:?     'OutputStream.vpai' ( out uint ViewportIndex)
 0:?     'OutputStream.rtai' ( out uint Layer)
-0:?     'OutputStream' (layout( location=0) out structure{ temp int ii})
+0:?     'OutputStream.ii' (layout( location=0) out int)
 0:?     'OutputStream.clip0' ( out 1-element array of float ClipDistance)
 0:?     'OutputStream.cull0' ( out 1-element array of float CullDistance)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 68
+// Id's are bound by 65
 
                               Capability Geometry
                               Capability ClipDistance
@@ -171,7 +165,7 @@ output primitive = line_strip
                               Capability MultiViewport
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 20 29 34 40 45 51 60
+                              EntryPoint Geometry 4  "main" 20 29 34 40 45 50 57
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputLineStrip
@@ -194,21 +188,19 @@ output primitive = line_strip
                               Name 34  "OutputStream.cull0"
                               Name 40  "OutputStream.vpai"
                               Name 45  "OutputStream.rtai"
-                              Name 49  "S"
-                              MemberName 49(S) 0  "ii"
-                              Name 51  "OutputStream"
-                              Name 58  "VertexID"
-                              Name 60  "VertexID"
-                              Name 62  "OutputStream"
-                              Name 63  "param"
-                              Name 65  "param"
+                              Name 50  "OutputStream.ii"
+                              Name 55  "VertexID"
+                              Name 57  "VertexID"
+                              Name 59  "OutputStream"
+                              Name 60  "param"
+                              Name 62  "param"
                               Decorate 20(OutputStream.clip0) BuiltIn Position
                               Decorate 29(OutputStream.clip0) BuiltIn ClipDistance
                               Decorate 34(OutputStream.cull0) BuiltIn CullDistance
                               Decorate 40(OutputStream.vpai) BuiltIn ViewportIndex
                               Decorate 45(OutputStream.rtai) BuiltIn Layer
-                              Decorate 51(OutputStream) Location 0
-                              Decorate 60(VertexID) Location 0
+                              Decorate 50(OutputStream.ii) Location 0
+                              Decorate 57(VertexID) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 0
@@ -237,27 +229,25 @@ output primitive = line_strip
               42:             TypePointer Function 6(int)
 45(OutputStream.rtai):     39(ptr) Variable Output
               46:     11(int) Constant 4
-           49(S):             TypeStruct 11(int)
-              50:             TypePointer Output 49(S)
-51(OutputStream):     50(ptr) Variable Output
-              52:     11(int) Constant 5
-              53:             TypePointer Function 11(int)
-              56:             TypePointer Output 11(int)
-              59:             TypePointer Input 8
-    60(VertexID):     59(ptr) Variable Input
+              49:             TypePointer Output 11(int)
+50(OutputStream.ii):     49(ptr) Variable Output
+              51:     11(int) Constant 5
+              52:             TypePointer Function 11(int)
+              56:             TypePointer Input 8
+    57(VertexID):     56(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
-    58(VertexID):      9(ptr) Variable Function
-62(OutputStream):     13(ptr) Variable Function
-       63(param):      9(ptr) Variable Function
-       65(param):     13(ptr) Variable Function
-              61:           8 Load 60(VertexID)
-                              Store 58(VertexID) 61
-              64:           8 Load 58(VertexID)
-                              Store 63(param) 64
-              66:           2 FunctionCall 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;) 63(param) 65(param)
-              67:       12(S) Load 65(param)
-                              Store 62(OutputStream) 67
+    55(VertexID):      9(ptr) Variable Function
+59(OutputStream):     13(ptr) Variable Function
+       60(param):      9(ptr) Variable Function
+       62(param):     13(ptr) Variable Function
+              58:           8 Load 57(VertexID)
+                              Store 55(VertexID) 58
+              61:           8 Load 55(VertexID)
+                              Store 60(param) 61
+              63:           2 FunctionCall 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;) 60(param) 62(param)
+              64:       12(S) Load 62(param)
+                              Store 59(OutputStream) 64
                               Return
                               FunctionEnd
 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;):           2 Function None 14
@@ -282,10 +272,9 @@ output primitive = line_strip
               47:     42(ptr) AccessChain 21(s) 46
               48:      6(int) Load 47
                               Store 45(OutputStream.rtai) 48
-              54:     53(ptr) AccessChain 21(s) 52
-              55:     11(int) Load 54
-              57:     56(ptr) AccessChain 51(OutputStream) 22
-                              Store 57 55
+              53:     52(ptr) AccessChain 21(s) 51
+              54:     11(int) Load 53
+                              Store 50(OutputStream.ii) 54
                               EmitVertex
                               Return
                               FunctionEnd
index de7214f..a3aa340 100755 (executable)
@@ -87,16 +87,13 @@ Shader version: 500
 0:10              Constant:
 0:10                3 (const int)
 0:10        move second child to first child ( temp int)
-0:10          ii: direct index for structure ( temp int)
-0:10            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:10            Constant:
-0:10              0 (const int)
+0:?           '@entryPointOutput.ii' (layout( location=0) out int)
 0:10          ii: direct index for structure ( temp int)
 0:10            'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              4 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
+0:?     '@entryPointOutput.ii' (layout( location=0) out int)
 0:?     'ins.ii' ( in int InstanceIndex)
 0:?     'ins.clip0' (layout( location=0) in float)
 0:?     'ins.clip1' (layout( location=1) in float)
@@ -197,16 +194,13 @@ Shader version: 500
 0:10              Constant:
 0:10                3 (const int)
 0:10        move second child to first child ( temp int)
-0:10          ii: direct index for structure ( temp int)
-0:10            '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
-0:10            Constant:
-0:10              0 (const int)
+0:?           '@entryPointOutput.ii' (layout( location=0) out int)
 0:10          ii: direct index for structure ( temp int)
 0:10            'flattenTemp' ( temp structure{ temp float clip0,  temp float clip1,  temp float cull0,  temp float cull1,  temp int ii})
 0:10            Constant:
 0:10              4 (const int)
 0:?   Linker Objects
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
+0:?     '@entryPointOutput.ii' (layout( location=0) out int)
 0:?     'ins.ii' ( in int InstanceIndex)
 0:?     'ins.clip0' (layout( location=0) in float)
 0:?     'ins.clip1' (layout( location=1) in float)
@@ -217,14 +211,14 @@ Shader version: 500
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 73
+// Id's are bound by 70
 
                               Capability Shader
                               Capability ClipDistance
                               Capability CullDistance
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 21 26 30 34 39 51 59 68
+                              EntryPoint Vertex 4  "main" 21 26 30 34 39 51 59 67
                               Source HLSL 500
                               Name 4  "main"
                               Name 8  "S"
@@ -246,9 +240,7 @@ Shader version: 500
                               Name 44  "param"
                               Name 51  "@entryPointOutput.clip1"
                               Name 59  "@entryPointOutput.cull1"
-                              Name 66  "S"
-                              MemberName 66(S) 0  "ii"
-                              Name 68  "@entryPointOutput"
+                              Name 67  "@entryPointOutput.ii"
                               Decorate 21(ins.clip0) Location 0
                               Decorate 26(ins.clip1) Location 1
                               Decorate 30(ins.cull0) Location 2
@@ -256,7 +248,7 @@ Shader version: 500
                               Decorate 39(ins.ii) BuiltIn InstanceIndex
                               Decorate 51(@entryPointOutput.clip1) BuiltIn ClipDistance
                               Decorate 59(@entryPointOutput.cull1) BuiltIn CullDistance
-                              Decorate 68(@entryPointOutput) Location 0
+                              Decorate 67(@entryPointOutput.ii) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -285,10 +277,8 @@ Shader version: 500
 51(@entryPointOutput.clip1):     50(ptr) Variable Output
               54:             TypePointer Output 6(float)
 59(@entryPointOutput.cull1):     50(ptr) Variable Output
-           66(S):             TypeStruct 7(int)
-              67:             TypePointer Output 66(S)
-68(@entryPointOutput):     67(ptr) Variable Output
-              71:             TypePointer Output 7(int)
+              66:             TypePointer Output 7(int)
+67(@entryPointOutput.ii):     66(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
          18(ins):      9(ptr) Variable Function
@@ -329,10 +319,9 @@ Shader version: 500
               64:    6(float) Load 63
               65:     54(ptr) AccessChain 59(@entryPointOutput.cull1) 25
                               Store 65 64
-              69:     41(ptr) AccessChain 43(flattenTemp) 37
-              70:      7(int) Load 69
-              72:     71(ptr) AccessChain 68(@entryPointOutput) 19
-                              Store 72 70
+              68:     41(ptr) AccessChain 43(flattenTemp) 37
+              69:      7(int) Load 68
+                              Store 67(@entryPointOutput.ii) 69
                               Return
                               FunctionEnd
 12(@main(struct-S-f1-f1-f1-f1-i11;):        8(S) Function None 10
index 8cf6e37..d088164 100755 (executable)
@@ -43,37 +43,25 @@ gl_FragCoord origin is upper left
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              0 (const int)
-0:40          a: direct index for structure ( smooth temp 4-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              0 (const int)
+0:?           's.a' (layout( location=1) smooth in 4-component vector of float)
 0:40        move second child to first child ( temp bool)
 0:40          b: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              1 (const int)
-0:40          b: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              1 (const int)
+0:?           's.b' (layout( location=2) flat in bool)
 0:40        move second child to first child ( temp 1-component vector of float)
 0:40          c: direct index for structure ( temp 1-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              2 (const int)
-0:40          c: direct index for structure ( centroid noperspective temp 1-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              2 (const int)
+0:?           's.c' (layout( location=3) centroid noperspective in 1-component vector of float)
 0:40        move second child to first child ( temp 2-component vector of float)
 0:40          d: direct index for structure ( temp 2-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              3 (const int)
-0:40          d: direct index for structure ( centroid sample temp 2-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              3 (const int)
+0:?           's.d' (layout( location=4) centroid sample in 2-component vector of float)
 0:40        move second child to first child ( temp bool)
 0:40          ff1: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
@@ -85,28 +73,19 @@ gl_FragCoord origin is upper left
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              5 (const int)
-0:40          ff2: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              4 (const int)
+0:?           's.ff2' (layout( location=5) flat in bool)
 0:40        move second child to first child ( temp bool)
 0:40          ff3: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              6 (const int)
-0:40          ff3: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              5 (const int)
+0:?           's.ff3' (layout( location=6) flat in bool)
 0:40        move second child to first child ( temp 4-component vector of float)
 0:40          ff4: direct index for structure ( temp 4-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              7 (const int)
-0:40          ff4: direct index for structure ( temp 4-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              6 (const int)
+0:?           's.ff4' (layout( location=7) in 4-component vector of float)
 0:40      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:40        Function Call: @PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41; ( temp 4-component vector of float)
@@ -118,7 +97,13 @@ gl_FragCoord origin is upper left
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'input' (layout( location=0) in 4-component vector of float)
 0:?     's.ff1' ( flat in bool Face)
-0:?     's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
+0:?     's.a' (layout( location=1) smooth in 4-component vector of float)
+0:?     's.b' (layout( location=2) flat in bool)
+0:?     's.c' (layout( location=3) centroid noperspective in 1-component vector of float)
+0:?     's.d' (layout( location=4) centroid sample in 2-component vector of float)
+0:?     's.ff2' (layout( location=5) flat in bool)
+0:?     's.ff3' (layout( location=6) flat in bool)
+0:?     's.ff4' (layout( location=7) in 4-component vector of float)
 
 
 Linked fragment stage:
@@ -164,37 +149,25 @@ gl_FragCoord origin is upper left
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              0 (const int)
-0:40          a: direct index for structure ( smooth temp 4-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              0 (const int)
+0:?           's.a' (layout( location=1) smooth in 4-component vector of float)
 0:40        move second child to first child ( temp bool)
 0:40          b: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              1 (const int)
-0:40          b: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              1 (const int)
+0:?           's.b' (layout( location=2) flat in bool)
 0:40        move second child to first child ( temp 1-component vector of float)
 0:40          c: direct index for structure ( temp 1-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              2 (const int)
-0:40          c: direct index for structure ( centroid noperspective temp 1-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              2 (const int)
+0:?           's.c' (layout( location=3) centroid noperspective in 1-component vector of float)
 0:40        move second child to first child ( temp 2-component vector of float)
 0:40          d: direct index for structure ( temp 2-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              3 (const int)
-0:40          d: direct index for structure ( centroid sample temp 2-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              3 (const int)
+0:?           's.d' (layout( location=4) centroid sample in 2-component vector of float)
 0:40        move second child to first child ( temp bool)
 0:40          ff1: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
@@ -206,28 +179,19 @@ gl_FragCoord origin is upper left
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              5 (const int)
-0:40          ff2: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              4 (const int)
+0:?           's.ff2' (layout( location=5) flat in bool)
 0:40        move second child to first child ( temp bool)
 0:40          ff3: direct index for structure ( temp bool)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              6 (const int)
-0:40          ff3: direct index for structure ( flat temp bool)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              5 (const int)
+0:?           's.ff3' (layout( location=6) flat in bool)
 0:40        move second child to first child ( temp 4-component vector of float)
 0:40          ff4: direct index for structure ( temp 4-component vector of float)
 0:?             's' ( temp structure{ temp 4-component vector of float a,  temp bool b,  temp 1-component vector of float c,  temp 2-component vector of float d,  temp bool ff1,  temp bool ff2,  temp bool ff3,  temp 4-component vector of float ff4})
 0:40            Constant:
 0:40              7 (const int)
-0:40          ff4: direct index for structure ( temp 4-component vector of float)
-0:40            's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
-0:40            Constant:
-0:40              6 (const int)
+0:?           's.ff4' (layout( location=7) in 4-component vector of float)
 0:40      move second child to first child ( temp 4-component vector of float)
 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:40        Function Call: @PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41; ( temp 4-component vector of float)
@@ -239,16 +203,22 @@ gl_FragCoord origin is upper left
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'input' (layout( location=0) in 4-component vector of float)
 0:?     's.ff1' ( flat in bool Face)
-0:?     's' (layout( location=1) in structure{ smooth temp 4-component vector of float a,  flat temp bool b,  centroid noperspective temp 1-component vector of float c,  centroid sample temp 2-component vector of float d,  flat temp bool ff2,  flat temp bool ff3,  temp 4-component vector of float ff4})
+0:?     's.a' (layout( location=1) smooth in 4-component vector of float)
+0:?     's.b' (layout( location=2) flat in bool)
+0:?     's.c' (layout( location=3) centroid noperspective in 1-component vector of float)
+0:?     's.d' (layout( location=4) centroid sample in 2-component vector of float)
+0:?     's.ff2' (layout( location=5) flat in bool)
+0:?     's.ff3' (layout( location=6) flat in bool)
+0:?     's.ff4' (layout( location=7) in 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 105
+// Id's are bound by 102
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "PixelShaderFunction" 51 56 79 94
+                              EntryPoint Fragment 4  "PixelShaderFunction" 51 54 59 65 71 76 80 84 87 91
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "PixelShaderFunction"
@@ -278,49 +248,53 @@ gl_FragCoord origin is upper left
                               Name 49  "input"
                               Name 51  "input"
                               Name 53  "s"
-                              Name 54  "IN_S"
-                              MemberName 54(IN_S) 0  "a"
-                              MemberName 54(IN_S) 1  "b"
-                              MemberName 54(IN_S) 2  "c"
-                              MemberName 54(IN_S) 3  "d"
-                              MemberName 54(IN_S) 4  "ff2"
-                              MemberName 54(IN_S) 5  "ff3"
-                              MemberName 54(IN_S) 6  "ff4"
-                              Name 56  "s"
-                              Name 79  "s.ff1"
-                              Name 94  "@entryPointOutput"
-                              Name 95  "param"
-                              Name 97  "param"
-                              Name 101  "myS"
-                              MemberName 101(myS) 0  "b"
-                              MemberName 101(myS) 1  "c"
-                              MemberName 101(myS) 2  "a"
-                              MemberName 101(myS) 3  "d"
-                              Name 102  "$Global"
-                              MemberName 102($Global) 0  "s1"
-                              MemberName 102($Global) 1  "ff5"
-                              MemberName 102($Global) 2  "ff6"
-                              Name 104  ""
+                              Name 54  "s.a"
+                              Name 59  "s.b"
+                              Name 65  "s.c"
+                              Name 71  "s.d"
+                              Name 76  "s.ff1"
+                              Name 80  "s.ff2"
+                              Name 84  "s.ff3"
+                              Name 87  "s.ff4"
+                              Name 91  "@entryPointOutput"
+                              Name 92  "param"
+                              Name 94  "param"
+                              Name 98  "myS"
+                              MemberName 98(myS) 0  "b"
+                              MemberName 98(myS) 1  "c"
+                              MemberName 98(myS) 2  "a"
+                              MemberName 98(myS) 3  "d"
+                              Name 99  "$Global"
+                              MemberName 99($Global) 0  "s1"
+                              MemberName 99($Global) 1  "ff5"
+                              MemberName 99($Global) 2  "ff6"
+                              Name 101  ""
                               Decorate 51(input) Location 0
-                              MemberDecorate 54(IN_S) 1 Flat
-                              MemberDecorate 54(IN_S) 2 NoPerspective
-                              MemberDecorate 54(IN_S) 2 Centroid
-                              MemberDecorate 54(IN_S) 3 Centroid
-                              MemberDecorate 54(IN_S) 4 Flat
-                              MemberDecorate 54(IN_S) 5 Flat
-                              Decorate 56(s) Location 1
-                              Decorate 79(s.ff1) Flat
-                              Decorate 79(s.ff1) BuiltIn FrontFacing
-                              Decorate 94(@entryPointOutput) Location 0
-                              MemberDecorate 101(myS) 0 Offset 0
-                              MemberDecorate 101(myS) 1 Offset 4
-                              MemberDecorate 101(myS) 2 Offset 16
-                              MemberDecorate 101(myS) 3 Offset 32
-                              MemberDecorate 102($Global) 0 Offset 0
-                              MemberDecorate 102($Global) 1 Offset 1620
-                              MemberDecorate 102($Global) 2 Offset 1636
-                              Decorate 102($Global) Block
-                              Decorate 104 DescriptorSet 0
+                              Decorate 54(s.a) Location 1
+                              Decorate 59(s.b) Flat
+                              Decorate 59(s.b) Location 2
+                              Decorate 65(s.c) NoPerspective
+                              Decorate 65(s.c) Centroid
+                              Decorate 65(s.c) Location 3
+                              Decorate 71(s.d) Centroid
+                              Decorate 71(s.d) Location 4
+                              Decorate 76(s.ff1) Flat
+                              Decorate 76(s.ff1) BuiltIn FrontFacing
+                              Decorate 80(s.ff2) Flat
+                              Decorate 80(s.ff2) Location 5
+                              Decorate 84(s.ff3) Flat
+                              Decorate 84(s.ff3) Location 6
+                              Decorate 87(s.ff4) Location 7
+                              Decorate 91(@entryPointOutput) Location 0
+                              MemberDecorate 98(myS) 0 Offset 0
+                              MemberDecorate 98(myS) 1 Offset 4
+                              MemberDecorate 98(myS) 2 Offset 16
+                              MemberDecorate 98(myS) 3 Offset 32
+                              MemberDecorate 99($Global) 0 Offset 0
+                              MemberDecorate 99($Global) 1 Offset 1620
+                              MemberDecorate 99($Global) 2 Offset 1636
+                              Decorate 99($Global) Block
+                              Decorate 101 DescriptorSet 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -347,74 +321,71 @@ gl_FragCoord origin is upper left
               42:             TypePointer Function 41(containEmpty)
               50:             TypePointer Input 7(fvec4)
        51(input):     50(ptr) Variable Input
-        54(IN_S):             TypeStruct 7(fvec4) 9(bool) 6(float) 10(fvec2) 9(bool) 9(bool) 7(fvec4)
-              55:             TypePointer Input 54(IN_S)
-           56(s):     55(ptr) Variable Input
-              60:     31(int) Constant 1
-              61:             TypePointer Input 9(bool)
-              64:             TypePointer Function 9(bool)
-              66:     31(int) Constant 2
-              67:             TypePointer Input 6(float)
-              70:             TypePointer Function 6(float)
-              72:     31(int) Constant 3
-              73:             TypePointer Input 10(fvec2)
-              76:             TypePointer Function 10(fvec2)
-              78:     31(int) Constant 4
-       79(s.ff1):     61(ptr) Variable Input
-              82:     31(int) Constant 5
-              86:     31(int) Constant 6
-              93:             TypePointer Output 7(fvec4)
-94(@entryPointOutput):     93(ptr) Variable Output
-             100:             TypeInt 32 0
-        101(myS):             TypeStruct 100(int) 100(int) 7(fvec4) 7(fvec4)
-    102($Global):             TypeStruct 101(myS) 6(float) 6(float)
-             103:             TypePointer Uniform 102($Global)
-             104:    103(ptr) Variable Uniform
+         54(s.a):     50(ptr) Variable Input
+              57:     31(int) Constant 1
+              58:             TypePointer Input 9(bool)
+         59(s.b):     58(ptr) Variable Input
+              61:             TypePointer Function 9(bool)
+              63:     31(int) Constant 2
+              64:             TypePointer Input 6(float)
+         65(s.c):     64(ptr) Variable Input
+              67:             TypePointer Function 6(float)
+              69:     31(int) Constant 3
+              70:             TypePointer Input 10(fvec2)
+         71(s.d):     70(ptr) Variable Input
+              73:             TypePointer Function 10(fvec2)
+              75:     31(int) Constant 4
+       76(s.ff1):     58(ptr) Variable Input
+              79:     31(int) Constant 5
+       80(s.ff2):     58(ptr) Variable Input
+              83:     31(int) Constant 6
+       84(s.ff3):     58(ptr) Variable Input
+       87(s.ff4):     50(ptr) Variable Input
+              90:             TypePointer Output 7(fvec4)
+91(@entryPointOutput):     90(ptr) Variable Output
+              97:             TypeInt 32 0
+         98(myS):             TypeStruct 97(int) 97(int) 7(fvec4) 7(fvec4)
+     99($Global):             TypeStruct 98(myS) 6(float) 6(float)
+             100:             TypePointer Uniform 99($Global)
+             101:    100(ptr) Variable Uniform
 4(PixelShaderFunction):           2 Function None 3
                5:             Label
        49(input):      8(ptr) Variable Function
            53(s):     12(ptr) Variable Function
-       95(param):      8(ptr) Variable Function
-       97(param):     12(ptr) Variable Function
+       92(param):      8(ptr) Variable Function
+       94(param):     12(ptr) Variable Function
               52:    7(fvec4) Load 51(input)
                               Store 49(input) 52
-              57:     50(ptr) AccessChain 56(s) 32
-              58:    7(fvec4) Load 57
-              59:      8(ptr) AccessChain 53(s) 32
-                              Store 59 58
-              62:     61(ptr) AccessChain 56(s) 60
-              63:     9(bool) Load 62
-              65:     64(ptr) AccessChain 53(s) 60
-                              Store 65 63
-              68:     67(ptr) AccessChain 56(s) 66
-              69:    6(float) Load 68
-              71:     70(ptr) AccessChain 53(s) 66
-                              Store 71 69
-              74:     73(ptr) AccessChain 56(s) 72
-              75:   10(fvec2) Load 74
-              77:     76(ptr) AccessChain 53(s) 72
-                              Store 77 75
-              80:     9(bool) Load 79(s.ff1)
-              81:     64(ptr) AccessChain 53(s) 78
-                              Store 81 80
-              83:     61(ptr) AccessChain 56(s) 78
-              84:     9(bool) Load 83
-              85:     64(ptr) AccessChain 53(s) 82
-                              Store 85 84
-              87:     61(ptr) AccessChain 56(s) 82
-              88:     9(bool) Load 87
-              89:     64(ptr) AccessChain 53(s) 86
+              55:    7(fvec4) Load 54(s.a)
+              56:      8(ptr) AccessChain 53(s) 32
+                              Store 56 55
+              60:     9(bool) Load 59(s.b)
+              62:     61(ptr) AccessChain 53(s) 57
+                              Store 62 60
+              66:    6(float) Load 65(s.c)
+              68:     67(ptr) AccessChain 53(s) 63
+                              Store 68 66
+              72:   10(fvec2) Load 71(s.d)
+              74:     73(ptr) AccessChain 53(s) 69
+                              Store 74 72
+              77:     9(bool) Load 76(s.ff1)
+              78:     61(ptr) AccessChain 53(s) 75
+                              Store 78 77
+              81:     9(bool) Load 80(s.ff2)
+              82:     61(ptr) AccessChain 53(s) 79
+                              Store 82 81
+              85:     9(bool) Load 84(s.ff3)
+              86:     61(ptr) AccessChain 53(s) 83
+                              Store 86 85
+              88:    7(fvec4) Load 87(s.ff4)
+              89:      8(ptr) AccessChain 53(s) 33
                               Store 89 88
-              90:     50(ptr) AccessChain 56(s) 86
-              91:    7(fvec4) Load 90
-              92:      8(ptr) AccessChain 53(s) 33
-                              Store 92 91
-              96:    7(fvec4) Load 49(input)
-                              Store 95(param) 96
-              98:    11(IN_S) Load 53(s)
-                              Store 97(param) 98
-              99:    7(fvec4) FunctionCall 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;) 95(param) 97(param)
-                              Store 94(@entryPointOutput) 99
+              93:    7(fvec4) Load 49(input)
+                              Store 92(param) 93
+              95:    11(IN_S) Load 53(s)
+                              Store 94(param) 95
+              96:    7(fvec4) FunctionCall 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;) 92(param) 94(param)
+                              Store 91(@entryPointOutput) 96
                               Return
                               FunctionEnd
 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;):    7(fvec4) Function None 13
index 893895e..896e124 100644 (file)
@@ -69,10 +69,7 @@ Shader version: 500
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:?             'Pos_loose' ( temp 4-component vector of float)
 0:17        move second child to first child ( temp int)
-0:17          x0_out: direct index for structure ( temp int)
-0:17            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:17            Constant:
-0:17              0 (const int)
+0:?           '@entryPointOutput.x0_out' (layout( location=0) out int)
 0:17          x0_out: direct index for structure ( temp int)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
@@ -84,17 +81,15 @@ Shader version: 500
 0:17            Constant:
 0:17              1 (const int)
 0:17        move second child to first child ( temp int)
-0:17          x1_out: direct index for structure ( temp int)
-0:17            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:17            Constant:
-0:17              1 (const int)
+0:?           '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:17          x1_out: direct index for structure ( temp int)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
 0:17              2 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
+0:?     '@entryPointOutput.x0_out' (layout( location=0) out int)
+0:?     '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:?     'vsin.x0_in' (layout( location=0) in int)
 0:?     'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
 0:?     'vsin.x1_in' (layout( location=2) in int)
@@ -174,10 +169,7 @@ Shader version: 500
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:?             'Pos_loose' ( temp 4-component vector of float)
 0:17        move second child to first child ( temp int)
-0:17          x0_out: direct index for structure ( temp int)
-0:17            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:17            Constant:
-0:17              0 (const int)
+0:?           '@entryPointOutput.x0_out' (layout( location=0) out int)
 0:17          x0_out: direct index for structure ( temp int)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
@@ -189,17 +181,15 @@ Shader version: 500
 0:17            Constant:
 0:17              1 (const int)
 0:17        move second child to first child ( temp int)
-0:17          x1_out: direct index for structure ( temp int)
-0:17            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:17            Constant:
-0:17              1 (const int)
+0:?           '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:17          x1_out: direct index for structure ( temp int)
 0:17            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:17            Constant:
 0:17              2 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
+0:?     '@entryPointOutput.x0_out' (layout( location=0) out int)
+0:?     '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:?     'vsin.x0_in' (layout( location=0) in int)
 0:?     'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
 0:?     'vsin.x1_in' (layout( location=2) in int)
@@ -207,12 +197,12 @@ Shader version: 500
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 73
+// Id's are bound by 70
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 40 44 47 51 61 67
+                              EntryPoint Vertex 4  "main" 40 44 47 51 60 64 67
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "VS_INPUT"
@@ -236,17 +226,16 @@ Shader version: 500
                               Name 53  "flattenTemp"
                               Name 54  "param"
                               Name 56  "param"
-                              Name 59  "VS_OUTPUT"
-                              MemberName 59(VS_OUTPUT) 0  "x0_out"
-                              MemberName 59(VS_OUTPUT) 1  "x1_out"
-                              Name 61  "@entryPointOutput"
-                              Name 67  "@entryPointOutput.Pos_out"
+                              Name 60  "@entryPointOutput.x0_out"
+                              Name 64  "@entryPointOutput.Pos_out"
+                              Name 67  "@entryPointOutput.x1_out"
                               Decorate 40(vsin.x0_in) Location 0
                               Decorate 44(vsin.Pos_in) Location 1
                               Decorate 47(vsin.x1_in) Location 2
                               Decorate 51(Pos_loose) Location 3
-                              Decorate 61(@entryPointOutput) Location 0
-                              Decorate 67(@entryPointOutput.Pos_out) BuiltIn Position
+                              Decorate 60(@entryPointOutput.x0_out) Location 0
+                              Decorate 64(@entryPointOutput.Pos_out) BuiltIn Position
+                              Decorate 67(@entryPointOutput.x1_out) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
@@ -268,12 +257,11 @@ Shader version: 500
  44(vsin.Pos_in):     43(ptr) Variable Input
   47(vsin.x1_in):     39(ptr) Variable Input
    51(Pos_loose):     43(ptr) Variable Input
-   59(VS_OUTPUT):             TypeStruct 6(int) 6(int)
-              60:             TypePointer Output 59(VS_OUTPUT)
-61(@entryPointOutput):     60(ptr) Variable Output
-              64:             TypePointer Output 6(int)
-              66:             TypePointer Output 8(fvec4)
-67(@entryPointOutput.Pos_out):     66(ptr) Variable Output
+              59:             TypePointer Output 6(int)
+60(@entryPointOutput.x0_out):     59(ptr) Variable Output
+              63:             TypePointer Output 8(fvec4)
+64(@entryPointOutput.Pos_out):     63(ptr) Variable Output
+67(@entryPointOutput.x1_out):     59(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
         38(vsin):     10(ptr) Variable Function
@@ -298,17 +286,15 @@ Shader version: 500
                               Store 56(param) 57
               58:12(VS_OUTPUT) FunctionCall 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;) 54(param) 56(param)
                               Store 53(flattenTemp) 58
-              62:     21(ptr) AccessChain 53(flattenTemp) 20
-              63:      6(int) Load 62
-              65:     64(ptr) AccessChain 61(@entryPointOutput) 20
-                              Store 65 63
-              68:     11(ptr) AccessChain 53(flattenTemp) 25
-              69:    8(fvec4) Load 68
-                              Store 67(@entryPointOutput.Pos_out) 69
-              70:     21(ptr) AccessChain 53(flattenTemp) 31
-              71:      6(int) Load 70
-              72:     64(ptr) AccessChain 61(@entryPointOutput) 25
-                              Store 72 71
+              61:     21(ptr) AccessChain 53(flattenTemp) 20
+              62:      6(int) Load 61
+                              Store 60(@entryPointOutput.x0_out) 62
+              65:     11(ptr) AccessChain 53(flattenTemp) 25
+              66:    8(fvec4) Load 65
+                              Store 64(@entryPointOutput.Pos_out) 66
+              68:     21(ptr) AccessChain 53(flattenTemp) 31
+              69:      6(int) Load 68
+                              Store 67(@entryPointOutput.x1_out) 69
                               Return
                               FunctionEnd
 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;):12(VS_OUTPUT) Function None 13
index 1f181ca..8aae6f3 100644 (file)
@@ -73,7 +73,9 @@ output primitive = triangle_strip
 0:?   Linker Objects
 0:?     'v' (layout( location=0) in 1-element array of uint)
 0:?     'OutputStream.Pos' ( out 4-component vector of float Position)
-0:?     'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord,  temp 3-component vector of float TerrainPos,  temp uint VertexID})
+0:?     'OutputStream.TexCoord' (layout( location=0) out 2-component vector of float)
+0:?     'OutputStream.TerrainPos' (layout( location=1) out 3-component vector of float)
+0:?     'OutputStream.VertexID' (layout( location=2) out uint)
 
 
 Linked geometry stage:
@@ -153,16 +155,18 @@ output primitive = triangle_strip
 0:?   Linker Objects
 0:?     'v' (layout( location=0) in 1-element array of uint)
 0:?     'OutputStream.Pos' ( out 4-component vector of float Position)
-0:?     'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord,  temp 3-component vector of float TerrainPos,  temp uint VertexID})
+0:?     'OutputStream.TexCoord' (layout( location=0) out 2-component vector of float)
+0:?     'OutputStream.TerrainPos' (layout( location=1) out 3-component vector of float)
+0:?     'OutputStream.VertexID' (layout( location=2) out uint)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 79
+// Id's are bound by 82
 
                               Capability Geometry
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 66 75 78
+                              EntryPoint Geometry 4  "main" 66 75 77 79 81
                               ExecutionMode 4 InputPoints
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputTriangleStrip
@@ -187,14 +191,14 @@ output primitive = triangle_strip
                               Name 69  "param"
                               Name 71  "param"
                               Name 75  "OutputStream.Pos"
-                              Name 76  "PSInput"
-                              MemberName 76(PSInput) 0  "TexCoord"
-                              MemberName 76(PSInput) 1  "TerrainPos"
-                              MemberName 76(PSInput) 2  "VertexID"
-                              Name 78  "OutputStream"
+                              Name 77  "OutputStream.TexCoord"
+                              Name 79  "OutputStream.TerrainPos"
+                              Name 81  "OutputStream.VertexID"
                               Decorate 66(v) Location 0
                               Decorate 75(OutputStream.Pos) BuiltIn Position
-                              Decorate 78(OutputStream) Location 0
+                              Decorate 77(OutputStream.TexCoord) Location 0
+                              Decorate 79(OutputStream.TerrainPos) Location 1
+                              Decorate 81(OutputStream.VertexID) Location 2
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 0
@@ -229,9 +233,12 @@ output primitive = triangle_strip
            66(v):     65(ptr) Variable Input
               74:             TypePointer Output 11(fvec4)
 75(OutputStream.Pos):     74(ptr) Variable Output
-     76(PSInput):             TypeStruct 12(fvec2) 13(fvec3) 6(int)
-              77:             TypePointer Output 76(PSInput)
-78(OutputStream):     77(ptr) Variable Output
+              76:             TypePointer Output 12(fvec2)
+77(OutputStream.TexCoord):     76(ptr) Variable Output
+              78:             TypePointer Output 13(fvec3)
+79(OutputStream.TerrainPos):     78(ptr) Variable Output
+              80:             TypePointer Output 6(int)
+81(OutputStream.VertexID):     80(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            64(v):      9(ptr) Variable Function
index ce2f50d..4906678 100644 (file)
@@ -30,13 +30,7 @@ gl_FragCoord origin is upper left
 0:7                0 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                0 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[0].f' (layout( location=1) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -57,13 +51,7 @@ gl_FragCoord origin is upper left
 0:7                1 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                1 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[1].f' (layout( location=2) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -84,13 +72,7 @@ gl_FragCoord origin is upper left
 0:7                2 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                2 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[2].f' (layout( location=3) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -112,7 +94,9 @@ gl_FragCoord origin is upper left
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'i' (layout( location=0) flat in int)
 0:?     'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
-0:?     'input' (layout( location=1) in 3-element array of structure{ temp float f})
+0:?     'input[0].f' (layout( location=1) in float)
+0:?     'input[1].f' (layout( location=2) in float)
+0:?     'input[2].f' (layout( location=3) in float)
 
 
 Linked fragment stage:
@@ -149,13 +133,7 @@ gl_FragCoord origin is upper left
 0:7                0 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                0 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[0].f' (layout( location=1) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -176,13 +154,7 @@ gl_FragCoord origin is upper left
 0:7                1 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                1 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[1].f' (layout( location=2) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -203,13 +175,7 @@ gl_FragCoord origin is upper left
 0:7                2 (const int)
 0:7            Constant:
 0:7              0 (const int)
-0:7          f: direct index for structure ( temp float)
-0:7            direct index (layout( location=1) in structure{ temp float f})
-0:7              'input' (layout( location=1) in 3-element array of structure{ temp float f})
-0:7              Constant:
-0:7                2 (const int)
-0:7            Constant:
-0:7              0 (const int)
+0:?           'input[2].f' (layout( location=3) in float)
 0:7        move second child to first child ( temp 4-component vector of float)
 0:7          pos: direct index for structure ( temp 4-component vector of float)
 0:7            direct index ( temp structure{ temp float f,  temp 4-component vector of float pos})
@@ -231,16 +197,18 @@ gl_FragCoord origin is upper left
 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
 0:?     'i' (layout( location=0) flat in int)
 0:?     'input.pos' ( in 3-element array of 4-component vector of float FragCoord)
-0:?     'input' (layout( location=1) in 3-element array of structure{ temp float f})
+0:?     'input[0].f' (layout( location=1) in float)
+0:?     'input[1].f' (layout( location=2) in float)
+0:?     'input[2].f' (layout( location=3) in float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 73
+// Id's are bound by 69
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Fragment 4  "main" 32 39 48 67
+                              EntryPoint Fragment 4  "main" 32 37 44 49 56 63
                               ExecutionMode 4 OriginUpperLeft
                               Source HLSL 500
                               Name 4  "main"
@@ -254,18 +222,20 @@ gl_FragCoord origin is upper left
                               Name 30  "i"
                               Name 32  "i"
                               Name 34  "input"
-                              Name 36  "S"
-                              MemberName 36(S) 0  "f"
-                              Name 39  "input"
-                              Name 48  "input.pos"
-                              Name 67  "@entryPointOutput"
-                              Name 68  "param"
-                              Name 70  "param"
+                              Name 37  "input[0].f"
+                              Name 44  "input.pos"
+                              Name 49  "input[1].f"
+                              Name 56  "input[2].f"
+                              Name 63  "@entryPointOutput"
+                              Name 64  "param"
+                              Name 66  "param"
                               Decorate 32(i) Flat
                               Decorate 32(i) Location 0
-                              Decorate 39(input) Location 1
-                              Decorate 48(input.pos) BuiltIn FragCoord
-                              Decorate 67(@entryPointOutput) Location 0
+                              Decorate 37(input[0].f) Location 1
+                              Decorate 44(input.pos) BuiltIn FragCoord
+                              Decorate 49(input[1].f) Location 2
+                              Decorate 56(input[2].f) Location 3
+                              Decorate 63(@entryPointOutput) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
@@ -285,58 +255,54 @@ gl_FragCoord origin is upper left
               31:             TypePointer Input 6(int)
            32(i):     31(ptr) Variable Input
               35:      6(int) Constant 0
-           36(S):             TypeStruct 8(float)
-              37:             TypeArray 36(S) 12
-              38:             TypePointer Input 37
-       39(input):     38(ptr) Variable Input
-              40:             TypePointer Input 8(float)
-              43:             TypePointer Function 8(float)
-              45:      6(int) Constant 1
-              46:             TypeArray 9(fvec4) 12
-              47:             TypePointer Input 46
-   48(input.pos):     47(ptr) Variable Input
-              49:             TypePointer Input 9(fvec4)
-              59:      6(int) Constant 2
-              66:             TypePointer Output 9(fvec4)
-67(@entryPointOutput):     66(ptr) Variable Output
+              36:             TypePointer Input 8(float)
+  37(input[0].f):     36(ptr) Variable Input
+              39:             TypePointer Function 8(float)
+              41:      6(int) Constant 1
+              42:             TypeArray 9(fvec4) 12
+              43:             TypePointer Input 42
+   44(input.pos):     43(ptr) Variable Input
+              45:             TypePointer Input 9(fvec4)
+  49(input[1].f):     36(ptr) Variable Input
+              55:      6(int) Constant 2
+  56(input[2].f):     36(ptr) Variable Input
+              62:             TypePointer Output 9(fvec4)
+63(@entryPointOutput):     62(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            30(i):      7(ptr) Variable Function
        34(input):     14(ptr) Variable Function
-       68(param):      7(ptr) Variable Function
-       70(param):     14(ptr) Variable Function
+       64(param):      7(ptr) Variable Function
+       66(param):     14(ptr) Variable Function
               33:      6(int) Load 32(i)
                               Store 30(i) 33
-              41:     40(ptr) AccessChain 39(input) 35 35
-              42:    8(float) Load 41
-              44:     43(ptr) AccessChain 34(input) 35 35
-                              Store 44 42
-              50:     49(ptr) AccessChain 48(input.pos) 35
-              51:    9(fvec4) Load 50
-              52:     25(ptr) AccessChain 34(input) 35 45
-                              Store 52 51
-              53:     40(ptr) AccessChain 39(input) 45 35
-              54:    8(float) Load 53
-              55:     43(ptr) AccessChain 34(input) 45 35
-                              Store 55 54
-              56:     49(ptr) AccessChain 48(input.pos) 45
-              57:    9(fvec4) Load 56
-              58:     25(ptr) AccessChain 34(input) 45 45
+              38:    8(float) Load 37(input[0].f)
+              40:     39(ptr) AccessChain 34(input) 35 35
+                              Store 40 38
+              46:     45(ptr) AccessChain 44(input.pos) 35
+              47:    9(fvec4) Load 46
+              48:     25(ptr) AccessChain 34(input) 35 41
+                              Store 48 47
+              50:    8(float) Load 49(input[1].f)
+              51:     39(ptr) AccessChain 34(input) 41 35
+                              Store 51 50
+              52:     45(ptr) AccessChain 44(input.pos) 41
+              53:    9(fvec4) Load 52
+              54:     25(ptr) AccessChain 34(input) 41 41
+                              Store 54 53
+              57:    8(float) Load 56(input[2].f)
+              58:     39(ptr) AccessChain 34(input) 55 35
                               Store 58 57
-              60:     40(ptr) AccessChain 39(input) 59 35
-              61:    8(float) Load 60
-              62:     43(ptr) AccessChain 34(input) 59 35
-                              Store 62 61
-              63:     49(ptr) AccessChain 48(input.pos) 59
-              64:    9(fvec4) Load 63
-              65:     25(ptr) AccessChain 34(input) 59 45
-                              Store 65 64
-              69:      6(int) Load 30(i)
-                              Store 68(param) 69
-              71:          13 Load 34(input)
-                              Store 70(param) 71
-              72:    9(fvec4) FunctionCall 18(@main(i1;struct-S-f1-vf41[3];) 68(param) 70(param)
-                              Store 67(@entryPointOutput) 72
+              59:     45(ptr) AccessChain 44(input.pos) 55
+              60:    9(fvec4) Load 59
+              61:     25(ptr) AccessChain 34(input) 55 41
+                              Store 61 60
+              65:      6(int) Load 30(i)
+                              Store 64(param) 65
+              67:          13 Load 34(input)
+                              Store 66(param) 67
+              68:    9(fvec4) FunctionCall 18(@main(i1;struct-S-f1-vf41[3];) 64(param) 66(param)
+                              Store 63(@entryPointOutput) 68
                               Return
                               FunctionEnd
 18(@main(i1;struct-S-f1-vf41[3];):    9(fvec4) Function None 15
index 1921ef2..bbbbe9a 100644 (file)
@@ -79,10 +79,7 @@ Shader version: 500
 0:22          Function Call: @main(struct-VS_INPUT-i1-vf4-i11; ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22        move second child to first child ( temp int)
-0:22          x0_out: direct index for structure ( temp int)
-0:22            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:22            Constant:
-0:22              0 (const int)
+0:?           '@entryPointOutput.x0_out' (layout( location=0) out int)
 0:22          x0_out: direct index for structure ( temp int)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
@@ -94,17 +91,15 @@ Shader version: 500
 0:22            Constant:
 0:22              1 (const int)
 0:22        move second child to first child ( temp int)
-0:22          x1_out: direct index for structure ( temp int)
-0:22            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:22            Constant:
-0:22              1 (const int)
+0:?           '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:22          x1_out: direct index for structure ( temp int)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
 0:22              2 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
+0:?     '@entryPointOutput.x0_out' (layout( location=0) out int)
+0:?     '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:?     'vsin.x0_in' (layout( location=0) in int)
 0:?     'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
 0:?     'vsin.x1_in' (layout( location=2) in int)
@@ -193,10 +188,7 @@ Shader version: 500
 0:22          Function Call: @main(struct-VS_INPUT-i1-vf4-i11; ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:?             'vsin' ( temp structure{ temp int x0_in,  temp 4-component vector of float Pos_in,  temp int x1_in})
 0:22        move second child to first child ( temp int)
-0:22          x0_out: direct index for structure ( temp int)
-0:22            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:22            Constant:
-0:22              0 (const int)
+0:?           '@entryPointOutput.x0_out' (layout( location=0) out int)
 0:22          x0_out: direct index for structure ( temp int)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
@@ -208,29 +200,27 @@ Shader version: 500
 0:22            Constant:
 0:22              1 (const int)
 0:22        move second child to first child ( temp int)
-0:22          x1_out: direct index for structure ( temp int)
-0:22            '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
-0:22            Constant:
-0:22              1 (const int)
+0:?           '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:22          x1_out: direct index for structure ( temp int)
 0:22            'flattenTemp' ( temp structure{ temp int x0_out,  temp 4-component vector of float Pos_out,  temp int x1_out})
 0:22            Constant:
 0:22              2 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.Pos_out' ( out 4-component vector of float Position)
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out,  temp int x1_out})
+0:?     '@entryPointOutput.x0_out' (layout( location=0) out int)
+0:?     '@entryPointOutput.x1_out' (layout( location=1) out int)
 0:?     'vsin.x0_in' (layout( location=0) in int)
 0:?     'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
 0:?     'vsin.x1_in' (layout( location=2) in int)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 80
+// Id's are bound by 77
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 52 56 59 68 74
+                              EntryPoint Vertex 4  "main" 52 56 59 67 71 74
                               Source HLSL 500
                               Name 4  "main"
                               Name 9  "VS_INPUT"
@@ -255,16 +245,15 @@ Shader version: 500
                               Name 59  "vsin.x1_in"
                               Name 62  "flattenTemp"
                               Name 63  "param"
-                              Name 66  "VS_OUTPUT"
-                              MemberName 66(VS_OUTPUT) 0  "x0_out"
-                              MemberName 66(VS_OUTPUT) 1  "x1_out"
-                              Name 68  "@entryPointOutput"
-                              Name 74  "@entryPointOutput.Pos_out"
+                              Name 67  "@entryPointOutput.x0_out"
+                              Name 71  "@entryPointOutput.Pos_out"
+                              Name 74  "@entryPointOutput.x1_out"
                               Decorate 52(vsin.x0_in) Location 0
                               Decorate 56(vsin.Pos_in) Location 1
                               Decorate 59(vsin.x1_in) Location 2
-                              Decorate 68(@entryPointOutput) Location 0
-                              Decorate 74(@entryPointOutput.Pos_out) BuiltIn Position
+                              Decorate 67(@entryPointOutput.x0_out) Location 0
+                              Decorate 71(@entryPointOutput.Pos_out) BuiltIn Position
+                              Decorate 74(@entryPointOutput.x1_out) Location 1
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeInt 32 1
@@ -286,12 +275,11 @@ Shader version: 500
               55:             TypePointer Input 8(fvec4)
  56(vsin.Pos_in):     55(ptr) Variable Input
   59(vsin.x1_in):     51(ptr) Variable Input
-   66(VS_OUTPUT):             TypeStruct 6(int) 6(int)
-              67:             TypePointer Output 66(VS_OUTPUT)
-68(@entryPointOutput):     67(ptr) Variable Output
-              71:             TypePointer Output 6(int)
-              73:             TypePointer Output 8(fvec4)
-74(@entryPointOutput.Pos_out):     73(ptr) Variable Output
+              66:             TypePointer Output 6(int)
+67(@entryPointOutput.x0_out):     66(ptr) Variable Output
+              70:             TypePointer Output 8(fvec4)
+71(@entryPointOutput.Pos_out):     70(ptr) Variable Output
+74(@entryPointOutput.x1_out):     66(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
         50(vsin):     10(ptr) Variable Function
@@ -310,17 +298,15 @@ Shader version: 500
                               Store 63(param) 64
               65:11(VS_OUTPUT) FunctionCall 20(@main(struct-VS_INPUT-i1-vf4-i11;) 63(param)
                               Store 62(flattenTemp) 65
-              69:     31(ptr) AccessChain 62(flattenTemp) 30
-              70:      6(int) Load 69
-              72:     71(ptr) AccessChain 68(@entryPointOutput) 30
-                              Store 72 70
-              75:     23(ptr) AccessChain 62(flattenTemp) 22
-              76:    8(fvec4) Load 75
-                              Store 74(@entryPointOutput.Pos_out) 76
-              77:     31(ptr) AccessChain 62(flattenTemp) 38
-              78:      6(int) Load 77
-              79:     71(ptr) AccessChain 68(@entryPointOutput) 22
-                              Store 79 78
+              68:     31(ptr) AccessChain 62(flattenTemp) 30
+              69:      6(int) Load 68
+                              Store 67(@entryPointOutput.x0_out) 69
+              72:     23(ptr) AccessChain 62(flattenTemp) 22
+              73:    8(fvec4) Load 72
+                              Store 71(@entryPointOutput.Pos_out) 73
+              75:     31(ptr) AccessChain 62(flattenTemp) 38
+              76:      6(int) Load 75
+                              Store 74(@entryPointOutput.x1_out) 76
                               Return
                               FunctionEnd
 16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;):           2 Function None 13
index 3a103ae..d01d9bd 100644 (file)
@@ -73,7 +73,7 @@ output primitive = triangle_strip
 0:33      Sequence
 0:33        Sequence
 0:33          move second child to first child ( temp 4-component vector of float)
-0:?             'ts.psIn.pos' ( out 4-component vector of float Position)
+0:?             'ts.pos' ( out 4-component vector of float Position)
 0:33            pos: direct index for structure ( temp 4-component vector of float)
 0:33              psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
@@ -82,13 +82,7 @@ output primitive = triangle_strip
 0:33              Constant:
 0:33                0 (const int)
 0:33          move second child to first child ( temp 2-component vector of float)
-0:33            tc: direct index for structure ( temp 2-component vector of float)
-0:33              psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
-0:33                'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
-0:33                Constant:
-0:33                  0 (const int)
-0:33              Constant:
-0:33                0 (const int)
+0:?             'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
 0:33            tc: direct index for structure ( temp 2-component vector of float)
 0:33              psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
@@ -96,13 +90,37 @@ output primitive = triangle_strip
 0:33                  0 (const int)
 0:33              Constant:
 0:33                1 (const int)
-0:33          move second child to first child ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33            contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33              'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33          move second child to first child ( temp float)
+0:?             'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
+0:33            direct index ( temp float)
+0:33              m0_array: direct index for structure ( temp 2-element array of float)
+0:33                contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                  'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                  Constant:
+0:33                    1 (const int)
+0:33                Constant:
+0:33                  0 (const int)
+0:33              Constant:
+0:33                0 (const int)
+0:33          move second child to first child ( temp float)
+0:?             'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float)
+0:33            direct index ( temp float)
+0:33              m0_array: direct index for structure ( temp 2-element array of float)
+0:33                contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                  'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                  Constant:
+0:33                    1 (const int)
+0:33                Constant:
+0:33                  0 (const int)
 0:33              Constant:
 0:33                1 (const int)
-0:33            contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33              'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33          move second child to first child ( temp int)
+0:?             'ts.contains_no_builtin_io.m1' (layout( location=3) out int)
+0:33            m1: direct index for structure ( temp int)
+0:33              contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                Constant:
+0:33                  1 (const int)
 0:33              Constant:
 0:33                1 (const int)
 0:33        EmitVertex ( temp void)
@@ -197,8 +215,11 @@ output primitive = triangle_strip
 0:?   Linker Objects
 0:?     'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:?     'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
-0:?     'ts.psIn.pos' ( out 4-component vector of float Position)
-0:?     'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:?     'ts.pos' ( out 4-component vector of float Position)
+0:?     'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
+0:?     'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
+0:?     'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float)
+0:?     'ts.contains_no_builtin_io.m1' (layout( location=3) out int)
 
 
 Linked geometry stage:
@@ -278,7 +299,7 @@ output primitive = triangle_strip
 0:33      Sequence
 0:33        Sequence
 0:33          move second child to first child ( temp 4-component vector of float)
-0:?             'ts.psIn.pos' ( out 4-component vector of float Position)
+0:?             'ts.pos' ( out 4-component vector of float Position)
 0:33            pos: direct index for structure ( temp 4-component vector of float)
 0:33              psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
@@ -287,13 +308,7 @@ output primitive = triangle_strip
 0:33              Constant:
 0:33                0 (const int)
 0:33          move second child to first child ( temp 2-component vector of float)
-0:33            tc: direct index for structure ( temp 2-component vector of float)
-0:33              psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc})
-0:33                'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
-0:33                Constant:
-0:33                  0 (const int)
-0:33              Constant:
-0:33                0 (const int)
+0:?             'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
 0:33            tc: direct index for structure ( temp 2-component vector of float)
 0:33              psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc})
 0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
@@ -301,13 +316,37 @@ output primitive = triangle_strip
 0:33                  0 (const int)
 0:33              Constant:
 0:33                1 (const int)
-0:33          move second child to first child ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33            contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33              'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33          move second child to first child ( temp float)
+0:?             'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
+0:33            direct index ( temp float)
+0:33              m0_array: direct index for structure ( temp 2-element array of float)
+0:33                contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                  'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                  Constant:
+0:33                    1 (const int)
+0:33                Constant:
+0:33                  0 (const int)
+0:33              Constant:
+0:33                0 (const int)
+0:33          move second child to first child ( temp float)
+0:?             'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float)
+0:33            direct index ( temp float)
+0:33              m0_array: direct index for structure ( temp 2-element array of float)
+0:33                contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                  'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                  Constant:
+0:33                    1 (const int)
+0:33                Constant:
+0:33                  0 (const int)
 0:33              Constant:
 0:33                1 (const int)
-0:33            contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
-0:33              'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33          move second child to first child ( temp int)
+0:?             'ts.contains_no_builtin_io.m1' (layout( location=3) out int)
+0:33            m1: direct index for structure ( temp int)
+0:33              contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array,  temp int m1})
+0:33                'o' ( temp structure{ temp structure{ temp 4-component vector of float pos,  temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:33                Constant:
+0:33                  1 (const int)
 0:33              Constant:
 0:33                1 (const int)
 0:33        EmitVertex ( temp void)
@@ -402,17 +441,20 @@ output primitive = triangle_strip
 0:?   Linker Objects
 0:?     'tin.pos' ( in 3-element array of 4-component vector of float Position)
 0:?     'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
-0:?     'ts.psIn.pos' ( out 4-component vector of float Position)
-0:?     'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn,  temp structure{ temp 2-element array of float m0_array,  temp int m1} contains_no_builtin_io})
+0:?     'ts.pos' ( out 4-component vector of float Position)
+0:?     'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
+0:?     'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
+0:?     'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float)
+0:?     'ts.contains_no_builtin_io.m1' (layout( location=3) out int)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 105
+// Id's are bound by 100
 
                               Capability Geometry
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 48 55 74 82
+                              EntryPoint Geometry 4  "main" 48 52 56 59 63 69 77
                               ExecutionMode 4 Triangles
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputTriangleStrip
@@ -432,28 +474,26 @@ output primitive = triangle_strip
                               Name 21  "tin"
                               Name 22  "ts"
                               Name 25  "o"
-                              Name 48  "ts.psIn.pos"
-                              Name 51  "PS_IN"
-                              MemberName 51(PS_IN) 0  "tc"
-                              Name 52  "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
-                              MemberName 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0  "m0_array"
-                              MemberName 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1  "m1"
-                              Name 53  "GS_OUT"
-                              MemberName 53(GS_OUT) 0  "psIn"
-                              MemberName 53(GS_OUT) 1  "contains_no_builtin_io"
-                              Name 55  "ts"
-                              Name 71  "tin"
-                              Name 74  "tin.pos"
-                              Name 79  "PS_IN"
-                              MemberName 79(PS_IN) 0  "tc"
-                              Name 82  "tin"
-                              Name 99  "ts"
-                              Name 100  "param"
-                              Name 102  "param"
-                              Decorate 48(ts.psIn.pos) BuiltIn Position
-                              Decorate 55(ts) Location 0
-                              Decorate 74(tin.pos) BuiltIn Position
-                              Decorate 82(tin) Location 0
+                              Name 48  "ts.pos"
+                              Name 52  "ts.psIn.tc"
+                              Name 56  "ts.contains_no_builtin_io.m0_array[0]"
+                              Name 59  "ts.contains_no_builtin_io.m0_array[1]"
+                              Name 63  "ts.contains_no_builtin_io.m1"
+                              Name 66  "tin"
+                              Name 69  "tin.pos"
+                              Name 74  "PS_IN"
+                              MemberName 74(PS_IN) 0  "tc"
+                              Name 77  "tin"
+                              Name 94  "ts"
+                              Name 95  "param"
+                              Name 97  "param"
+                              Decorate 48(ts.pos) BuiltIn Position
+                              Decorate 52(ts.psIn.tc) Location 0
+                              Decorate 56(ts.contains_no_builtin_io.m0_array[0]) Location 1
+                              Decorate 59(ts.contains_no_builtin_io.m0_array[1]) Location 2
+                              Decorate 63(ts.contains_no_builtin_io.m1) Location 3
+                              Decorate 69(tin.pos) BuiltIn Position
+                              Decorate 77(tin) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -488,61 +528,58 @@ output primitive = triangle_strip
               44:     16(int) Constant 2
               45:             TypePointer Function 16(int)
               47:             TypePointer Output 7(fvec4)
- 48(ts.psIn.pos):     47(ptr) Variable Output
-       51(PS_IN):             TypeStruct 8(fvec2)
-52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO):             TypeStruct 15 16(int)
-      53(GS_OUT):             TypeStruct 51(PS_IN) 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
-              54:             TypePointer Output 53(GS_OUT)
-          55(ts):     54(ptr) Variable Output
-              58:             TypePointer Output 8(fvec2)
-              60:             TypePointer Function 17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
-              63:             TypePointer Output 52(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
-              66:             TypePointer Output 15
-              69:             TypePointer Output 16(int)
-              72:             TypeArray 7(fvec4) 11
-              73:             TypePointer Input 72
-     74(tin.pos):     73(ptr) Variable Input
-              75:             TypePointer Input 7(fvec4)
-       79(PS_IN):             TypeStruct 8(fvec2)
-              80:             TypeArray 79(PS_IN) 11
-              81:             TypePointer Input 80
-         82(tin):     81(ptr) Variable Input
-              83:             TypePointer Input 8(fvec2)
+      48(ts.pos):     47(ptr) Variable Output
+              51:             TypePointer Output 8(fvec2)
+  52(ts.psIn.tc):     51(ptr) Variable Output
+              55:             TypePointer Output 6(float)
+56(ts.contains_no_builtin_io.m0_array[0]):     55(ptr) Variable Output
+59(ts.contains_no_builtin_io.m0_array[1]):     55(ptr) Variable Output
+              62:             TypePointer Output 16(int)
+63(ts.contains_no_builtin_io.m1):     62(ptr) Variable Output
+              67:             TypeArray 7(fvec4) 11
+              68:             TypePointer Input 67
+     69(tin.pos):     68(ptr) Variable Input
+              70:             TypePointer Input 7(fvec4)
+       74(PS_IN):             TypeStruct 8(fvec2)
+              75:             TypeArray 74(PS_IN) 11
+              76:             TypePointer Input 75
+         77(tin):     76(ptr) Variable Input
+              78:             TypePointer Input 8(fvec2)
          4(main):           2 Function None 3
                5:             Label
-         71(tin):     13(ptr) Variable Function
-          99(ts):     19(ptr) Variable Function
-      100(param):     13(ptr) Variable Function
-      102(param):     19(ptr) Variable Function
-              76:     75(ptr) AccessChain 74(tin.pos) 26
-              77:    7(fvec4) Load 76
-              78:     32(ptr) AccessChain 71(tin) 26 26
-                              Store 78 77
-              84:     83(ptr) AccessChain 82(tin) 26 26
-              85:    8(fvec2) Load 84
-              86:     38(ptr) AccessChain 71(tin) 26 34
-                              Store 86 85
-              87:     75(ptr) AccessChain 74(tin.pos) 34
-              88:    7(fvec4) Load 87
-              89:     32(ptr) AccessChain 71(tin) 34 26
-                              Store 89 88
-              90:     83(ptr) AccessChain 82(tin) 34 26
-              91:    8(fvec2) Load 90
-              92:     38(ptr) AccessChain 71(tin) 34 34
-                              Store 92 91
-              93:     75(ptr) AccessChain 74(tin.pos) 44
-              94:    7(fvec4) Load 93
-              95:     32(ptr) AccessChain 71(tin) 44 26
-                              Store 95 94
-              96:     83(ptr) AccessChain 82(tin) 44 26
-              97:    8(fvec2) Load 96
-              98:     38(ptr) AccessChain 71(tin) 44 34
-                              Store 98 97
-             101:          12 Load 71(tin)
-                              Store 100(param) 101
-             103:           2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 100(param) 102(param)
-             104:  18(GS_OUT) Load 102(param)
-                              Store 99(ts) 104
+         66(tin):     13(ptr) Variable Function
+          94(ts):     19(ptr) Variable Function
+       95(param):     13(ptr) Variable Function
+       97(param):     19(ptr) Variable Function
+              71:     70(ptr) AccessChain 69(tin.pos) 26
+              72:    7(fvec4) Load 71
+              73:     32(ptr) AccessChain 66(tin) 26 26
+                              Store 73 72
+              79:     78(ptr) AccessChain 77(tin) 26 26
+              80:    8(fvec2) Load 79
+              81:     38(ptr) AccessChain 66(tin) 26 34
+                              Store 81 80
+              82:     70(ptr) AccessChain 69(tin.pos) 34
+              83:    7(fvec4) Load 82
+              84:     32(ptr) AccessChain 66(tin) 34 26
+                              Store 84 83
+              85:     78(ptr) AccessChain 77(tin) 34 26
+              86:    8(fvec2) Load 85
+              87:     38(ptr) AccessChain 66(tin) 34 34
+                              Store 87 86
+              88:     70(ptr) AccessChain 69(tin.pos) 44
+              89:    7(fvec4) Load 88
+              90:     32(ptr) AccessChain 66(tin) 44 26
+                              Store 90 89
+              91:     78(ptr) AccessChain 77(tin) 44 26
+              92:    8(fvec2) Load 91
+              93:     38(ptr) AccessChain 66(tin) 44 34
+                              Store 93 92
+              96:          12 Load 66(tin)
+                              Store 95(param) 96
+              98:           2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 95(param) 97(param)
+              99:  18(GS_OUT) Load 97(param)
+                              Store 94(ts) 99
                               Return
                               FunctionEnd
 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;):           2 Function None 20
@@ -562,20 +599,19 @@ output primitive = triangle_strip
                               Store 46 44
               49:     32(ptr) AccessChain 25(o) 26 26
               50:    7(fvec4) Load 49
-                              Store 48(ts.psIn.pos) 50
-              56:     38(ptr) AccessChain 25(o) 26 34
-              57:    8(fvec2) Load 56
-              59:     58(ptr) AccessChain 55(ts) 26 26
-                              Store 59 57
-              61:     60(ptr) AccessChain 25(o) 34
-              62:17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) Load 61
-              64:     63(ptr) AccessChain 55(ts) 34
-              65:          15 CompositeExtract 62 0
-              67:     66(ptr) AccessChain 64 26
-                              Store 67 65
-              68:     16(int) CompositeExtract 62 1
-              70:     69(ptr) AccessChain 64 34
-                              Store 70 68
+                              Store 48(ts.pos) 50
+              53:     38(ptr) AccessChain 25(o) 26 34
+              54:    8(fvec2) Load 53
+                              Store 52(ts.psIn.tc) 54
+              57:     41(ptr) AccessChain 25(o) 34 26 26
+              58:    6(float) Load 57
+                              Store 56(ts.contains_no_builtin_io.m0_array[0]) 58
+              60:     41(ptr) AccessChain 25(o) 34 26 34
+              61:    6(float) Load 60
+                              Store 59(ts.contains_no_builtin_io.m0_array[1]) 61
+              64:     45(ptr) AccessChain 25(o) 34 34
+              65:     16(int) Load 64
+                              Store 63(ts.contains_no_builtin_io.m1) 65
                               EmitVertex
                               Return
                               FunctionEnd
index 5675fb4..c11857d 100644 (file)
@@ -55,19 +55,13 @@ output primitive = triangle_strip
 0:22              Constant:
 0:22                0 (const int)
 0:22          move second child to first child ( temp 4-component vector of float)
-0:22            color: direct index for structure ( temp 4-component vector of float)
-0:22              'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:22              Constant:
-0:22                0 (const int)
+0:?             'outStream.color' (layout( location=0) out 4-component vector of float)
 0:22            color: direct index for structure ( temp 4-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
 0:22                1 (const int)
 0:22          move second child to first child ( temp 2-component vector of float)
-0:22            uv: direct index for structure ( temp 2-component vector of float)
-0:22              'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:22              Constant:
-0:22                1 (const int)
+0:?             'outStream.uv' (layout( location=1) out 2-component vector of float)
 0:22            uv: direct index for structure ( temp 2-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
@@ -85,7 +79,8 @@ output primitive = triangle_strip
 0:?   Linker Objects
 0:?     'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:?     'outStream.position' ( out 4-component vector of float Position)
-0:?     'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
+0:?     'outStream.color' (layout( location=0) out 4-component vector of float)
+0:?     'outStream.uv' (layout( location=1) out 2-component vector of float)
 
 
 Linked geometry stage:
@@ -147,19 +142,13 @@ output primitive = triangle_strip
 0:22              Constant:
 0:22                0 (const int)
 0:22          move second child to first child ( temp 4-component vector of float)
-0:22            color: direct index for structure ( temp 4-component vector of float)
-0:22              'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:22              Constant:
-0:22                0 (const int)
+0:?             'outStream.color' (layout( location=0) out 4-component vector of float)
 0:22            color: direct index for structure ( temp 4-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
 0:22                1 (const int)
 0:22          move second child to first child ( temp 2-component vector of float)
-0:22            uv: direct index for structure ( temp 2-component vector of float)
-0:22              'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
-0:22              Constant:
-0:22                1 (const int)
+0:?             'outStream.uv' (layout( location=1) out 2-component vector of float)
 0:22            uv: direct index for structure ( temp 2-component vector of float)
 0:22              'vout' ( temp structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:22              Constant:
@@ -177,16 +166,17 @@ output primitive = triangle_strip
 0:?   Linker Objects
 0:?     'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position,  temp 4-component vector of float color,  temp 2-component vector of float uv})
 0:?     'outStream.position' ( out 4-component vector of float Position)
-0:?     'outStream' (layout( location=0) out structure{ temp 4-component vector of float color,  temp 2-component vector of float uv})
+0:?     'outStream.color' (layout( location=0) out 4-component vector of float)
+0:?     'outStream.uv' (layout( location=1) out 2-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 61
+// Id's are bound by 58
 
                               Capability Geometry
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Geometry 4  "main" 38 43 53
+                              EntryPoint Geometry 4  "main" 38 41 45 50
                               ExecutionMode 4 InputLines
                               ExecutionMode 4 Invocations 1
                               ExecutionMode 4 OutputTriangleStrip
@@ -206,18 +196,17 @@ output primitive = triangle_strip
                               Name 18  "outStream"
                               Name 21  "vout"
                               Name 38  "outStream.position"
-                              Name 41  "PS_IN"
-                              MemberName 41(PS_IN) 0  "color"
-                              MemberName 41(PS_IN) 1  "uv"
-                              Name 43  "outStream"
-                              Name 51  "vin"
-                              Name 53  "vin"
-                              Name 55  "outStream"
-                              Name 56  "param"
-                              Name 58  "param"
+                              Name 41  "outStream.color"
+                              Name 45  "outStream.uv"
+                              Name 48  "vin"
+                              Name 50  "vin"
+                              Name 52  "outStream"
+                              Name 53  "param"
+                              Name 55  "param"
                               Decorate 38(outStream.position) BuiltIn Position
-                              Decorate 43(outStream) Location 0
-                              Decorate 53(vin) Location 0
+                              Decorate 41(outStream.color) Location 0
+                              Decorate 45(outStream.uv) Location 1
+                              Decorate 50(vin) Location 0
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -239,25 +228,24 @@ output primitive = triangle_strip
               33:     22(int) Constant 0
               37:             TypePointer Output 7(fvec4)
 38(outStream.position):     37(ptr) Variable Output
-       41(PS_IN):             TypeStruct 7(fvec4) 8(fvec2)
-              42:             TypePointer Output 41(PS_IN)
-   43(outStream):     42(ptr) Variable Output
-              49:             TypePointer Output 8(fvec2)
-              52:             TypePointer Input 12
-         53(vin):     52(ptr) Variable Input
+41(outStream.color):     37(ptr) Variable Output
+              44:             TypePointer Output 8(fvec2)
+45(outStream.uv):     44(ptr) Variable Output
+              49:             TypePointer Input 12
+         50(vin):     49(ptr) Variable Input
          4(main):           2 Function None 3
                5:             Label
-         51(vin):     13(ptr) Variable Function
-   55(outStream):     15(ptr) Variable Function
-       56(param):     13(ptr) Variable Function
-       58(param):     15(ptr) Variable Function
-              54:          12 Load 53(vin)
-                              Store 51(vin) 54
-              57:          12 Load 51(vin)
-                              Store 56(param) 57
-              59:           2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 56(param) 58(param)
-              60:   14(PS_IN) Load 58(param)
-                              Store 55(outStream) 60
+         48(vin):     13(ptr) Variable Function
+   52(outStream):     15(ptr) Variable Function
+       53(param):     13(ptr) Variable Function
+       55(param):     15(ptr) Variable Function
+              51:          12 Load 50(vin)
+                              Store 48(vin) 51
+              54:          12 Load 48(vin)
+                              Store 53(param) 54
+              56:           2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 53(param) 55(param)
+              57:   14(PS_IN) Load 55(param)
+                              Store 52(outStream) 57
                               Return
                               FunctionEnd
 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;):           2 Function None 16
@@ -280,14 +268,12 @@ output primitive = triangle_strip
               39:     24(ptr) AccessChain 21(vout) 33
               40:    7(fvec4) Load 39
                               Store 38(outStream.position) 40
-              44:     24(ptr) AccessChain 21(vout) 23
-              45:    7(fvec4) Load 44
-              46:     37(ptr) AccessChain 43(outStream) 33
-                              Store 46 45
-              47:     29(ptr) AccessChain 21(vout) 28
-              48:    8(fvec2) Load 47
-              50:     49(ptr) AccessChain 43(outStream) 23
-                              Store 50 48
+              42:     24(ptr) AccessChain 21(vout) 23
+              43:    7(fvec4) Load 42
+                              Store 41(outStream.color) 43
+              46:     29(ptr) AccessChain 21(vout) 28
+              47:    8(fvec2) Load 46
+                              Store 45(outStream.uv) 47
                               EmitVertex
                               Return
                               FunctionEnd
index 11a3e42..accd793 100755 (executable)
@@ -125,15 +125,24 @@ Shader version: 500
 0:?             'd' ( temp 4-component vector of float)
 0:?             'vi' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:?             'e' ( temp 4-component vector of float)
-0:8        move second child to first child ( temp 2-element array of 4-component vector of float)
-0:8          m: direct index for structure ( temp 2-element array of 4-component vector of float)
-0:8            '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
+0:8          direct index ( temp 4-component vector of float)
+0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
+0:8              'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8              Constant:
+0:8                0 (const int)
 0:8            Constant:
 0:8              0 (const int)
-0:8          m: direct index for structure ( temp 2-element array of 4-component vector of float)
-0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
+0:8          direct index ( temp 4-component vector of float)
+0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
+0:8              'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8              Constant:
+0:8                0 (const int)
 0:8            Constant:
-0:8              0 (const int)
+0:8              1 (const int)
 0:8        move second child to first child ( temp 4-component vector of float)
 0:?           '@entryPointOutput.coord' ( out 4-component vector of float Position)
 0:8          coord: direct index for structure ( temp 4-component vector of float)
@@ -141,17 +150,16 @@ Shader version: 500
 0:8            Constant:
 0:8              1 (const int)
 0:8        move second child to first child ( temp 4-component vector of float)
-0:8          b: direct index for structure ( smooth temp 4-component vector of float)
-0:8            '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
-0:8            Constant:
-0:8              1 (const int)
+0:?           '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
 0:8          b: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              2 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.coord' ( out 4-component vector of float Position)
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
+0:?     '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
+0:?     '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
 0:?     'd' (layout( location=0) in 4-component vector of float)
 0:?     'vi.m[0]' (layout( location=1) in 4-component vector of float)
 0:?     'vi.m[1]' (layout( location=2) in 4-component vector of float)
@@ -289,15 +297,24 @@ Shader version: 500
 0:?             'd' ( temp 4-component vector of float)
 0:?             'vi' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:?             'e' ( temp 4-component vector of float)
-0:8        move second child to first child ( temp 2-element array of 4-component vector of float)
-0:8          m: direct index for structure ( temp 2-element array of 4-component vector of float)
-0:8            '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
+0:8          direct index ( temp 4-component vector of float)
+0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
+0:8              'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8              Constant:
+0:8                0 (const int)
 0:8            Constant:
 0:8              0 (const int)
-0:8          m: direct index for structure ( temp 2-element array of 4-component vector of float)
-0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8        move second child to first child ( temp 4-component vector of float)
+0:?           '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
+0:8          direct index ( temp 4-component vector of float)
+0:8            m: direct index for structure ( temp 2-element array of 4-component vector of float)
+0:8              'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
+0:8              Constant:
+0:8                0 (const int)
 0:8            Constant:
-0:8              0 (const int)
+0:8              1 (const int)
 0:8        move second child to first child ( temp 4-component vector of float)
 0:?           '@entryPointOutput.coord' ( out 4-component vector of float Position)
 0:8          coord: direct index for structure ( temp 4-component vector of float)
@@ -305,17 +322,16 @@ Shader version: 500
 0:8            Constant:
 0:8              1 (const int)
 0:8        move second child to first child ( temp 4-component vector of float)
-0:8          b: direct index for structure ( smooth temp 4-component vector of float)
-0:8            '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
-0:8            Constant:
-0:8              1 (const int)
+0:?           '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
 0:8          b: direct index for structure ( temp 4-component vector of float)
 0:8            'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m,  temp 4-component vector of float coord,  temp 4-component vector of float b})
 0:8            Constant:
 0:8              2 (const int)
 0:?   Linker Objects
 0:?     '@entryPointOutput.coord' ( out 4-component vector of float Position)
-0:?     '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m,  smooth temp 4-component vector of float b})
+0:?     '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
+0:?     '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
+0:?     '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
 0:?     'd' (layout( location=0) in 4-component vector of float)
 0:?     'vi.m[0]' (layout( location=1) in 4-component vector of float)
 0:?     'vi.m[1]' (layout( location=2) in 4-component vector of float)
@@ -325,12 +341,12 @@ Shader version: 500
 
 // Module Version 10000
 // Generated by (magic number): 80001
-// Id's are bound by 96
+// Id's are bound by 94
 
                               Capability Shader
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
-                              EntryPoint Vertex 4  "main" 55 58 61 64 67 71 83 90
+                              EntryPoint Vertex 4  "main" 55 58 61 64 67 71 82 85 88 91
                               Source HLSL 500
                               Name 4  "main"
                               Name 12  "VI"
@@ -355,19 +371,20 @@ Shader version: 500
                               Name 74  "param"
                               Name 76  "param"
                               Name 78  "param"
-                              Name 81  "VI"
-                              MemberName 81(VI) 0  "m"
-                              MemberName 81(VI) 1  "b"
-                              Name 83  "@entryPointOutput"
-                              Name 90  "@entryPointOutput.coord"
+                              Name 82  "@entryPointOutput.m[0]"
+                              Name 85  "@entryPointOutput.m[1]"
+                              Name 88  "@entryPointOutput.coord"
+                              Name 91  "@entryPointOutput.b"
                               Decorate 55(d) Location 0
                               Decorate 58(vi.m[0]) Location 1
                               Decorate 61(vi.m[1]) Location 2
                               Decorate 64(vi.coord) Location 3
                               Decorate 67(vi.b) Location 4
                               Decorate 71(e) Location 5
-                              Decorate 83(@entryPointOutput) Location 0
-                              Decorate 90(@entryPointOutput.coord) BuiltIn Position
+                              Decorate 82(@entryPointOutput.m[0]) Location 0
+                              Decorate 85(@entryPointOutput.m[1]) Location 1
+                              Decorate 88(@entryPointOutput.coord) BuiltIn Position
+                              Decorate 91(@entryPointOutput.b) Location 2
                2:             TypeVoid
                3:             TypeFunction 2
                6:             TypeFloat 32
@@ -398,13 +415,11 @@ Shader version: 500
     64(vi.coord):     54(ptr) Variable Input
         67(vi.b):     54(ptr) Variable Input
            71(e):     54(ptr) Variable Input
-          81(VI):             TypeStruct 11 7(fvec4)
-              82:             TypePointer Output 81(VI)
-83(@entryPointOutput):     82(ptr) Variable Output
-              84:             TypePointer Function 11
-              87:             TypePointer Output 11
-              89:             TypePointer Output 7(fvec4)
-90(@entryPointOutput.coord):     89(ptr) Variable Output
+              81:             TypePointer Output 7(fvec4)
+82(@entryPointOutput.m[0]):     81(ptr) Variable Output
+85(@entryPointOutput.m[1]):     81(ptr) Variable Output
+88(@entryPointOutput.coord):     81(ptr) Variable Output
+91(@entryPointOutput.b):     81(ptr) Variable Output
          4(main):           2 Function None 3
                5:             Label
            53(d):      8(ptr) Variable Function
@@ -438,17 +453,18 @@ Shader version: 500
                               Store 78(param) 79
               80:      12(VI) FunctionCall 18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;) 74(param) 76(param) 78(param)
                               Store 73(flattenTemp) 80
-              85:     84(ptr) AccessChain 73(flattenTemp) 23
-              86:          11 Load 85
-              88:     87(ptr) AccessChain 83(@entryPointOutput) 23
-                              Store 88 86
-              91:      8(ptr) AccessChain 73(flattenTemp) 24
-              92:    7(fvec4) Load 91
-                              Store 90(@entryPointOutput.coord) 92
-              93:      8(ptr) AccessChain 73(flattenTemp) 22
-              94:    7(fvec4) Load 93
-              95:     89(ptr) AccessChain 83(@entryPointOutput) 24
-                              Store 95 94
+              83:      8(ptr) AccessChain 73(flattenTemp) 23 23
+              84:    7(fvec4) Load 83
+                              Store 82(@entryPointOutput.m[0]) 84
+              86:      8(ptr) AccessChain 73(flattenTemp) 23 24
+              87:    7(fvec4) Load 86
+                              Store 85(@entryPointOutput.m[1]) 87
+              89:      8(ptr) AccessChain 73(flattenTemp) 24
+              90:    7(fvec4) Load 89
+                              Store 88(@entryPointOutput.coord) 90
+              92:      8(ptr) AccessChain 73(flattenTemp) 22
+              93:    7(fvec4) Load 92
+                              Store 91(@entryPointOutput.b) 93
                               Return
                               FunctionEnd
 18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;):      12(VI) Function None 14
index 87a0d91..911adb9 100755 (executable)
@@ -1270,16 +1270,16 @@ int HlslParseContext::addFlattenedMember(const TVariable& variable, const TType&
         if (flattenData.nextBinding != TQualifier::layoutBindingEnd)
             memberVariable->getWritableType().getQualifier().layoutBinding = flattenData.nextBinding++;
 
-        if (!memberVariable->getType().isBuiltIn()) {
+        if (memberVariable->getType().isBuiltIn()) {
+            // inherited locations are nonsensical for built-ins (TODO: what if semantic had a number)
+            memberVariable->getWritableType().getQualifier().layoutLocation = TQualifier::layoutLocationEnd;
+        } else {
             // inherited locations must be auto bumped, not replicated
             if (flattenData.nextLocation != TQualifier::layoutLocationEnd) {
                 memberVariable->getWritableType().getQualifier().layoutLocation = flattenData.nextLocation;
                 flattenData.nextLocation += intermediate.computeTypeLocationSize(memberVariable->getType());
                 nextOutLocation = std::max(nextOutLocation, flattenData.nextLocation);
             }
-        } else {
-            // inherited locations are nonsensical for built-ins
-            memberVariable->getWritableType().getQualifier().layoutLocation = TQualifier::layoutLocationEnd;
         }
 
         flattenData.offsets.push_back(static_cast<int>(flattenData.members.size()));
@@ -1912,19 +1912,15 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
     // Further this return/in/out transform by flattening, splitting, and assigning locations
     const auto makeVariableInOut = [&](TVariable& variable) {
         if (variable.getType().isStruct()) {
-            const TStorageQualifier qualifier = variable.getType().getQualifier().storage;
-            // struct inputs to the vertex stage and outputs from the fragment stage must be flattened
-            if ((language == EShLangVertex   && qualifier == EvqVaryingIn) ||
-                (language == EShLangFragment && qualifier == EvqVaryingOut))
+            if (variable.getType().getQualifier().isArrayedIo(language)) {
+                if (variable.getType().containsBuiltIn())
+                    split(variable);
+            } else
                 flatten(variable, false /* don't track linkage here, it will be tracked in assignToInterface() */);
-            // Structs containing built-ins must be split
-            else if (variable.getType().containsBuiltIn())
-                split(variable);
-            else if (!variable.getType().getQualifier().isArrayedIo(language))
-                flatten(variable, false);
-            //else
-                // TODO: unify split and flatten, so all paths can create flattened I/O
         }
+        // TODO: flatten arrays too
+        // TODO: flatten everything in I/O
+        // TODO: replace all split with flatten, make all paths can create flattened I/O, then split code can be removed
 
         // For clip and cull distance, multiple output variables potentially get merged
         // into one in assignClipCullDistance.  That code in assignClipCullDistance
@@ -8694,6 +8690,7 @@ void HlslParseContext::correctInput(TQualifier& qualifier)
         qualifier.sample = false;
     }
 
+    // TODO: handle clip/cull on the input side; this doesn't work, see overwrite of .layoutLocation later
     if (isClipOrCullDistance(qualifier))
         qualifier.layoutLocation = TQualifier::layoutLocationEnd;