Commit e29ff3cd by John Kessenich

HLSL: Flatten structs for all non-arrayed I/O interfaces.

parent 01109546
hlsl.multiDescriptorSet.frag hlsl.multiDescriptorSet.frag
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 95 // Id's are bound by 92
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 78 83 89 EntryPoint Fragment 4 "main" 78 82 86
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source HLSL 500 Source HLSL 500
Name 4 "main" Name 4 "main"
...@@ -30,13 +30,11 @@ hlsl.multiDescriptorSet.frag ...@@ -30,13 +30,11 @@ hlsl.multiDescriptorSet.frag
Name 63 "samLinearA" Name 63 "samLinearA"
Name 76 "input" Name 76 "input"
Name 78 "input.Pos" Name 78 "input.Pos"
Name 81 "PS_INPUT" Name 82 "input.Tex"
MemberName 81(PS_INPUT) 0 "Tex" Name 86 "@entryPointOutput"
Name 83 "input" Name 87 "param"
Name 89 "@entryPointOutput" Name 90 "txDiffuseB"
Name 90 "param" Name 91 "samLinearB"
Name 93 "txDiffuseB"
Name 94 "samLinearB"
MemberDecorate 23(cbChangesEveryFrame) 0 RowMajor MemberDecorate 23(cbChangesEveryFrame) 0 RowMajor
MemberDecorate 23(cbChangesEveryFrame) 0 Offset 0 MemberDecorate 23(cbChangesEveryFrame) 0 Offset 0
MemberDecorate 23(cbChangesEveryFrame) 0 MatrixStride 16 MemberDecorate 23(cbChangesEveryFrame) 0 MatrixStride 16
...@@ -61,12 +59,12 @@ hlsl.multiDescriptorSet.frag ...@@ -61,12 +59,12 @@ hlsl.multiDescriptorSet.frag
Decorate 63(samLinearA) DescriptorSet 0 Decorate 63(samLinearA) DescriptorSet 0
Decorate 63(samLinearA) Binding 1 Decorate 63(samLinearA) Binding 1
Decorate 78(input.Pos) BuiltIn FragCoord Decorate 78(input.Pos) BuiltIn FragCoord
Decorate 83(input) Location 0 Decorate 82(input.Tex) Location 0
Decorate 89(@entryPointOutput) Location 0 Decorate 86(@entryPointOutput) Location 0
Decorate 93(txDiffuseB) DescriptorSet 1 Decorate 90(txDiffuseB) DescriptorSet 1
Decorate 93(txDiffuseB) Binding 0 Decorate 90(txDiffuseB) Binding 0
Decorate 94(samLinearB) DescriptorSet 1 Decorate 91(samLinearB) DescriptorSet 1
Decorate 94(samLinearB) Binding 1 Decorate 91(samLinearB) Binding 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -105,29 +103,26 @@ hlsl.multiDescriptorSet.frag ...@@ -105,29 +103,26 @@ hlsl.multiDescriptorSet.frag
70: TypePointer Uniform 7(fvec4) 70: TypePointer Uniform 7(fvec4)
77: TypePointer Input 7(fvec4) 77: TypePointer Input 7(fvec4)
78(input.Pos): 77(ptr) Variable Input 78(input.Pos): 77(ptr) Variable Input
81(PS_INPUT): TypeStruct 8(fvec2) 81: TypePointer Input 8(fvec2)
82: TypePointer Input 81(PS_INPUT) 82(input.Tex): 81(ptr) Variable Input
83(input): 82(ptr) Variable Input 85: TypePointer Output 7(fvec4)
84: TypePointer Input 8(fvec2) 86(@entryPointOutput): 85(ptr) Variable Output
88: TypePointer Output 7(fvec4) 90(txDiffuseB): 58(ptr) Variable UniformConstant
89(@entryPointOutput): 88(ptr) Variable Output 91(samLinearB): 62(ptr) Variable UniformConstant
93(txDiffuseB): 58(ptr) Variable UniformConstant
94(samLinearB): 62(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
76(input): 10(ptr) Variable Function 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) 79: 7(fvec4) Load 78(input.Pos)
80: 29(ptr) AccessChain 76(input) 21 80: 29(ptr) AccessChain 76(input) 21
Store 80 79 Store 80 79
85: 84(ptr) AccessChain 83(input) 21 83: 8(fvec2) Load 82(input.Tex)
86: 8(fvec2) Load 85 84: 53(ptr) AccessChain 76(input) 52
87: 53(ptr) AccessChain 76(input) 52 Store 84 83
Store 87 86 88: 9(PS_INPUT) Load 76(input)
91: 9(PS_INPUT) Load 76(input) Store 87(param) 88
Store 90(param) 91 89: 7(fvec4) FunctionCall 13(@main(struct-PS_INPUT-vf4-vf21;) 87(param)
92: 7(fvec4) FunctionCall 13(@main(struct-PS_INPUT-vf4-vf21;) 90(param) Store 86(@entryPointOutput) 89
Store 89(@entryPointOutput) 92
Return Return
FunctionEnd FunctionEnd
13(@main(struct-PS_INPUT-vf4-vf21;): 7(fvec4) Function None 11 13(@main(struct-PS_INPUT-vf4-vf21;): 7(fvec4) Function None 11
......
...@@ -149,17 +149,14 @@ Shader version: 500 ...@@ -149,17 +149,14 @@ Shader version: 500
0:29 Constant: 0:29 Constant:
0:29 0 (const int) 0:29 0 (const int)
0:29 move second child to first child ( temp 2-component vector of float) 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:? '@entryPointOutput.texCoord' (layout( location=0) out 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:29 texCoord: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp 4-component vector of float position, temp 2-component vector of float texCoord})
0:29 Constant: 0:29 Constant:
0:29 1 (const int) 0:29 1 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput.position' ( out 4-component vector of float Position) 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: Linked vertex stage:
...@@ -315,26 +312,23 @@ Shader version: 500 ...@@ -315,26 +312,23 @@ Shader version: 500
0:29 Constant: 0:29 Constant:
0:29 0 (const int) 0:29 0 (const int)
0:29 move second child to first child ( temp 2-component vector of float) 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:? '@entryPointOutput.texCoord' (layout( location=0) out 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:29 texCoord: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp 4-component vector of float position, temp 2-component vector of float texCoord})
0:29 Constant: 0:29 Constant:
0:29 1 (const int) 0:29 1 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput.position' ( out 4-component vector of float Position) 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 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 123 // Id's are bound by 120
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 108 116 EntryPoint Vertex 4 "main" 108 115
Source HLSL 500 Source HLSL 500
Name 4 "main" Name 4 "main"
Name 9 "VertexOut" Name 9 "VertexOut"
...@@ -360,11 +354,9 @@ Shader version: 500 ...@@ -360,11 +354,9 @@ Shader version: 500
Name 98 "v5" Name 98 "v5"
Name 105 "flattenTemp" Name 105 "flattenTemp"
Name 108 "@entryPointOutput.position" Name 108 "@entryPointOutput.position"
Name 114 "VertexOut" Name 115 "@entryPointOutput.texCoord"
MemberName 114(VertexOut) 0 "texCoord"
Name 116 "@entryPointOutput"
Decorate 108(@entryPointOutput.position) BuiltIn Position Decorate 108(@entryPointOutput.position) BuiltIn Position
Decorate 116(@entryPointOutput) Location 0 Decorate 115(@entryPointOutput.texCoord) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -395,12 +387,10 @@ Shader version: 500 ...@@ -395,12 +387,10 @@ Shader version: 500
109: TypeInt 32 1 109: TypeInt 32 1
110: 109(int) Constant 0 110: 109(int) Constant 0
111: TypePointer Function 7(fvec4) 111: TypePointer Function 7(fvec4)
114(VertexOut): TypeStruct 8(fvec2) 114: TypePointer Output 8(fvec2)
115: TypePointer Output 114(VertexOut) 115(@entryPointOutput.texCoord): 114(ptr) Variable Output
116(@entryPointOutput): 115(ptr) Variable Output 116: 109(int) Constant 1
117: 109(int) Constant 1 117: TypePointer Function 8(fvec2)
118: TypePointer Function 8(fvec2)
121: TypePointer Output 8(fvec2)
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
105(flattenTemp): 87(ptr) Variable Function 105(flattenTemp): 87(ptr) Variable Function
...@@ -409,10 +399,9 @@ Shader version: 500 ...@@ -409,10 +399,9 @@ Shader version: 500
112: 111(ptr) AccessChain 105(flattenTemp) 110 112: 111(ptr) AccessChain 105(flattenTemp) 110
113: 7(fvec4) Load 112 113: 7(fvec4) Load 112
Store 108(@entryPointOutput.position) 113 Store 108(@entryPointOutput.position) 113
119: 118(ptr) AccessChain 105(flattenTemp) 117 118: 117(ptr) AccessChain 105(flattenTemp) 116
120: 8(fvec2) Load 119 119: 8(fvec2) Load 118
122: 121(ptr) AccessChain 116(@entryPointOutput) 110 Store 115(@entryPointOutput.texCoord) 119
Store 122 120
Return Return
FunctionEnd FunctionEnd
11(r0():9(VertexOut) Function None 10 11(r0():9(VertexOut) Function None 10
......
...@@ -51,10 +51,7 @@ output primitive = line_strip ...@@ -51,10 +51,7 @@ output primitive = line_strip
0:15 Constant: 0:15 Constant:
0:15 4 (const int) 0:15 4 (const int)
0:15 move second child to first child ( temp int) 0:15 move second child to first child ( temp int)
0:15 ii: direct index for structure ( temp int) 0:? 'OutputStream.ii' (layout( location=0) out int)
0:15 'OutputStream' (layout( location=0) out structure{ temp int ii})
0:15 Constant:
0:15 0 (const int)
0:15 ii: direct index for structure ( temp 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 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:15 Constant: 0:15 Constant:
...@@ -74,7 +71,7 @@ output primitive = line_strip ...@@ -74,7 +71,7 @@ output primitive = line_strip
0:? 'OutputStream.clip0' ( out float Position) 0:? 'OutputStream.clip0' ( out float Position)
0:? 'OutputStream.vpai' ( out uint ViewportIndex) 0:? 'OutputStream.vpai' ( out uint ViewportIndex)
0:? 'OutputStream.rtai' ( out uint Layer) 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.clip0' ( out 1-element array of float ClipDistance)
0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance) 0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance)
...@@ -134,10 +131,7 @@ output primitive = line_strip ...@@ -134,10 +131,7 @@ output primitive = line_strip
0:15 Constant: 0:15 Constant:
0:15 4 (const int) 0:15 4 (const int)
0:15 move second child to first child ( temp int) 0:15 move second child to first child ( temp int)
0:15 ii: direct index for structure ( temp int) 0:? 'OutputStream.ii' (layout( location=0) out int)
0:15 'OutputStream' (layout( location=0) out structure{ temp int ii})
0:15 Constant:
0:15 0 (const int)
0:15 ii: direct index for structure ( temp 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 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
0:15 Constant: 0:15 Constant:
...@@ -157,13 +151,13 @@ output primitive = line_strip ...@@ -157,13 +151,13 @@ output primitive = line_strip
0:? 'OutputStream.clip0' ( out float Position) 0:? 'OutputStream.clip0' ( out float Position)
0:? 'OutputStream.vpai' ( out uint ViewportIndex) 0:? 'OutputStream.vpai' ( out uint ViewportIndex)
0:? 'OutputStream.rtai' ( out uint Layer) 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.clip0' ( out 1-element array of float ClipDistance)
0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance) 0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 68 // Id's are bound by 65
Capability Geometry Capability Geometry
Capability ClipDistance Capability ClipDistance
...@@ -171,7 +165,7 @@ output primitive = line_strip ...@@ -171,7 +165,7 @@ output primitive = line_strip
Capability MultiViewport Capability MultiViewport
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 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 Triangles
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputLineStrip ExecutionMode 4 OutputLineStrip
...@@ -194,21 +188,19 @@ output primitive = line_strip ...@@ -194,21 +188,19 @@ output primitive = line_strip
Name 34 "OutputStream.cull0" Name 34 "OutputStream.cull0"
Name 40 "OutputStream.vpai" Name 40 "OutputStream.vpai"
Name 45 "OutputStream.rtai" Name 45 "OutputStream.rtai"
Name 49 "S" Name 50 "OutputStream.ii"
MemberName 49(S) 0 "ii" Name 55 "VertexID"
Name 51 "OutputStream" Name 57 "VertexID"
Name 58 "VertexID" Name 59 "OutputStream"
Name 60 "VertexID" Name 60 "param"
Name 62 "OutputStream" Name 62 "param"
Name 63 "param"
Name 65 "param"
Decorate 20(OutputStream.clip0) BuiltIn Position Decorate 20(OutputStream.clip0) BuiltIn Position
Decorate 29(OutputStream.clip0) BuiltIn ClipDistance Decorate 29(OutputStream.clip0) BuiltIn ClipDistance
Decorate 34(OutputStream.cull0) BuiltIn CullDistance Decorate 34(OutputStream.cull0) BuiltIn CullDistance
Decorate 40(OutputStream.vpai) BuiltIn ViewportIndex Decorate 40(OutputStream.vpai) BuiltIn ViewportIndex
Decorate 45(OutputStream.rtai) BuiltIn Layer Decorate 45(OutputStream.rtai) BuiltIn Layer
Decorate 51(OutputStream) Location 0 Decorate 50(OutputStream.ii) Location 0
Decorate 60(VertexID) Location 0 Decorate 57(VertexID) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
...@@ -237,27 +229,25 @@ output primitive = line_strip ...@@ -237,27 +229,25 @@ output primitive = line_strip
42: TypePointer Function 6(int) 42: TypePointer Function 6(int)
45(OutputStream.rtai): 39(ptr) Variable Output 45(OutputStream.rtai): 39(ptr) Variable Output
46: 11(int) Constant 4 46: 11(int) Constant 4
49(S): TypeStruct 11(int) 49: TypePointer Output 11(int)
50: TypePointer Output 49(S) 50(OutputStream.ii): 49(ptr) Variable Output
51(OutputStream): 50(ptr) Variable Output 51: 11(int) Constant 5
52: 11(int) Constant 5 52: TypePointer Function 11(int)
53: TypePointer Function 11(int) 56: TypePointer Input 8
56: TypePointer Output 11(int) 57(VertexID): 56(ptr) Variable Input
59: TypePointer Input 8
60(VertexID): 59(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
58(VertexID): 9(ptr) Variable Function 55(VertexID): 9(ptr) Variable Function
62(OutputStream): 13(ptr) Variable Function 59(OutputStream): 13(ptr) Variable Function
63(param): 9(ptr) Variable Function 60(param): 9(ptr) Variable Function
65(param): 13(ptr) Variable Function 62(param): 13(ptr) Variable Function
61: 8 Load 60(VertexID) 58: 8 Load 57(VertexID)
Store 58(VertexID) 61 Store 55(VertexID) 58
64: 8 Load 58(VertexID) 61: 8 Load 55(VertexID)
Store 63(param) 64 Store 60(param) 61
66: 2 FunctionCall 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;) 63(param) 65(param) 63: 2 FunctionCall 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;) 60(param) 62(param)
67: 12(S) Load 65(param) 64: 12(S) Load 62(param)
Store 62(OutputStream) 67 Store 59(OutputStream) 64
Return Return
FunctionEnd FunctionEnd
17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;): 2 Function None 14 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;): 2 Function None 14
...@@ -282,10 +272,9 @@ output primitive = line_strip ...@@ -282,10 +272,9 @@ output primitive = line_strip
47: 42(ptr) AccessChain 21(s) 46 47: 42(ptr) AccessChain 21(s) 46
48: 6(int) Load 47 48: 6(int) Load 47
Store 45(OutputStream.rtai) 48 Store 45(OutputStream.rtai) 48
54: 53(ptr) AccessChain 21(s) 52 53: 52(ptr) AccessChain 21(s) 51
55: 11(int) Load 54 54: 11(int) Load 53
57: 56(ptr) AccessChain 51(OutputStream) 22 Store 50(OutputStream.ii) 54
Store 57 55
EmitVertex EmitVertex
Return Return
FunctionEnd FunctionEnd
...@@ -87,16 +87,13 @@ Shader version: 500 ...@@ -87,16 +87,13 @@ Shader version: 500
0:10 Constant: 0:10 Constant:
0:10 3 (const int) 0:10 3 (const int)
0:10 move second child to first child ( temp int) 0:10 move second child to first child ( temp int)
0:10 ii: direct index for structure ( temp int) 0:? '@entryPointOutput.ii' (layout( location=0) out int)
0:10 '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
0:10 Constant:
0:10 0 (const int)
0:10 ii: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii})
0:10 Constant: 0:10 Constant:
0:10 4 (const int) 0:10 4 (const int)
0:? Linker Objects 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.ii' ( in int InstanceIndex)
0:? 'ins.clip0' (layout( location=0) in float) 0:? 'ins.clip0' (layout( location=0) in float)
0:? 'ins.clip1' (layout( location=1) in float) 0:? 'ins.clip1' (layout( location=1) in float)
...@@ -197,16 +194,13 @@ Shader version: 500 ...@@ -197,16 +194,13 @@ Shader version: 500
0:10 Constant: 0:10 Constant:
0:10 3 (const int) 0:10 3 (const int)
0:10 move second child to first child ( temp int) 0:10 move second child to first child ( temp int)
0:10 ii: direct index for structure ( temp int) 0:? '@entryPointOutput.ii' (layout( location=0) out int)
0:10 '@entryPointOutput' (layout( location=0) out structure{ temp int ii})
0:10 Constant:
0:10 0 (const int)
0:10 ii: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii})
0:10 Constant: 0:10 Constant:
0:10 4 (const int) 0:10 4 (const int)
0:? Linker Objects 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.ii' ( in int InstanceIndex)
0:? 'ins.clip0' (layout( location=0) in float) 0:? 'ins.clip0' (layout( location=0) in float)
0:? 'ins.clip1' (layout( location=1) in float) 0:? 'ins.clip1' (layout( location=1) in float)
...@@ -217,14 +211,14 @@ Shader version: 500 ...@@ -217,14 +211,14 @@ Shader version: 500
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 73 // Id's are bound by 70
Capability Shader Capability Shader
Capability ClipDistance Capability ClipDistance
Capability CullDistance Capability CullDistance
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 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 Source HLSL 500
Name 4 "main" Name 4 "main"
Name 8 "S" Name 8 "S"
...@@ -246,9 +240,7 @@ Shader version: 500 ...@@ -246,9 +240,7 @@ Shader version: 500
Name 44 "param" Name 44 "param"
Name 51 "@entryPointOutput.clip1" Name 51 "@entryPointOutput.clip1"
Name 59 "@entryPointOutput.cull1" Name 59 "@entryPointOutput.cull1"
Name 66 "S" Name 67 "@entryPointOutput.ii"
MemberName 66(S) 0 "ii"
Name 68 "@entryPointOutput"
Decorate 21(ins.clip0) Location 0 Decorate 21(ins.clip0) Location 0
Decorate 26(ins.clip1) Location 1 Decorate 26(ins.clip1) Location 1
Decorate 30(ins.cull0) Location 2 Decorate 30(ins.cull0) Location 2
...@@ -256,7 +248,7 @@ Shader version: 500 ...@@ -256,7 +248,7 @@ Shader version: 500
Decorate 39(ins.ii) BuiltIn InstanceIndex Decorate 39(ins.ii) BuiltIn InstanceIndex
Decorate 51(@entryPointOutput.clip1) BuiltIn ClipDistance Decorate 51(@entryPointOutput.clip1) BuiltIn ClipDistance
Decorate 59(@entryPointOutput.cull1) BuiltIn CullDistance Decorate 59(@entryPointOutput.cull1) BuiltIn CullDistance
Decorate 68(@entryPointOutput) Location 0 Decorate 67(@entryPointOutput.ii) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -285,10 +277,8 @@ Shader version: 500 ...@@ -285,10 +277,8 @@ Shader version: 500
51(@entryPointOutput.clip1): 50(ptr) Variable Output 51(@entryPointOutput.clip1): 50(ptr) Variable Output
54: TypePointer Output 6(float) 54: TypePointer Output 6(float)
59(@entryPointOutput.cull1): 50(ptr) Variable Output 59(@entryPointOutput.cull1): 50(ptr) Variable Output
66(S): TypeStruct 7(int) 66: TypePointer Output 7(int)
67: TypePointer Output 66(S) 67(@entryPointOutput.ii): 66(ptr) Variable Output
68(@entryPointOutput): 67(ptr) Variable Output
71: TypePointer Output 7(int)
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
18(ins): 9(ptr) Variable Function 18(ins): 9(ptr) Variable Function
...@@ -329,10 +319,9 @@ Shader version: 500 ...@@ -329,10 +319,9 @@ Shader version: 500
64: 6(float) Load 63 64: 6(float) Load 63
65: 54(ptr) AccessChain 59(@entryPointOutput.cull1) 25 65: 54(ptr) AccessChain 59(@entryPointOutput.cull1) 25
Store 65 64 Store 65 64
69: 41(ptr) AccessChain 43(flattenTemp) 37 68: 41(ptr) AccessChain 43(flattenTemp) 37
70: 7(int) Load 69 69: 7(int) Load 68
72: 71(ptr) AccessChain 68(@entryPointOutput) 19 Store 67(@entryPointOutput.ii) 69
Store 72 70
Return Return
FunctionEnd FunctionEnd
12(@main(struct-S-f1-f1-f1-f1-i11;): 8(S) Function None 10 12(@main(struct-S-f1-f1-f1-f1-i11;): 8(S) Function None 10
......
...@@ -69,10 +69,7 @@ Shader version: 500 ...@@ -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:? '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:? 'Pos_loose' ( temp 4-component vector of float)
0:17 move second child to first child ( temp int) 0:17 move second child to first child ( temp int)
0:17 x0_out: direct index for structure ( temp int) 0:? '@entryPointOutput.x0_out' (layout( location=0) out 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:17 x0_out: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:17 Constant: 0:17 Constant:
...@@ -84,17 +81,15 @@ Shader version: 500 ...@@ -84,17 +81,15 @@ Shader version: 500
0:17 Constant: 0:17 Constant:
0:17 1 (const int) 0:17 1 (const int)
0:17 move second child to first child ( temp int) 0:17 move second child to first child ( temp int)
0:17 x1_out: direct index for structure ( temp int) 0:? '@entryPointOutput.x1_out' (layout( location=1) out 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:17 x1_out: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:17 Constant: 0:17 Constant:
0:17 2 (const int) 0:17 2 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) 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.x0_in' (layout( location=0) in int)
0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) 0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
0:? 'vsin.x1_in' (layout( location=2) in int) 0:? 'vsin.x1_in' (layout( location=2) in int)
...@@ -174,10 +169,7 @@ Shader version: 500 ...@@ -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:? '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:? 'Pos_loose' ( temp 4-component vector of float)
0:17 move second child to first child ( temp int) 0:17 move second child to first child ( temp int)
0:17 x0_out: direct index for structure ( temp int) 0:? '@entryPointOutput.x0_out' (layout( location=0) out 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:17 x0_out: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:17 Constant: 0:17 Constant:
...@@ -189,17 +181,15 @@ Shader version: 500 ...@@ -189,17 +181,15 @@ Shader version: 500
0:17 Constant: 0:17 Constant:
0:17 1 (const int) 0:17 1 (const int)
0:17 move second child to first child ( temp int) 0:17 move second child to first child ( temp int)
0:17 x1_out: direct index for structure ( temp int) 0:? '@entryPointOutput.x1_out' (layout( location=1) out 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:17 x1_out: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:17 Constant: 0:17 Constant:
0:17 2 (const int) 0:17 2 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) 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.x0_in' (layout( location=0) in int)
0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) 0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
0:? 'vsin.x1_in' (layout( location=2) in int) 0:? 'vsin.x1_in' (layout( location=2) in int)
...@@ -207,12 +197,12 @@ Shader version: 500 ...@@ -207,12 +197,12 @@ Shader version: 500
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 73 // Id's are bound by 70
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 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 Source HLSL 500
Name 4 "main" Name 4 "main"
Name 9 "VS_INPUT" Name 9 "VS_INPUT"
...@@ -236,17 +226,16 @@ Shader version: 500 ...@@ -236,17 +226,16 @@ Shader version: 500
Name 53 "flattenTemp" Name 53 "flattenTemp"
Name 54 "param" Name 54 "param"
Name 56 "param" Name 56 "param"
Name 59 "VS_OUTPUT" Name 60 "@entryPointOutput.x0_out"
MemberName 59(VS_OUTPUT) 0 "x0_out" Name 64 "@entryPointOutput.Pos_out"
MemberName 59(VS_OUTPUT) 1 "x1_out" Name 67 "@entryPointOutput.x1_out"
Name 61 "@entryPointOutput"
Name 67 "@entryPointOutput.Pos_out"
Decorate 40(vsin.x0_in) Location 0 Decorate 40(vsin.x0_in) Location 0
Decorate 44(vsin.Pos_in) Location 1 Decorate 44(vsin.Pos_in) Location 1
Decorate 47(vsin.x1_in) Location 2 Decorate 47(vsin.x1_in) Location 2
Decorate 51(Pos_loose) Location 3 Decorate 51(Pos_loose) Location 3
Decorate 61(@entryPointOutput) Location 0 Decorate 60(@entryPointOutput.x0_out) Location 0
Decorate 67(@entryPointOutput.Pos_out) BuiltIn Position Decorate 64(@entryPointOutput.Pos_out) BuiltIn Position
Decorate 67(@entryPointOutput.x1_out) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
...@@ -268,12 +257,11 @@ Shader version: 500 ...@@ -268,12 +257,11 @@ Shader version: 500
44(vsin.Pos_in): 43(ptr) Variable Input 44(vsin.Pos_in): 43(ptr) Variable Input
47(vsin.x1_in): 39(ptr) Variable Input 47(vsin.x1_in): 39(ptr) Variable Input
51(Pos_loose): 43(ptr) Variable Input 51(Pos_loose): 43(ptr) Variable Input
59(VS_OUTPUT): TypeStruct 6(int) 6(int) 59: TypePointer Output 6(int)
60: TypePointer Output 59(VS_OUTPUT) 60(@entryPointOutput.x0_out): 59(ptr) Variable Output
61(@entryPointOutput): 60(ptr) Variable Output 63: TypePointer Output 8(fvec4)
64: TypePointer Output 6(int) 64(@entryPointOutput.Pos_out): 63(ptr) Variable Output
66: TypePointer Output 8(fvec4) 67(@entryPointOutput.x1_out): 59(ptr) Variable Output
67(@entryPointOutput.Pos_out): 66(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
38(vsin): 10(ptr) Variable Function 38(vsin): 10(ptr) Variable Function
...@@ -298,17 +286,15 @@ Shader version: 500 ...@@ -298,17 +286,15 @@ Shader version: 500
Store 56(param) 57 Store 56(param) 57
58:12(VS_OUTPUT) FunctionCall 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;) 54(param) 56(param) 58:12(VS_OUTPUT) FunctionCall 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;) 54(param) 56(param)
Store 53(flattenTemp) 58 Store 53(flattenTemp) 58
62: 21(ptr) AccessChain 53(flattenTemp) 20 61: 21(ptr) AccessChain 53(flattenTemp) 20
63: 6(int) Load 62 62: 6(int) Load 61
65: 64(ptr) AccessChain 61(@entryPointOutput) 20 Store 60(@entryPointOutput.x0_out) 62
Store 65 63 65: 11(ptr) AccessChain 53(flattenTemp) 25
68: 11(ptr) AccessChain 53(flattenTemp) 25 66: 8(fvec4) Load 65
69: 8(fvec4) Load 68 Store 64(@entryPointOutput.Pos_out) 66
Store 67(@entryPointOutput.Pos_out) 69 68: 21(ptr) AccessChain 53(flattenTemp) 31
70: 21(ptr) AccessChain 53(flattenTemp) 31 69: 6(int) Load 68
71: 6(int) Load 70 Store 67(@entryPointOutput.x1_out) 69
72: 64(ptr) AccessChain 61(@entryPointOutput) 25
Store 72 71
Return Return
FunctionEnd FunctionEnd
16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;):12(VS_OUTPUT) Function None 13 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;):12(VS_OUTPUT) Function None 13
......
...@@ -73,7 +73,9 @@ output primitive = triangle_strip ...@@ -73,7 +73,9 @@ output primitive = triangle_strip
0:? Linker Objects 0:? Linker Objects
0:? 'v' (layout( location=0) in 1-element array of uint) 0:? 'v' (layout( location=0) in 1-element array of uint)
0:? 'OutputStream.Pos' ( out 4-component vector of float Position) 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: Linked geometry stage:
...@@ -153,16 +155,18 @@ output primitive = triangle_strip ...@@ -153,16 +155,18 @@ output primitive = triangle_strip
0:? Linker Objects 0:? Linker Objects
0:? 'v' (layout( location=0) in 1-element array of uint) 0:? 'v' (layout( location=0) in 1-element array of uint)
0:? 'OutputStream.Pos' ( out 4-component vector of float Position) 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 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 79 // Id's are bound by 82
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 66 75 78 EntryPoint Geometry 4 "main" 66 75 77 79 81
ExecutionMode 4 InputPoints ExecutionMode 4 InputPoints
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip ExecutionMode 4 OutputTriangleStrip
...@@ -187,14 +191,14 @@ output primitive = triangle_strip ...@@ -187,14 +191,14 @@ output primitive = triangle_strip
Name 69 "param" Name 69 "param"
Name 71 "param" Name 71 "param"
Name 75 "OutputStream.Pos" Name 75 "OutputStream.Pos"
Name 76 "PSInput" Name 77 "OutputStream.TexCoord"
MemberName 76(PSInput) 0 "TexCoord" Name 79 "OutputStream.TerrainPos"
MemberName 76(PSInput) 1 "TerrainPos" Name 81 "OutputStream.VertexID"
MemberName 76(PSInput) 2 "VertexID"
Name 78 "OutputStream"
Decorate 66(v) Location 0 Decorate 66(v) Location 0
Decorate 75(OutputStream.Pos) BuiltIn Position 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 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
...@@ -229,9 +233,12 @@ output primitive = triangle_strip ...@@ -229,9 +233,12 @@ output primitive = triangle_strip
66(v): 65(ptr) Variable Input 66(v): 65(ptr) Variable Input
74: TypePointer Output 11(fvec4) 74: TypePointer Output 11(fvec4)
75(OutputStream.Pos): 74(ptr) Variable Output 75(OutputStream.Pos): 74(ptr) Variable Output
76(PSInput): TypeStruct 12(fvec2) 13(fvec3) 6(int) 76: TypePointer Output 12(fvec2)
77: TypePointer Output 76(PSInput) 77(OutputStream.TexCoord): 76(ptr) Variable Output
78(OutputStream): 77(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 4(main): 2 Function None 3
5: Label 5: Label
64(v): 9(ptr) Variable Function 64(v): 9(ptr) Variable Function
......
...@@ -79,10 +79,7 @@ Shader version: 500 ...@@ -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: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:? '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 move second child to first child ( temp int)
0:22 x0_out: direct index for structure ( temp int) 0:? '@entryPointOutput.x0_out' (layout( location=0) out 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:22 x0_out: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:22 Constant: 0:22 Constant:
...@@ -94,17 +91,15 @@ Shader version: 500 ...@@ -94,17 +91,15 @@ Shader version: 500
0:22 Constant: 0:22 Constant:
0:22 1 (const int) 0:22 1 (const int)
0:22 move second child to first child ( temp int) 0:22 move second child to first child ( temp int)
0:22 x1_out: direct index for structure ( temp int) 0:? '@entryPointOutput.x1_out' (layout( location=1) out 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:22 x1_out: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:22 Constant: 0:22 Constant:
0:22 2 (const int) 0:22 2 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) 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.x0_in' (layout( location=0) in int)
0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) 0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
0:? 'vsin.x1_in' (layout( location=2) in int) 0:? 'vsin.x1_in' (layout( location=2) in int)
...@@ -193,10 +188,7 @@ Shader version: 500 ...@@ -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: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:? '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 move second child to first child ( temp int)
0:22 x0_out: direct index for structure ( temp int) 0:? '@entryPointOutput.x0_out' (layout( location=0) out 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:22 x0_out: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:22 Constant: 0:22 Constant:
...@@ -208,29 +200,27 @@ Shader version: 500 ...@@ -208,29 +200,27 @@ Shader version: 500
0:22 Constant: 0:22 Constant:
0:22 1 (const int) 0:22 1 (const int)
0:22 move second child to first child ( temp int) 0:22 move second child to first child ( temp int)
0:22 x1_out: direct index for structure ( temp int) 0:? '@entryPointOutput.x1_out' (layout( location=1) out 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:22 x1_out: direct index for structure ( temp 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 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:22 Constant: 0:22 Constant:
0:22 2 (const int) 0:22 2 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) 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.x0_in' (layout( location=0) in int)
0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) 0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float)
0:? 'vsin.x1_in' (layout( location=2) in int) 0:? 'vsin.x1_in' (layout( location=2) in int)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 80 // Id's are bound by 77
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 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 Source HLSL 500
Name 4 "main" Name 4 "main"
Name 9 "VS_INPUT" Name 9 "VS_INPUT"
...@@ -255,16 +245,15 @@ Shader version: 500 ...@@ -255,16 +245,15 @@ Shader version: 500
Name 59 "vsin.x1_in" Name 59 "vsin.x1_in"
Name 62 "flattenTemp" Name 62 "flattenTemp"
Name 63 "param" Name 63 "param"
Name 66 "VS_OUTPUT" Name 67 "@entryPointOutput.x0_out"
MemberName 66(VS_OUTPUT) 0 "x0_out" Name 71 "@entryPointOutput.Pos_out"
MemberName 66(VS_OUTPUT) 1 "x1_out" Name 74 "@entryPointOutput.x1_out"
Name 68 "@entryPointOutput"
Name 74 "@entryPointOutput.Pos_out"
Decorate 52(vsin.x0_in) Location 0 Decorate 52(vsin.x0_in) Location 0
Decorate 56(vsin.Pos_in) Location 1 Decorate 56(vsin.Pos_in) Location 1
Decorate 59(vsin.x1_in) Location 2 Decorate 59(vsin.x1_in) Location 2
Decorate 68(@entryPointOutput) Location 0 Decorate 67(@entryPointOutput.x0_out) Location 0
Decorate 74(@entryPointOutput.Pos_out) BuiltIn Position Decorate 71(@entryPointOutput.Pos_out) BuiltIn Position
Decorate 74(@entryPointOutput.x1_out) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
...@@ -286,12 +275,11 @@ Shader version: 500 ...@@ -286,12 +275,11 @@ Shader version: 500
55: TypePointer Input 8(fvec4) 55: TypePointer Input 8(fvec4)
56(vsin.Pos_in): 55(ptr) Variable Input 56(vsin.Pos_in): 55(ptr) Variable Input
59(vsin.x1_in): 51(ptr) Variable Input 59(vsin.x1_in): 51(ptr) Variable Input
66(VS_OUTPUT): TypeStruct 6(int) 6(int) 66: TypePointer Output 6(int)
67: TypePointer Output 66(VS_OUTPUT) 67(@entryPointOutput.x0_out): 66(ptr) Variable Output
68(@entryPointOutput): 67(ptr) Variable Output 70: TypePointer Output 8(fvec4)
71: TypePointer Output 6(int) 71(@entryPointOutput.Pos_out): 70(ptr) Variable Output
73: TypePointer Output 8(fvec4) 74(@entryPointOutput.x1_out): 66(ptr) Variable Output
74(@entryPointOutput.Pos_out): 73(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
50(vsin): 10(ptr) Variable Function 50(vsin): 10(ptr) Variable Function
...@@ -310,17 +298,15 @@ Shader version: 500 ...@@ -310,17 +298,15 @@ Shader version: 500
Store 63(param) 64 Store 63(param) 64
65:11(VS_OUTPUT) FunctionCall 20(@main(struct-VS_INPUT-i1-vf4-i11;) 63(param) 65:11(VS_OUTPUT) FunctionCall 20(@main(struct-VS_INPUT-i1-vf4-i11;) 63(param)
Store 62(flattenTemp) 65 Store 62(flattenTemp) 65
69: 31(ptr) AccessChain 62(flattenTemp) 30 68: 31(ptr) AccessChain 62(flattenTemp) 30
70: 6(int) Load 69 69: 6(int) Load 68
72: 71(ptr) AccessChain 68(@entryPointOutput) 30 Store 67(@entryPointOutput.x0_out) 69
Store 72 70 72: 23(ptr) AccessChain 62(flattenTemp) 22
75: 23(ptr) AccessChain 62(flattenTemp) 22 73: 8(fvec4) Load 72
76: 8(fvec4) Load 75 Store 71(@entryPointOutput.Pos_out) 73
Store 74(@entryPointOutput.Pos_out) 76 75: 31(ptr) AccessChain 62(flattenTemp) 38
77: 31(ptr) AccessChain 62(flattenTemp) 38 76: 6(int) Load 75
78: 6(int) Load 77 Store 74(@entryPointOutput.x1_out) 76
79: 71(ptr) AccessChain 68(@entryPointOutput) 22
Store 79 78
Return Return
FunctionEnd FunctionEnd
16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;): 2 Function None 13 16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;): 2 Function None 13
......
...@@ -55,19 +55,13 @@ output primitive = triangle_strip ...@@ -55,19 +55,13 @@ output primitive = triangle_strip
0:22 Constant: 0:22 Constant:
0:22 0 (const int) 0:22 0 (const int)
0:22 move second child to first child ( temp 4-component vector of float) 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:? 'outStream.color' (layout( location=0) out 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:22 color: direct index for structure ( temp 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 '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 Constant:
0:22 1 (const int) 0:22 1 (const int)
0:22 move second child to first child ( temp 2-component vector of float) 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:? 'outStream.uv' (layout( location=1) out 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:22 uv: direct index for structure ( temp 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 '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 Constant:
...@@ -85,7 +79,8 @@ output primitive = triangle_strip ...@@ -85,7 +79,8 @@ output primitive = triangle_strip
0:? Linker Objects 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:? '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.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: Linked geometry stage:
...@@ -147,19 +142,13 @@ output primitive = triangle_strip ...@@ -147,19 +142,13 @@ output primitive = triangle_strip
0:22 Constant: 0:22 Constant:
0:22 0 (const int) 0:22 0 (const int)
0:22 move second child to first child ( temp 4-component vector of float) 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:? 'outStream.color' (layout( location=0) out 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:22 color: direct index for structure ( temp 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 '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 Constant:
0:22 1 (const int) 0:22 1 (const int)
0:22 move second child to first child ( temp 2-component vector of float) 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:? 'outStream.uv' (layout( location=1) out 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:22 uv: direct index for structure ( temp 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 '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 Constant:
...@@ -177,16 +166,17 @@ output primitive = triangle_strip ...@@ -177,16 +166,17 @@ output primitive = triangle_strip
0:? Linker Objects 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:? '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.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 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 61 // Id's are bound by 58
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 38 43 53 EntryPoint Geometry 4 "main" 38 41 45 50
ExecutionMode 4 InputLines ExecutionMode 4 InputLines
ExecutionMode 4 Invocations 1 ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip ExecutionMode 4 OutputTriangleStrip
...@@ -206,18 +196,17 @@ output primitive = triangle_strip ...@@ -206,18 +196,17 @@ output primitive = triangle_strip
Name 18 "outStream" Name 18 "outStream"
Name 21 "vout" Name 21 "vout"
Name 38 "outStream.position" Name 38 "outStream.position"
Name 41 "PS_IN" Name 41 "outStream.color"
MemberName 41(PS_IN) 0 "color" Name 45 "outStream.uv"
MemberName 41(PS_IN) 1 "uv" Name 48 "vin"
Name 43 "outStream" Name 50 "vin"
Name 51 "vin" Name 52 "outStream"
Name 53 "vin" Name 53 "param"
Name 55 "outStream" Name 55 "param"
Name 56 "param"
Name 58 "param"
Decorate 38(outStream.position) BuiltIn Position Decorate 38(outStream.position) BuiltIn Position
Decorate 43(outStream) Location 0 Decorate 41(outStream.color) Location 0
Decorate 53(vin) Location 0 Decorate 45(outStream.uv) Location 1
Decorate 50(vin) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -239,25 +228,24 @@ output primitive = triangle_strip ...@@ -239,25 +228,24 @@ output primitive = triangle_strip
33: 22(int) Constant 0 33: 22(int) Constant 0
37: TypePointer Output 7(fvec4) 37: TypePointer Output 7(fvec4)
38(outStream.position): 37(ptr) Variable Output 38(outStream.position): 37(ptr) Variable Output
41(PS_IN): TypeStruct 7(fvec4) 8(fvec2) 41(outStream.color): 37(ptr) Variable Output
42: TypePointer Output 41(PS_IN) 44: TypePointer Output 8(fvec2)
43(outStream): 42(ptr) Variable Output 45(outStream.uv): 44(ptr) Variable Output
49: TypePointer Output 8(fvec2) 49: TypePointer Input 12
52: TypePointer Input 12 50(vin): 49(ptr) Variable Input
53(vin): 52(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
51(vin): 13(ptr) Variable Function 48(vin): 13(ptr) Variable Function
55(outStream): 15(ptr) Variable Function 52(outStream): 15(ptr) Variable Function
56(param): 13(ptr) Variable Function 53(param): 13(ptr) Variable Function
58(param): 15(ptr) Variable Function 55(param): 15(ptr) Variable Function
54: 12 Load 53(vin) 51: 12 Load 50(vin)
Store 51(vin) 54 Store 48(vin) 51
57: 12 Load 51(vin) 54: 12 Load 48(vin)
Store 56(param) 57 Store 53(param) 54
59: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 56(param) 58(param) 56: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 53(param) 55(param)
60: 14(PS_IN) Load 58(param) 57: 14(PS_IN) Load 55(param)
Store 55(outStream) 60 Store 52(outStream) 57
Return Return
FunctionEnd FunctionEnd
19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;): 2 Function None 16 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 ...@@ -280,14 +268,12 @@ output primitive = triangle_strip
39: 24(ptr) AccessChain 21(vout) 33 39: 24(ptr) AccessChain 21(vout) 33
40: 7(fvec4) Load 39 40: 7(fvec4) Load 39
Store 38(outStream.position) 40 Store 38(outStream.position) 40
44: 24(ptr) AccessChain 21(vout) 23 42: 24(ptr) AccessChain 21(vout) 23
45: 7(fvec4) Load 44 43: 7(fvec4) Load 42
46: 37(ptr) AccessChain 43(outStream) 33 Store 41(outStream.color) 43
Store 46 45 46: 29(ptr) AccessChain 21(vout) 28
47: 29(ptr) AccessChain 21(vout) 28 47: 8(fvec2) Load 46
48: 8(fvec2) Load 47 Store 45(outStream.uv) 47
50: 49(ptr) AccessChain 43(outStream) 23
Store 50 48
EmitVertex EmitVertex
Return Return
FunctionEnd FunctionEnd
...@@ -1270,16 +1270,16 @@ int HlslParseContext::addFlattenedMember(const TVariable& variable, const TType& ...@@ -1270,16 +1270,16 @@ int HlslParseContext::addFlattenedMember(const TVariable& variable, const TType&
if (flattenData.nextBinding != TQualifier::layoutBindingEnd) if (flattenData.nextBinding != TQualifier::layoutBindingEnd)
memberVariable->getWritableType().getQualifier().layoutBinding = flattenData.nextBinding++; 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 // inherited locations must be auto bumped, not replicated
if (flattenData.nextLocation != TQualifier::layoutLocationEnd) { if (flattenData.nextLocation != TQualifier::layoutLocationEnd) {
memberVariable->getWritableType().getQualifier().layoutLocation = flattenData.nextLocation; memberVariable->getWritableType().getQualifier().layoutLocation = flattenData.nextLocation;
flattenData.nextLocation += intermediate.computeTypeLocationSize(memberVariable->getType()); flattenData.nextLocation += intermediate.computeTypeLocationSize(memberVariable->getType());
nextOutLocation = std::max(nextOutLocation, flattenData.nextLocation); 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())); flattenData.offsets.push_back(static_cast<int>(flattenData.members.size()));
...@@ -1912,19 +1912,15 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct ...@@ -1912,19 +1912,15 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
// Further this return/in/out transform by flattening, splitting, and assigning locations // Further this return/in/out transform by flattening, splitting, and assigning locations
const auto makeVariableInOut = [&](TVariable& variable) { const auto makeVariableInOut = [&](TVariable& variable) {
if (variable.getType().isStruct()) { if (variable.getType().isStruct()) {
const TStorageQualifier qualifier = variable.getType().getQualifier().storage; if (variable.getType().getQualifier().isArrayedIo(language)) {
// struct inputs to the vertex stage and outputs from the fragment stage must be flattened if (variable.getType().containsBuiltIn())
if ((language == EShLangVertex && qualifier == EvqVaryingIn) || split(variable);
(language == EShLangFragment && qualifier == EvqVaryingOut)) } else
flatten(variable, false /* don't track linkage here, it will be tracked in assignToInterface() */); 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 // For clip and cull distance, multiple output variables potentially get merged
// into one in assignClipCullDistance. That code in assignClipCullDistance // into one in assignClipCullDistance. That code in assignClipCullDistance
...@@ -8694,6 +8690,7 @@ void HlslParseContext::correctInput(TQualifier& qualifier) ...@@ -8694,6 +8690,7 @@ void HlslParseContext::correctInput(TQualifier& qualifier)
qualifier.sample = false; qualifier.sample = false;
} }
// TODO: handle clip/cull on the input side; this doesn't work, see overwrite of .layoutLocation later
if (isClipOrCullDistance(qualifier)) if (isClipOrCullDistance(qualifier))
qualifier.layoutLocation = TQualifier::layoutLocationEnd; qualifier.layoutLocation = TQualifier::layoutLocationEnd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment