Commit b6be80f4 by John Kessenich

HLSL: Flatten more I/O: non-arrayed user-only structures.

The goal is to flatten all I/O, but there are multiple categories and steps to complete, likely including a final unification of splitting and flattening.
parent cca42a8e
...@@ -105,14 +105,28 @@ triangle order = none ...@@ -105,14 +105,28 @@ triangle order = none
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) 0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
0:22 Constant: 0:22 Constant:
0:22 0 (const int) 0:22 0 (const int)
0:22 Sequence
0:22 move second child to first child ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:22 move second child to first child ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:22 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:22 Function Call: @main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:22 Function Call: @main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11; ( temp 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' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( temp 3-component vector of float) 0:? 'tesscoord' ( temp 3-component vector of float)
0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor}) 0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor})
0:22 move second child to first child ( temp 4-component vector of float)
0:? 'pos' (layout( location=0) out 4-component vector of float)
0:22 pos: direct index for structure ( temp 4-component vector of float)
0:22 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:22 Constant:
0:22 0 (const int)
0:22 move second child to first child ( temp 3-component vector of float)
0:? 'norm' (layout( location=1) out 3-component vector of float)
0:22 norm: direct index for structure ( temp 3-component vector of float)
0:22 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:22 Constant:
0:22 1 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:? 'pos' (layout( location=0) out 4-component vector of float)
0:? 'norm' (layout( location=1) out 3-component vector of float)
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}) 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})
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 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_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
...@@ -228,14 +242,28 @@ triangle order = none ...@@ -228,14 +242,28 @@ triangle order = none
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) 0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
0:22 Constant: 0:22 Constant:
0:22 0 (const int) 0:22 0 (const int)
0:22 Sequence
0:22 move second child to first child ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:22 move second child to first child ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:22 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:22 Function Call: @main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:22 Function Call: @main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11; ( temp 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' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( temp 3-component vector of float) 0:? 'tesscoord' ( temp 3-component vector of float)
0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor}) 0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor})
0:22 move second child to first child ( temp 4-component vector of float)
0:? 'pos' (layout( location=0) out 4-component vector of float)
0:22 pos: direct index for structure ( temp 4-component vector of float)
0:22 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:22 Constant:
0:22 0 (const int)
0:22 move second child to first child ( temp 3-component vector of float)
0:? 'norm' (layout( location=1) out 3-component vector of float)
0:22 norm: direct index for structure ( temp 3-component vector of float)
0:22 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:22 Constant:
0:22 1 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:? 'pos' (layout( location=0) out 4-component vector of float)
0:? 'norm' (layout( location=1) out 3-component vector of float)
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}) 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})
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 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_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
...@@ -243,12 +271,12 @@ triangle order = none ...@@ -243,12 +271,12 @@ triangle order = none
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 88 // Id's are bound by 95
Capability Tessellation Capability Tessellation
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint TessellationEvaluation 4 "main" 51 55 61 76 81 EntryPoint TessellationEvaluation 4 "main" 51 55 61 76 88 92
ExecutionMode 4 Triangles ExecutionMode 4 Triangles
Source HLSL 500 Source HLSL 500
Name 4 "main" Name 4 "main"
...@@ -273,9 +301,11 @@ triangle order = none ...@@ -273,9 +301,11 @@ triangle order = none
Name 57 "pcf_data" Name 57 "pcf_data"
Name 61 "pcf_data_flTessFactor" Name 61 "pcf_data_flTessFactor"
Name 76 "pcf_data_flInsideTessFactor" Name 76 "pcf_data_flInsideTessFactor"
Name 81 "@entryPointOutput" Name 80 "flattenTemp"
Name 83 "param" Name 82 "param"
Name 85 "param" Name 84 "param"
Name 88 "pos"
Name 92 "norm"
Decorate 51(i) Location 0 Decorate 51(i) Location 0
Decorate 55(tesscoord) Patch Decorate 55(tesscoord) Patch
Decorate 55(tesscoord) BuiltIn TessCoord Decorate 55(tesscoord) BuiltIn TessCoord
...@@ -283,7 +313,8 @@ triangle order = none ...@@ -283,7 +313,8 @@ triangle order = none
Decorate 61(pcf_data_flTessFactor) BuiltIn TessLevelOuter Decorate 61(pcf_data_flTessFactor) BuiltIn TessLevelOuter
Decorate 76(pcf_data_flInsideTessFactor) Patch Decorate 76(pcf_data_flInsideTessFactor) Patch
Decorate 76(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner Decorate 76(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner
Decorate 81(@entryPointOutput) Location 0 Decorate 88(pos) Location 0
Decorate 92(norm) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -322,15 +353,18 @@ triangle order = none ...@@ -322,15 +353,18 @@ triangle order = none
74: TypeArray 6(float) 73 74: TypeArray 6(float) 73
75: TypePointer Input 74 75: TypePointer Input 74
76(pcf_data_flInsideTessFactor): 75(ptr) Variable Input 76(pcf_data_flInsideTessFactor): 75(ptr) Variable Input
80: TypePointer Output 17(gs_in_t) 87: TypePointer Output 7(fvec4)
81(@entryPointOutput): 80(ptr) Variable Output 88(pos): 87(ptr) Variable Output
91: TypePointer Output 8(fvec3)
92(norm): 91(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
49(i): 48(ptr) Variable Function 49(i): 48(ptr) Variable Function
53(tesscoord): 13(ptr) Variable Function 53(tesscoord): 13(ptr) Variable Function
57(pcf_data): 16(ptr) Variable Function 57(pcf_data): 16(ptr) Variable Function
83(param): 13(ptr) Variable Function 80(flattenTemp): 24(ptr) Variable Function
85(param): 16(ptr) Variable Function 82(param): 13(ptr) Variable Function
84(param): 16(ptr) Variable Function
52: 12 Load 51(i) 52: 12 Load 51(i)
Store 49(i) 52 Store 49(i) 52
56: 8(fvec3) Load 55(tesscoord) 56: 8(fvec3) Load 55(tesscoord)
...@@ -351,13 +385,19 @@ triangle order = none ...@@ -351,13 +385,19 @@ triangle order = none
78: 6(float) Load 77 78: 6(float) Load 77
79: 30(ptr) AccessChain 57(pcf_data) 37 79: 30(ptr) AccessChain 57(pcf_data) 37
Store 79 78 Store 79 78
82: 12 Load 49(i) 81: 12 Load 49(i)
84: 8(fvec3) Load 53(tesscoord) 83: 8(fvec3) Load 53(tesscoord)
Store 83(param) 84 Store 82(param) 83
86:15(pcf_in_t) Load 57(pcf_data) 85:15(pcf_in_t) Load 57(pcf_data)
Store 85(param) 86 Store 84(param) 85
87: 17(gs_in_t) FunctionCall 22(@main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11;) 82 83(param) 85(param) 86: 17(gs_in_t) FunctionCall 22(@main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11;) 81 82(param) 84(param)
Store 81(@entryPointOutput) 87 Store 80(flattenTemp) 86
89: 35(ptr) AccessChain 80(flattenTemp) 27
90: 7(fvec4) Load 89
Store 88(pos) 90
93: 13(ptr) AccessChain 80(flattenTemp) 37
94: 8(fvec3) Load 93
Store 92(norm) 94
Return Return
FunctionEnd FunctionEnd
22(@main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11;): 17(gs_in_t) Function None 18 22(@main(struct-ds_in_t-vf4-vf31[3];vf3;struct-pcf_in_t-f1[3]-f11;): 17(gs_in_t) Function None 18
......
...@@ -102,14 +102,28 @@ triangle order = none ...@@ -102,14 +102,28 @@ triangle order = none
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) 0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
0:24 Constant: 0:24 Constant:
0:24 0 (const int) 0:24 0 (const int)
0:24 Sequence
0:24 move second child to first child ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:24 move second child to first child ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:24 Function Call: @main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:24 Function Call: @main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( temp 2-component vector of float) 0:? 'tesscoord' ( temp 2-component vector of float)
0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor}) 0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor})
0:24 move second child to first child ( temp 4-component vector of float)
0:? 'pos' (layout( location=0) out 4-component vector of float)
0:24 pos: direct index for structure ( temp 4-component vector of float)
0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:24 Constant:
0:24 0 (const int)
0:24 move second child to first child ( temp 3-component vector of float)
0:? 'norm' (layout( location=1) out 3-component vector of float)
0:24 norm: direct index for structure ( temp 3-component vector of float)
0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:24 Constant:
0:24 1 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:? 'pos' (layout( location=0) out 4-component vector of float)
0:? 'norm' (layout( location=1) out 3-component vector of float)
0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 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_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
...@@ -222,14 +236,28 @@ triangle order = none ...@@ -222,14 +236,28 @@ triangle order = none
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) 0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
0:24 Constant: 0:24 Constant:
0:24 0 (const int) 0:24 0 (const int)
0:24 Sequence
0:24 move second child to first child ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:24 move second child to first child ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:24 Function Call: @main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:24 Function Call: @main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11; ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:? 'i' ( temp 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( temp 2-component vector of float) 0:? 'tesscoord' ( temp 2-component vector of float)
0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor}) 0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor})
0:24 move second child to first child ( temp 4-component vector of float)
0:? 'pos' (layout( location=0) out 4-component vector of float)
0:24 pos: direct index for structure ( temp 4-component vector of float)
0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:24 Constant:
0:24 0 (const int)
0:24 move second child to first child ( temp 3-component vector of float)
0:? 'norm' (layout( location=1) out 3-component vector of float)
0:24 norm: direct index for structure ( temp 3-component vector of float)
0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:24 Constant:
0:24 1 (const int)
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:? 'pos' (layout( location=0) out 4-component vector of float)
0:? 'norm' (layout( location=1) out 3-component vector of float)
0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm}) 0:? 'i' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord) 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_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
...@@ -237,12 +265,12 @@ triangle order = none ...@@ -237,12 +265,12 @@ triangle order = none
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 93 // Id's are bound by 100
Capability Tessellation Capability Tessellation
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint TessellationEvaluation 4 "main" 54 58 67 81 86 EntryPoint TessellationEvaluation 4 "main" 54 58 67 81 93 97
ExecutionMode 4 Isolines ExecutionMode 4 Isolines
Source HLSL 500 Source HLSL 500
Name 4 "main" Name 4 "main"
...@@ -267,9 +295,11 @@ triangle order = none ...@@ -267,9 +295,11 @@ triangle order = none
Name 63 "pcf_data" Name 63 "pcf_data"
Name 67 "pcf_data_flTessFactor" Name 67 "pcf_data_flTessFactor"
Name 81 "pcf_data_flInsideTessFactor" Name 81 "pcf_data_flInsideTessFactor"
Name 86 "@entryPointOutput" Name 85 "flattenTemp"
Name 88 "param" Name 87 "param"
Name 90 "param" Name 89 "param"
Name 93 "pos"
Name 97 "norm"
Decorate 54(i) Location 0 Decorate 54(i) Location 0
Decorate 58(tesscoord) Patch Decorate 58(tesscoord) Patch
Decorate 58(tesscoord) BuiltIn TessCoord Decorate 58(tesscoord) BuiltIn TessCoord
...@@ -277,7 +307,8 @@ triangle order = none ...@@ -277,7 +307,8 @@ triangle order = none
Decorate 67(pcf_data_flTessFactor) BuiltIn TessLevelOuter Decorate 67(pcf_data_flTessFactor) BuiltIn TessLevelOuter
Decorate 81(pcf_data_flInsideTessFactor) Patch Decorate 81(pcf_data_flInsideTessFactor) Patch
Decorate 81(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner Decorate 81(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner
Decorate 86(@entryPointOutput) Location 0 Decorate 93(pos) Location 0
Decorate 97(norm) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -318,15 +349,18 @@ triangle order = none ...@@ -318,15 +349,18 @@ triangle order = none
79: TypeArray 6(float) 11 79: TypeArray 6(float) 11
80: TypePointer Input 79 80: TypePointer Input 79
81(pcf_data_flInsideTessFactor): 80(ptr) Variable Input 81(pcf_data_flInsideTessFactor): 80(ptr) Variable Input
85: TypePointer Output 19(gs_in_t) 92: TypePointer Output 7(fvec4)
86(@entryPointOutput): 85(ptr) Variable Output 93(pos): 92(ptr) Variable Output
96: TypePointer Output 8(fvec3)
97(norm): 96(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
52(i): 51(ptr) Variable Function 52(i): 51(ptr) Variable Function
56(tesscoord): 14(ptr) Variable Function 56(tesscoord): 14(ptr) Variable Function
63(pcf_data): 18(ptr) Variable Function 63(pcf_data): 18(ptr) Variable Function
88(param): 14(ptr) Variable Function 85(flattenTemp): 26(ptr) Variable Function
90(param): 18(ptr) Variable Function 87(param): 14(ptr) Variable Function
89(param): 18(ptr) Variable Function
55: 12 Load 54(i) 55: 12 Load 54(i)
Store 52(i) 55 Store 52(i) 55
59: 8(fvec3) Load 58(tesscoord) 59: 8(fvec3) Load 58(tesscoord)
...@@ -350,13 +384,19 @@ triangle order = none ...@@ -350,13 +384,19 @@ triangle order = none
83: 6(float) Load 82 83: 6(float) Load 82
84: 32(ptr) AccessChain 63(pcf_data) 39 84: 32(ptr) AccessChain 63(pcf_data) 39
Store 84 83 Store 84 83
87: 12 Load 52(i) 86: 12 Load 52(i)
89: 13(fvec2) Load 56(tesscoord) 88: 13(fvec2) Load 56(tesscoord)
Store 88(param) 89 Store 87(param) 88
91:17(pcf_in_t) Load 63(pcf_data) 90:17(pcf_in_t) Load 63(pcf_data)
Store 90(param) 91 Store 89(param) 90
92: 19(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;) 87 88(param) 90(param) 91: 19(gs_in_t) FunctionCall 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;) 86 87(param) 89(param)
Store 86(@entryPointOutput) 92 Store 85(flattenTemp) 91
94: 37(ptr) AccessChain 85(flattenTemp) 29
95: 7(fvec4) Load 94
Store 93(pos) 95
98: 46(ptr) AccessChain 85(flattenTemp) 39
99: 8(fvec3) Load 98
Store 97(norm) 99
Return Return
FunctionEnd FunctionEnd
24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;): 19(gs_in_t) Function None 20 24(@main(struct-ds_in_t-vf4-vf31[2];vf2;struct-pcf_in_t-f1[3]-f11;): 19(gs_in_t) Function None 20
......
...@@ -11,6 +11,7 @@ gl_FragCoord origin is upper left ...@@ -11,6 +11,7 @@ gl_FragCoord origin is upper left
0:10 Function Definition: main( ( temp void) 0:10 Function Definition: main( ( temp void)
0:10 Function Parameters: 0:10 Function Parameters:
0:? Sequence 0:? Sequence
0:10 Sequence
0:10 move second child to first child ( temp structure{}) 0:10 move second child to first child ( temp structure{})
0:? 'i' ( temp structure{}) 0:? 'i' ( temp structure{})
0:? 'i' ( in structure{}) 0:? 'i' ( in structure{})
...@@ -37,6 +38,7 @@ gl_FragCoord origin is upper left ...@@ -37,6 +38,7 @@ gl_FragCoord origin is upper left
0:10 Function Definition: main( ( temp void) 0:10 Function Definition: main( ( temp void)
0:10 Function Parameters: 0:10 Function Parameters:
0:? Sequence 0:? Sequence
0:10 Sequence
0:10 move second child to first child ( temp structure{}) 0:10 move second child to first child ( temp structure{})
0:? 'i' ( temp structure{}) 0:? 'i' ( temp structure{})
0:? 'i' ( in structure{}) 0:? 'i' ( in structure{})
......
...@@ -14,6 +14,7 @@ Shader version: 500 ...@@ -14,6 +14,7 @@ Shader version: 500
0:10 move second child to first child ( temp structure{}) 0:10 move second child to first child ( temp structure{})
0:? 'i' ( temp structure{}) 0:? 'i' ( temp structure{})
0:? 'i' ( in structure{}) 0:? 'i' ( in structure{})
0:10 Sequence
0:10 move second child to first child ( temp structure{}) 0:10 move second child to first child ( temp structure{})
0:? '@entryPointOutput' ( out structure{}) 0:? '@entryPointOutput' ( out structure{})
0:10 Function Call: @main(struct-vs_in1; ( temp structure{}) 0:10 Function Call: @main(struct-vs_in1; ( temp structure{})
...@@ -39,6 +40,7 @@ Shader version: 500 ...@@ -39,6 +40,7 @@ Shader version: 500
0:10 move second child to first child ( temp structure{}) 0:10 move second child to first child ( temp structure{})
0:? 'i' ( temp structure{}) 0:? 'i' ( temp structure{})
0:? 'i' ( in structure{}) 0:? 'i' ( in structure{})
0:10 Sequence
0:10 move second child to first child ( temp structure{}) 0:10 move second child to first child ( temp structure{})
0:? '@entryPointOutput' ( out structure{}) 0:? '@entryPointOutput' ( out structure{})
0:10 Function Call: @main(struct-vs_in1; ( temp structure{}) 0:10 Function Call: @main(struct-vs_in1; ( temp structure{})
......
...@@ -24,16 +24,27 @@ gl_FragCoord origin is upper left ...@@ -24,16 +24,27 @@ gl_FragCoord origin is upper left
0:7 Function Definition: main( ( temp void) 0:7 Function Definition: main( ( temp void)
0:7 Function Parameters: 0:7 Function Parameters:
0:? Sequence 0:? Sequence
0:7 move second child to first child ( temp structure{ temp float interp, temp uint no_interp}) 0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 interp: direct index for structure ( temp float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:7 Constant:
0:7 0 (const int)
0:? 'interp' (layout( location=0) in float)
0:7 move second child to first child ( temp uint)
0:7 no_interp: direct index for structure ( temp uint)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:7 Constant:
0:7 1 (const int)
0:? 'no_interp' (layout( location=1) flat in uint)
0:7 move second child to first child ( temp 4-component vector of float) 0:7 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:7 Function Call: @main(struct-PSInput-f1-u11; ( temp 4-component vector of float) 0:7 Function Call: @main(struct-PSInput-f1-u11; ( temp 4-component vector of float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:? 'interp' (layout( location=0) in float)
0:? 'no_interp' (layout( location=1) flat in uint)
Linked fragment stage: Linked fragment stage:
...@@ -64,16 +75,27 @@ gl_FragCoord origin is upper left ...@@ -64,16 +75,27 @@ gl_FragCoord origin is upper left
0:7 Function Definition: main( ( temp void) 0:7 Function Definition: main( ( temp void)
0:7 Function Parameters: 0:7 Function Parameters:
0:? Sequence 0:? Sequence
0:7 move second child to first child ( temp structure{ temp float interp, temp uint no_interp}) 0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 interp: direct index for structure ( temp float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:7 Constant:
0:7 0 (const int)
0:? 'interp' (layout( location=0) in float)
0:7 move second child to first child ( temp uint)
0:7 no_interp: direct index for structure ( temp uint)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:7 Constant:
0:7 1 (const int)
0:? 'no_interp' (layout( location=1) flat in uint)
0:7 move second child to first child ( temp 4-component vector of float) 0:7 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:7 Function Call: @main(struct-PSInput-f1-u11; ( temp 4-component vector of float) 0:7 Function Call: @main(struct-PSInput-f1-u11; ( temp 4-component vector of float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:? 'interp' (layout( location=0) in float)
0:? 'no_interp' (layout( location=1) flat in uint)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
...@@ -82,7 +104,7 @@ gl_FragCoord origin is upper left ...@@ -82,7 +104,7 @@ gl_FragCoord origin is upper left
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 33 40 EntryPoint Fragment 4 "main" 32 36 40
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source HLSL 500 Source HLSL 500
Name 4 "main" Name 4 "main"
...@@ -92,14 +114,13 @@ gl_FragCoord origin is upper left ...@@ -92,14 +114,13 @@ gl_FragCoord origin is upper left
Name 13 "@main(struct-PSInput-f1-u11;" Name 13 "@main(struct-PSInput-f1-u11;"
Name 12 "input" Name 12 "input"
Name 30 "input" Name 30 "input"
Name 31 "PSInput" Name 32 "interp"
MemberName 31(PSInput) 0 "interp" Name 36 "no_interp"
MemberName 31(PSInput) 1 "no_interp"
Name 33 "input"
Name 40 "@entryPointOutput" Name 40 "@entryPointOutput"
Name 41 "param" Name 41 "param"
MemberDecorate 31(PSInput) 1 Flat Decorate 32(interp) Location 0
Decorate 33(input) Location 0 Decorate 36(no_interp) Flat
Decorate 36(no_interp) Location 1
Decorate 40(@entryPointOutput) Location 0 Decorate 40(@entryPointOutput) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
...@@ -116,20 +137,20 @@ gl_FragCoord origin is upper left ...@@ -116,20 +137,20 @@ gl_FragCoord origin is upper left
22: TypePointer Function 6(float) 22: TypePointer Function 6(float)
25: 6(float) Constant 0 25: 6(float) Constant 0
26: 6(float) Constant 1065353216 26: 6(float) Constant 1065353216
31(PSInput): TypeStruct 6(float) 7(int) 31: TypePointer Input 6(float)
32: TypePointer Input 31(PSInput) 32(interp): 31(ptr) Variable Input
33(input): 32(ptr) Variable Input 35: TypePointer Input 7(int)
36(no_interp): 35(ptr) Variable Input
39: TypePointer Output 10(fvec4) 39: TypePointer Output 10(fvec4)
40(@entryPointOutput): 39(ptr) Variable Output 40(@entryPointOutput): 39(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
30(input): 9(ptr) Variable Function 30(input): 9(ptr) Variable Function
41(param): 9(ptr) Variable Function 41(param): 9(ptr) Variable Function
34: 31(PSInput) Load 33(input) 33: 6(float) Load 32(interp)
35: 6(float) CompositeExtract 34 0 34: 22(ptr) AccessChain 30(input) 21
36: 22(ptr) AccessChain 30(input) 21 Store 34 33
Store 36 35 37: 7(int) Load 36(no_interp)
37: 7(int) CompositeExtract 34 1
38: 17(ptr) AccessChain 30(input) 16 38: 17(ptr) AccessChain 30(input) 16
Store 38 37 Store 38 37
42: 8(PSInput) Load 30(input) 42: 8(PSInput) Load 30(input)
......
...@@ -25,9 +25,19 @@ gl_FragCoord origin is upper left ...@@ -25,9 +25,19 @@ gl_FragCoord origin is upper left
0:7 Function Definition: main( ( temp void) 0:7 Function Definition: main( ( temp void)
0:7 Function Parameters: 0:7 Function Parameters:
0:? Sequence 0:? Sequence
0:7 move second child to first child ( temp structure{ temp float interp, temp uint no_interp}) 0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 interp: direct index for structure ( temp float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:7 Constant:
0:7 0 (const int)
0:? 'interp' (layout( location=0) in float)
0:7 move second child to first child ( temp uint)
0:7 no_interp: direct index for structure ( temp uint)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:7 Constant:
0:7 1 (const int)
0:? 'no_interp' (layout( location=1) flat in uint)
0:7 Function Call: @main(struct-PSInput-f1-u11;vf4;vf4; ( temp void) 0:7 Function Call: @main(struct-PSInput-f1-u11;vf4;vf4; ( temp void)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'out1' ( temp 4-component vector of float) 0:? 'out1' ( temp 4-component vector of float)
...@@ -39,7 +49,8 @@ gl_FragCoord origin is upper left ...@@ -39,7 +49,8 @@ gl_FragCoord origin is upper left
0:? 'out2' (layout( location=3) out 4-component vector of float) 0:? 'out2' (layout( location=3) out 4-component vector of float)
0:? 'out2' ( temp 4-component vector of float) 0:? 'out2' ( temp 4-component vector of float)
0:? Linker Objects 0:? Linker Objects
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:? 'interp' (layout( location=0) in float)
0:? 'no_interp' (layout( location=1) flat in uint)
0:? 'out1' (layout( location=1) out 4-component vector of float) 0:? 'out1' (layout( location=1) out 4-component vector of float)
0:? 'out2' (layout( location=3) out 4-component vector of float) 0:? 'out2' (layout( location=3) out 4-component vector of float)
...@@ -73,9 +84,19 @@ gl_FragCoord origin is upper left ...@@ -73,9 +84,19 @@ gl_FragCoord origin is upper left
0:7 Function Definition: main( ( temp void) 0:7 Function Definition: main( ( temp void)
0:7 Function Parameters: 0:7 Function Parameters:
0:? Sequence 0:? Sequence
0:7 move second child to first child ( temp structure{ temp float interp, temp uint no_interp}) 0:7 Sequence
0:7 move second child to first child ( temp float)
0:7 interp: direct index for structure ( temp float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:7 Constant:
0:7 0 (const int)
0:? 'interp' (layout( location=0) in float)
0:7 move second child to first child ( temp uint)
0:7 no_interp: direct index for structure ( temp uint)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:7 Constant:
0:7 1 (const int)
0:? 'no_interp' (layout( location=1) flat in uint)
0:7 Function Call: @main(struct-PSInput-f1-u11;vf4;vf4; ( temp void) 0:7 Function Call: @main(struct-PSInput-f1-u11;vf4;vf4; ( temp void)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'out1' ( temp 4-component vector of float) 0:? 'out1' ( temp 4-component vector of float)
...@@ -87,7 +108,8 @@ gl_FragCoord origin is upper left ...@@ -87,7 +108,8 @@ gl_FragCoord origin is upper left
0:? 'out2' (layout( location=3) out 4-component vector of float) 0:? 'out2' (layout( location=3) out 4-component vector of float)
0:? 'out2' ( temp 4-component vector of float) 0:? 'out2' ( temp 4-component vector of float)
0:? Linker Objects 0:? Linker Objects
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:? 'interp' (layout( location=0) in float)
0:? 'no_interp' (layout( location=1) flat in uint)
0:? 'out1' (layout( location=1) out 4-component vector of float) 0:? 'out1' (layout( location=1) out 4-component vector of float)
0:? 'out2' (layout( location=3) out 4-component vector of float) 0:? 'out2' (layout( location=3) out 4-component vector of float)
...@@ -98,7 +120,7 @@ gl_FragCoord origin is upper left ...@@ -98,7 +120,7 @@ gl_FragCoord origin is upper left
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 25 46 48 EntryPoint Fragment 4 "main" 26 32 46 48
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source HLSL 500 Source HLSL 500
Name 4 "main" Name 4 "main"
...@@ -110,10 +132,8 @@ gl_FragCoord origin is upper left ...@@ -110,10 +132,8 @@ gl_FragCoord origin is upper left
Name 14 "out1" Name 14 "out1"
Name 15 "out2" Name 15 "out2"
Name 22 "input" Name 22 "input"
Name 23 "PSInput" Name 26 "interp"
MemberName 23(PSInput) 0 "interp" Name 32 "no_interp"
MemberName 23(PSInput) 1 "no_interp"
Name 25 "input"
Name 36 "out1" Name 36 "out1"
Name 37 "out2" Name 37 "out2"
Name 38 "param" Name 38 "param"
...@@ -121,8 +141,9 @@ gl_FragCoord origin is upper left ...@@ -121,8 +141,9 @@ gl_FragCoord origin is upper left
Name 41 "param" Name 41 "param"
Name 46 "out1" Name 46 "out1"
Name 48 "out2" Name 48 "out2"
MemberDecorate 23(PSInput) 1 Flat Decorate 26(interp) Location 0
Decorate 25(input) Location 0 Decorate 32(no_interp) Flat
Decorate 32(no_interp) Location 1
Decorate 46(out1) Location 1 Decorate 46(out1) Location 1
Decorate 48(out2) Location 3 Decorate 48(out2) Location 3
2: TypeVoid 2: TypeVoid
...@@ -138,13 +159,14 @@ gl_FragCoord origin is upper left ...@@ -138,13 +159,14 @@ gl_FragCoord origin is upper left
19: 10(fvec4) ConstantComposite 18 18 18 18 19: 10(fvec4) ConstantComposite 18 18 18 18
20: 6(float) Constant 0 20: 6(float) Constant 0
21: 10(fvec4) ConstantComposite 20 20 20 20 21: 10(fvec4) ConstantComposite 20 20 20 20
23(PSInput): TypeStruct 6(float) 7(int) 23: TypeInt 32 1
24: TypePointer Input 23(PSInput) 24: 23(int) Constant 0
25(input): 24(ptr) Variable Input 25: TypePointer Input 6(float)
28: TypeInt 32 1 26(interp): 25(ptr) Variable Input
29: 28(int) Constant 0 28: TypePointer Function 6(float)
30: TypePointer Function 6(float) 30: 23(int) Constant 1
33: 28(int) Constant 1 31: TypePointer Input 7(int)
32(no_interp): 31(ptr) Variable Input
34: TypePointer Function 7(int) 34: TypePointer Function 7(int)
45: TypePointer Output 10(fvec4) 45: TypePointer Output 10(fvec4)
46(out1): 45(ptr) Variable Output 46(out1): 45(ptr) Variable Output
...@@ -157,13 +179,12 @@ gl_FragCoord origin is upper left ...@@ -157,13 +179,12 @@ gl_FragCoord origin is upper left
38(param): 9(ptr) Variable Function 38(param): 9(ptr) Variable Function
40(param): 11(ptr) Variable Function 40(param): 11(ptr) Variable Function
41(param): 11(ptr) Variable Function 41(param): 11(ptr) Variable Function
26: 23(PSInput) Load 25(input) 27: 6(float) Load 26(interp)
27: 6(float) CompositeExtract 26 0 29: 28(ptr) AccessChain 22(input) 24
31: 30(ptr) AccessChain 22(input) 29 Store 29 27
Store 31 27 33: 7(int) Load 32(no_interp)
32: 7(int) CompositeExtract 26 1 35: 34(ptr) AccessChain 22(input) 30
35: 34(ptr) AccessChain 22(input) 33 Store 35 33
Store 35 32
39: 8(PSInput) Load 22(input) 39: 8(PSInput) Load 22(input)
Store 38(param) 39 Store 38(param) 39
42: 2 FunctionCall 16(@main(struct-PSInput-f1-u11;vf4;vf4;) 38(param) 40(param) 41(param) 42: 2 FunctionCall 16(@main(struct-PSInput-f1-u11;vf4;vf4;) 38(param) 40(param) 41(param)
......
...@@ -48,9 +48,19 @@ gl_FragCoord origin is upper left ...@@ -48,9 +48,19 @@ gl_FragCoord origin is upper left
0:12 Function Definition: main( ( temp void) 0:12 Function Definition: main( ( temp void)
0:12 Function Parameters: 0:12 Function Parameters:
0:? Sequence 0:? Sequence
0:12 move second child to first child ( temp structure{ temp float interp, temp uint no_interp}) 0:12 Sequence
0:12 move second child to first child ( temp float)
0:12 interp: direct index for structure ( temp float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:12 Constant:
0:12 0 (const int)
0:? 'interp' (layout( location=0) in float)
0:12 move second child to first child ( temp uint)
0:12 no_interp: direct index for structure ( temp uint)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:12 Constant:
0:12 1 (const int)
0:? 'no_interp' (layout( location=1) flat in uint)
0:12 Sequence 0:12 Sequence
0:12 move second child to first child ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2}) 0:12 move second child to first child ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2})
0:12 'flattenTemp' ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2}) 0:12 'flattenTemp' ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2})
...@@ -75,7 +85,8 @@ gl_FragCoord origin is upper left ...@@ -75,7 +85,8 @@ gl_FragCoord origin is upper left
0:? Linker Objects 0:? Linker Objects
0:? 'o1' (layout( location=2) out 4-component vector of float) 0:? 'o1' (layout( location=2) out 4-component vector of float)
0:? 'o2' (layout( location=1) out 4-component vector of float) 0:? 'o2' (layout( location=1) out 4-component vector of float)
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:? 'interp' (layout( location=0) in float)
0:? 'no_interp' (layout( location=1) flat in uint)
0:? 'po' (layout( location=0) out 4-component vector of float) 0:? 'po' (layout( location=0) out 4-component vector of float)
...@@ -131,9 +142,19 @@ gl_FragCoord origin is upper left ...@@ -131,9 +142,19 @@ gl_FragCoord origin is upper left
0:12 Function Definition: main( ( temp void) 0:12 Function Definition: main( ( temp void)
0:12 Function Parameters: 0:12 Function Parameters:
0:? Sequence 0:? Sequence
0:12 move second child to first child ( temp structure{ temp float interp, temp uint no_interp}) 0:12 Sequence
0:12 move second child to first child ( temp float)
0:12 interp: direct index for structure ( temp float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:12 Constant:
0:12 0 (const int)
0:? 'interp' (layout( location=0) in float)
0:12 move second child to first child ( temp uint)
0:12 no_interp: direct index for structure ( temp uint)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:12 Constant:
0:12 1 (const int)
0:? 'no_interp' (layout( location=1) flat in uint)
0:12 Sequence 0:12 Sequence
0:12 move second child to first child ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2}) 0:12 move second child to first child ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2})
0:12 'flattenTemp' ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2}) 0:12 'flattenTemp' ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2})
...@@ -158,7 +179,8 @@ gl_FragCoord origin is upper left ...@@ -158,7 +179,8 @@ gl_FragCoord origin is upper left
0:? Linker Objects 0:? Linker Objects
0:? 'o1' (layout( location=2) out 4-component vector of float) 0:? 'o1' (layout( location=2) out 4-component vector of float)
0:? 'o2' (layout( location=1) out 4-component vector of float) 0:? 'o2' (layout( location=1) out 4-component vector of float)
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:? 'interp' (layout( location=0) in float)
0:? 'no_interp' (layout( location=1) flat in uint)
0:? 'po' (layout( location=0) out 4-component vector of float) 0:? 'po' (layout( location=0) out 4-component vector of float)
// Module Version 10000 // Module Version 10000
...@@ -168,7 +190,7 @@ gl_FragCoord origin is upper left ...@@ -168,7 +190,7 @@ gl_FragCoord origin is upper left
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 43 57 60 63 EntryPoint Fragment 4 "main" 42 46 57 60 63
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source HLSL 500 Source HLSL 500
Name 4 "main" Name 4 "main"
...@@ -183,10 +205,8 @@ gl_FragCoord origin is upper left ...@@ -183,10 +205,8 @@ gl_FragCoord origin is upper left
Name 15 "po" Name 15 "po"
Name 19 "pso" Name 19 "pso"
Name 40 "input" Name 40 "input"
Name 41 "PSInput" Name 42 "interp"
MemberName 41(PSInput) 0 "interp" Name 46 "no_interp"
MemberName 41(PSInput) 1 "no_interp"
Name 43 "input"
Name 49 "flattenTemp" Name 49 "flattenTemp"
Name 50 "po" Name 50 "po"
Name 51 "param" Name 51 "param"
...@@ -194,8 +214,9 @@ gl_FragCoord origin is upper left ...@@ -194,8 +214,9 @@ gl_FragCoord origin is upper left
Name 57 "o1" Name 57 "o1"
Name 60 "o2" Name 60 "o2"
Name 63 "po" Name 63 "po"
MemberDecorate 41(PSInput) 1 Flat Decorate 42(interp) Location 0
Decorate 43(input) Location 0 Decorate 46(no_interp) Flat
Decorate 46(no_interp) Location 1
Decorate 57(o1) Location 2 Decorate 57(o1) Location 2
Decorate 60(o2) Location 1 Decorate 60(o2) Location 1
Decorate 63(po) Location 0 Decorate 63(po) Location 0
...@@ -219,9 +240,10 @@ gl_FragCoord origin is upper left ...@@ -219,9 +240,10 @@ gl_FragCoord origin is upper left
31: 6(float) Constant 1065353216 31: 6(float) Constant 1065353216
34: 10(fvec4) ConstantComposite 31 31 31 31 34: 10(fvec4) ConstantComposite 31 31 31 31
36: 10(fvec4) ConstantComposite 30 30 30 30 36: 10(fvec4) ConstantComposite 30 30 30 30
41(PSInput): TypeStruct 6(float) 7(int) 41: TypePointer Input 6(float)
42: TypePointer Input 41(PSInput) 42(interp): 41(ptr) Variable Input
43(input): 42(ptr) Variable Input 45: TypePointer Input 7(int)
46(no_interp): 45(ptr) Variable Input
56: TypePointer Output 10(fvec4) 56: TypePointer Output 10(fvec4)
57(o1): 56(ptr) Variable Output 57(o1): 56(ptr) Variable Output
60(o2): 56(ptr) Variable Output 60(o2): 56(ptr) Variable Output
...@@ -233,11 +255,10 @@ gl_FragCoord origin is upper left ...@@ -233,11 +255,10 @@ gl_FragCoord origin is upper left
50(po): 11(ptr) Variable Function 50(po): 11(ptr) Variable Function
51(param): 9(ptr) Variable Function 51(param): 9(ptr) Variable Function
53(param): 11(ptr) Variable Function 53(param): 11(ptr) Variable Function
44: 41(PSInput) Load 43(input) 43: 6(float) Load 42(interp)
45: 6(float) CompositeExtract 44 0 44: 27(ptr) AccessChain 40(input) 21
46: 27(ptr) AccessChain 40(input) 21 Store 44 43
Store 46 45 47: 7(int) Load 46(no_interp)
47: 7(int) CompositeExtract 44 1
48: 23(ptr) AccessChain 40(input) 22 48: 23(ptr) AccessChain 40(input) 22
Store 48 47 Store 48 47
52: 8(PSInput) Load 40(input) 52: 8(PSInput) Load 40(input)
......
...@@ -48,9 +48,19 @@ gl_FragCoord origin is upper left ...@@ -48,9 +48,19 @@ gl_FragCoord origin is upper left
0:12 Function Definition: main( ( temp void) 0:12 Function Definition: main( ( temp void)
0:12 Function Parameters: 0:12 Function Parameters:
0:? Sequence 0:? Sequence
0:12 move second child to first child ( temp structure{ temp float interp, temp uint no_interp}) 0:12 Sequence
0:12 move second child to first child ( temp float)
0:12 interp: direct index for structure ( temp float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:12 Constant:
0:12 0 (const int)
0:? 'interp' (layout( location=0) in float)
0:12 move second child to first child ( temp uint)
0:12 no_interp: direct index for structure ( temp uint)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:12 Constant:
0:12 1 (const int)
0:? 'no_interp' (layout( location=1) flat in uint)
0:12 Sequence 0:12 Sequence
0:12 move second child to first child ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2}) 0:12 move second child to first child ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2})
0:12 'flattenTemp' ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2}) 0:12 'flattenTemp' ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2})
...@@ -75,7 +85,8 @@ gl_FragCoord origin is upper left ...@@ -75,7 +85,8 @@ gl_FragCoord origin is upper left
0:? Linker Objects 0:? Linker Objects
0:? 'o1' (layout( location=2) out 4-component vector of float) 0:? 'o1' (layout( location=2) out 4-component vector of float)
0:? 'o2' (layout( location=3) out 4-component vector of float) 0:? 'o2' (layout( location=3) out 4-component vector of float)
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:? 'interp' (layout( location=0) in float)
0:? 'no_interp' (layout( location=1) flat in uint)
0:? 'po' (layout( location=0) out 4-component vector of float) 0:? 'po' (layout( location=0) out 4-component vector of float)
...@@ -131,9 +142,19 @@ gl_FragCoord origin is upper left ...@@ -131,9 +142,19 @@ gl_FragCoord origin is upper left
0:12 Function Definition: main( ( temp void) 0:12 Function Definition: main( ( temp void)
0:12 Function Parameters: 0:12 Function Parameters:
0:? Sequence 0:? Sequence
0:12 move second child to first child ( temp structure{ temp float interp, temp uint no_interp}) 0:12 Sequence
0:12 move second child to first child ( temp float)
0:12 interp: direct index for structure ( temp float)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:12 Constant:
0:12 0 (const int)
0:? 'interp' (layout( location=0) in float)
0:12 move second child to first child ( temp uint)
0:12 no_interp: direct index for structure ( temp uint)
0:? 'input' ( temp structure{ temp float interp, temp uint no_interp}) 0:? 'input' ( temp structure{ temp float interp, temp uint no_interp})
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:12 Constant:
0:12 1 (const int)
0:? 'no_interp' (layout( location=1) flat in uint)
0:12 Sequence 0:12 Sequence
0:12 move second child to first child ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2}) 0:12 move second child to first child ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2})
0:12 'flattenTemp' ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2}) 0:12 'flattenTemp' ( temp structure{ temp 4-component vector of float o1, temp 4-component vector of float o2})
...@@ -158,7 +179,8 @@ gl_FragCoord origin is upper left ...@@ -158,7 +179,8 @@ gl_FragCoord origin is upper left
0:? Linker Objects 0:? Linker Objects
0:? 'o1' (layout( location=2) out 4-component vector of float) 0:? 'o1' (layout( location=2) out 4-component vector of float)
0:? 'o2' (layout( location=3) out 4-component vector of float) 0:? 'o2' (layout( location=3) out 4-component vector of float)
0:? 'input' (layout( location=0) in structure{ temp float interp, flat temp uint no_interp}) 0:? 'interp' (layout( location=0) in float)
0:? 'no_interp' (layout( location=1) flat in uint)
0:? 'po' (layout( location=0) out 4-component vector of float) 0:? 'po' (layout( location=0) out 4-component vector of float)
// Module Version 10000 // Module Version 10000
...@@ -168,7 +190,7 @@ gl_FragCoord origin is upper left ...@@ -168,7 +190,7 @@ gl_FragCoord origin is upper left
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 43 57 60 63 EntryPoint Fragment 4 "main" 42 46 57 60 63
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source HLSL 500 Source HLSL 500
Name 4 "main" Name 4 "main"
...@@ -183,10 +205,8 @@ gl_FragCoord origin is upper left ...@@ -183,10 +205,8 @@ gl_FragCoord origin is upper left
Name 15 "po" Name 15 "po"
Name 19 "pso" Name 19 "pso"
Name 40 "input" Name 40 "input"
Name 41 "PSInput" Name 42 "interp"
MemberName 41(PSInput) 0 "interp" Name 46 "no_interp"
MemberName 41(PSInput) 1 "no_interp"
Name 43 "input"
Name 49 "flattenTemp" Name 49 "flattenTemp"
Name 50 "po" Name 50 "po"
Name 51 "param" Name 51 "param"
...@@ -194,8 +214,9 @@ gl_FragCoord origin is upper left ...@@ -194,8 +214,9 @@ gl_FragCoord origin is upper left
Name 57 "o1" Name 57 "o1"
Name 60 "o2" Name 60 "o2"
Name 63 "po" Name 63 "po"
MemberDecorate 41(PSInput) 1 Flat Decorate 42(interp) Location 0
Decorate 43(input) Location 0 Decorate 46(no_interp) Flat
Decorate 46(no_interp) Location 1
Decorate 57(o1) Location 2 Decorate 57(o1) Location 2
Decorate 60(o2) Location 3 Decorate 60(o2) Location 3
Decorate 63(po) Location 0 Decorate 63(po) Location 0
...@@ -219,9 +240,10 @@ gl_FragCoord origin is upper left ...@@ -219,9 +240,10 @@ gl_FragCoord origin is upper left
31: 6(float) Constant 1065353216 31: 6(float) Constant 1065353216
34: 10(fvec4) ConstantComposite 31 31 31 31 34: 10(fvec4) ConstantComposite 31 31 31 31
36: 10(fvec4) ConstantComposite 30 30 30 30 36: 10(fvec4) ConstantComposite 30 30 30 30
41(PSInput): TypeStruct 6(float) 7(int) 41: TypePointer Input 6(float)
42: TypePointer Input 41(PSInput) 42(interp): 41(ptr) Variable Input
43(input): 42(ptr) Variable Input 45: TypePointer Input 7(int)
46(no_interp): 45(ptr) Variable Input
56: TypePointer Output 10(fvec4) 56: TypePointer Output 10(fvec4)
57(o1): 56(ptr) Variable Output 57(o1): 56(ptr) Variable Output
60(o2): 56(ptr) Variable Output 60(o2): 56(ptr) Variable Output
...@@ -233,11 +255,10 @@ gl_FragCoord origin is upper left ...@@ -233,11 +255,10 @@ gl_FragCoord origin is upper left
50(po): 11(ptr) Variable Function 50(po): 11(ptr) Variable Function
51(param): 9(ptr) Variable Function 51(param): 9(ptr) Variable Function
53(param): 11(ptr) Variable Function 53(param): 11(ptr) Variable Function
44: 41(PSInput) Load 43(input) 43: 6(float) Load 42(interp)
45: 6(float) CompositeExtract 44 0 44: 27(ptr) AccessChain 40(input) 21
46: 27(ptr) AccessChain 40(input) 21 Store 44 43
Store 46 45 47: 7(int) Load 46(no_interp)
47: 7(int) CompositeExtract 44 1
48: 23(ptr) AccessChain 40(input) 22 48: 23(ptr) AccessChain 40(input) 22
Store 48 47 Store 48 47
52: 8(PSInput) Load 40(input) 52: 8(PSInput) Load 40(input)
......
...@@ -1904,6 +1904,10 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct ...@@ -1904,6 +1904,10 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
// Structs containing built-ins must be split // Structs containing built-ins must be split
else if (variable.getType().containsBuiltIn()) else if (variable.getType().containsBuiltIn())
split(variable); split(variable);
else if (!variable.getType().getQualifier().isArrayedIo(language))
flatten(variable);
//else
// TODO: unify split and flatten, so all paths can create flattened I/O
} }
// For clip and cull distance, multiple output variables potentially get merged // For clip and cull distance, multiple output variables potentially get merged
...@@ -1915,7 +1919,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct ...@@ -1915,7 +1919,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
if (entryPointOutput != nullptr) if (entryPointOutput != nullptr)
makeVariableInOut(*entryPointOutput); makeVariableInOut(*entryPointOutput);
for (auto it = inputs.begin(); it != inputs.end(); ++it) for (auto it = inputs.begin(); it != inputs.end(); ++it)
if (!isDsPcfInput((*it)->getType())) // skip domain shader PCF input (see comment below) if (!isDsPcfInput((*it)->getType())) // wait until the end for PCF input (see comment below)
makeVariableInOut(*(*it)); makeVariableInOut(*(*it));
for (auto it = outputs.begin(); it != outputs.end(); ++it) for (auto it = outputs.begin(); it != outputs.end(); ++it)
makeVariableInOut(*(*it)); makeVariableInOut(*(*it));
...@@ -1927,7 +1931,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct ...@@ -1927,7 +1931,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct
// however, so this ensures the linkage is built in the correct order regardless of argument order. // however, so this ensures the linkage is built in the correct order regardless of argument order.
if (language == EShLangTessEvaluation) { if (language == EShLangTessEvaluation) {
for (auto it = inputs.begin(); it != inputs.end(); ++it) for (auto it = inputs.begin(); it != inputs.end(); ++it)
if (isDsPcfInput((*it)->getType())) // skip domain shader PCF input (see comment below) if (isDsPcfInput((*it)->getType()))
makeVariableInOut(*(*it)); makeVariableInOut(*(*it));
} }
......
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