HLSL: Flatten structs for all non-arrayed I/O interfaces.
This commit is contained in:
@@ -104,10 +104,7 @@ triangle order = none
|
||||
0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor, temp float foo})
|
||||
0:25 Constant:
|
||||
0:25 2 (const int)
|
||||
0:25 foo: direct index for structure ( temp float)
|
||||
0:25 'pcf_data' (layout( location=2) patch in structure{ temp float foo})
|
||||
0:25 Constant:
|
||||
0:25 0 (const int)
|
||||
0:? 'pcf_data.foo' (layout( location=2) patch in float)
|
||||
0:25 move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
|
||||
0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
|
||||
0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
|
||||
@@ -140,7 +137,7 @@ triangle order = none
|
||||
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord)
|
||||
0:? 'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
|
||||
0:? 'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
|
||||
0:? 'pcf_data' (layout( location=2) patch in structure{ temp float foo})
|
||||
0:? 'pcf_data.foo' (layout( location=2) patch in float)
|
||||
|
||||
|
||||
Linked tessellation evaluation stage:
|
||||
@@ -251,10 +248,7 @@ triangle order = none
|
||||
0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor, temp float foo})
|
||||
0:25 Constant:
|
||||
0:25 2 (const int)
|
||||
0:25 foo: direct index for structure ( temp float)
|
||||
0:25 'pcf_data' (layout( location=2) patch in structure{ temp float foo})
|
||||
0:25 Constant:
|
||||
0:25 0 (const int)
|
||||
0:? 'pcf_data.foo' (layout( location=2) patch in float)
|
||||
0:25 move second child to first child ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
|
||||
0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
|
||||
0:? 'i' (layout( location=0) in 3-element array of structure{ temp 4-component vector of float pos, temp 3-component vector of float norm})
|
||||
@@ -287,16 +281,16 @@ triangle order = none
|
||||
0:? 'tesscoord' ( patch in 3-component vector of float TessCoord)
|
||||
0:? 'pcf_data.flTessFactor' ( patch in 4-element array of float TessLevelOuter)
|
||||
0:? 'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
|
||||
0:? 'pcf_data' (layout( location=2) patch in structure{ temp float foo})
|
||||
0:? 'pcf_data.foo' (layout( location=2) patch in float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 101
|
||||
// Id's are bound by 98
|
||||
|
||||
Capability Tessellation
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint TessellationEvaluation 4 "main" 52 67 73 80 84 94 98
|
||||
EntryPoint TessellationEvaluation 4 "main" 52 67 71 77 81 91 95
|
||||
ExecutionMode 4 Triangles
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
@@ -318,30 +312,27 @@ triangle order = none
|
||||
Name 48 "pcf_data"
|
||||
Name 52 "pcf_data.flTessFactor"
|
||||
Name 67 "pcf_data.flInsideTessFactor"
|
||||
Name 71 "pcf_in_t"
|
||||
MemberName 71(pcf_in_t) 0 "foo"
|
||||
Name 73 "pcf_data"
|
||||
Name 78 "i"
|
||||
Name 80 "i"
|
||||
Name 82 "tesscoord"
|
||||
Name 84 "tesscoord"
|
||||
Name 86 "flattenTemp"
|
||||
Name 88 "param"
|
||||
Name 90 "param"
|
||||
Name 94 "@entryPointOutput.pos"
|
||||
Name 98 "@entryPointOutput.norm"
|
||||
Name 71 "pcf_data.foo"
|
||||
Name 75 "i"
|
||||
Name 77 "i"
|
||||
Name 79 "tesscoord"
|
||||
Name 81 "tesscoord"
|
||||
Name 83 "flattenTemp"
|
||||
Name 85 "param"
|
||||
Name 87 "param"
|
||||
Name 91 "@entryPointOutput.pos"
|
||||
Name 95 "@entryPointOutput.norm"
|
||||
Decorate 52(pcf_data.flTessFactor) Patch
|
||||
Decorate 52(pcf_data.flTessFactor) BuiltIn TessLevelOuter
|
||||
Decorate 67(pcf_data.flInsideTessFactor) Patch
|
||||
Decorate 67(pcf_data.flInsideTessFactor) BuiltIn TessLevelInner
|
||||
MemberDecorate 71(pcf_in_t) 0 Patch
|
||||
Decorate 73(pcf_data) Patch
|
||||
Decorate 73(pcf_data) Location 2
|
||||
Decorate 80(i) Location 0
|
||||
Decorate 84(tesscoord) Patch
|
||||
Decorate 84(tesscoord) BuiltIn TessCoord
|
||||
Decorate 94(@entryPointOutput.pos) Location 0
|
||||
Decorate 98(@entryPointOutput.norm) Location 1
|
||||
Decorate 71(pcf_data.foo) Patch
|
||||
Decorate 71(pcf_data.foo) Location 2
|
||||
Decorate 77(i) Location 0
|
||||
Decorate 81(tesscoord) Patch
|
||||
Decorate 81(tesscoord) BuiltIn TessCoord
|
||||
Decorate 91(@entryPointOutput.pos) Location 0
|
||||
Decorate 95(@entryPointOutput.norm) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -375,26 +366,24 @@ triangle order = none
|
||||
65: TypeArray 6(float) 64
|
||||
66: TypePointer Input 65
|
||||
67(pcf_data.flInsideTessFactor): 66(ptr) Variable Input
|
||||
71(pcf_in_t): TypeStruct 6(float)
|
||||
72: TypePointer Input 71(pcf_in_t)
|
||||
73(pcf_data): 72(ptr) Variable Input
|
||||
77: TypePointer Function 15
|
||||
79: TypePointer Input 15
|
||||
80(i): 79(ptr) Variable Input
|
||||
83: TypePointer Input 13(fvec3)
|
||||
84(tesscoord): 83(ptr) Variable Input
|
||||
93: TypePointer Output 12(fvec4)
|
||||
94(@entryPointOutput.pos): 93(ptr) Variable Output
|
||||
97: TypePointer Output 13(fvec3)
|
||||
98(@entryPointOutput.norm): 97(ptr) Variable Output
|
||||
71(pcf_data.foo): 53(ptr) Variable Input
|
||||
74: TypePointer Function 15
|
||||
76: TypePointer Input 15
|
||||
77(i): 76(ptr) Variable Input
|
||||
80: TypePointer Input 13(fvec3)
|
||||
81(tesscoord): 80(ptr) Variable Input
|
||||
90: TypePointer Output 12(fvec4)
|
||||
91(@entryPointOutput.pos): 90(ptr) Variable Output
|
||||
94: TypePointer Output 13(fvec3)
|
||||
95(@entryPointOutput.norm): 94(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
48(pcf_data): 11(ptr) Variable Function
|
||||
78(i): 77(ptr) Variable Function
|
||||
82(tesscoord): 16(ptr) Variable Function
|
||||
86(flattenTemp): 24(ptr) Variable Function
|
||||
88(param): 11(ptr) Variable Function
|
||||
90(param): 16(ptr) Variable Function
|
||||
75(i): 74(ptr) Variable Function
|
||||
79(tesscoord): 16(ptr) Variable Function
|
||||
83(flattenTemp): 24(ptr) Variable Function
|
||||
85(param): 11(ptr) Variable Function
|
||||
87(param): 16(ptr) Variable Function
|
||||
54: 53(ptr) AccessChain 52(pcf_data.flTessFactor) 27
|
||||
55: 6(float) Load 54
|
||||
56: 30(ptr) AccessChain 48(pcf_data) 27 27
|
||||
@@ -411,27 +400,26 @@ triangle order = none
|
||||
69: 6(float) Load 68
|
||||
70: 30(ptr) AccessChain 48(pcf_data) 37
|
||||
Store 70 69
|
||||
74: 53(ptr) AccessChain 73(pcf_data) 27
|
||||
75: 6(float) Load 74
|
||||
76: 30(ptr) AccessChain 48(pcf_data) 60
|
||||
Store 76 75
|
||||
81: 15 Load 80(i)
|
||||
Store 78(i) 81
|
||||
85: 13(fvec3) Load 84(tesscoord)
|
||||
Store 82(tesscoord) 85
|
||||
87: 15 Load 78(i)
|
||||
89:10(pcf_in_t) Load 48(pcf_data)
|
||||
Store 88(param) 89
|
||||
91: 13(fvec3) Load 82(tesscoord)
|
||||
Store 90(param) 91
|
||||
92: 17(gs_in_t) FunctionCall 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;) 88(param) 87 90(param)
|
||||
Store 86(flattenTemp) 92
|
||||
95: 35(ptr) AccessChain 86(flattenTemp) 27
|
||||
96: 12(fvec4) Load 95
|
||||
Store 94(@entryPointOutput.pos) 96
|
||||
99: 16(ptr) AccessChain 86(flattenTemp) 37
|
||||
100: 13(fvec3) Load 99
|
||||
Store 98(@entryPointOutput.norm) 100
|
||||
72: 6(float) Load 71(pcf_data.foo)
|
||||
73: 30(ptr) AccessChain 48(pcf_data) 60
|
||||
Store 73 72
|
||||
78: 15 Load 77(i)
|
||||
Store 75(i) 78
|
||||
82: 13(fvec3) Load 81(tesscoord)
|
||||
Store 79(tesscoord) 82
|
||||
84: 15 Load 75(i)
|
||||
86:10(pcf_in_t) Load 48(pcf_data)
|
||||
Store 85(param) 86
|
||||
88: 13(fvec3) Load 79(tesscoord)
|
||||
Store 87(param) 88
|
||||
89: 17(gs_in_t) FunctionCall 22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;) 85(param) 84 87(param)
|
||||
Store 83(flattenTemp) 89
|
||||
92: 35(ptr) AccessChain 83(flattenTemp) 27
|
||||
93: 12(fvec4) Load 92
|
||||
Store 91(@entryPointOutput.pos) 93
|
||||
96: 16(ptr) AccessChain 83(flattenTemp) 37
|
||||
97: 13(fvec3) Load 96
|
||||
Store 95(@entryPointOutput.norm) 97
|
||||
Return
|
||||
FunctionEnd
|
||||
22(@main(struct-pcf_in_t-f1[3]-f1-f11;struct-ds_in_t-vf4-vf31[3];vf3;): 17(gs_in_t) Function None 18
|
||||
|
||||
Reference in New Issue
Block a user