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.
This commit is contained in:
parent
cca42a8ea6
commit
b6be80f44e
12 changed files with 693 additions and 374 deletions
|
|
@ -105,14 +105,28 @@ triangle order = none
|
|||
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
|
||||
0:22 Constant:
|
||||
0:22 0 (const int)
|
||||
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 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:? 'tesscoord' ( temp 3-component vector of float)
|
||||
0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor})
|
||||
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 '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:? '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:? '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:? '@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:? 'tesscoord' ( patch in 3-component vector of float TessCoord)
|
||||
0:? 'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
|
||||
|
|
@ -228,14 +242,28 @@ triangle order = none
|
|||
0:? 'pcf_data_flInsideTessFactor' ( patch in 2-element array of float TessLevelInner)
|
||||
0:22 Constant:
|
||||
0:22 0 (const int)
|
||||
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 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:? 'tesscoord' ( temp 3-component vector of float)
|
||||
0:? 'pcf_data' ( temp structure{ temp 3-element array of float flTessFactor, temp float flInsideTessFactor})
|
||||
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 '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:? '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:? '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:? '@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:? 'tesscoord' ( patch in 3-component vector of float TessCoord)
|
||||
0:? 'pcf_data_flTessFactor' ( patch in 4-element array of float TessLevelOuter)
|
||||
|
|
@ -243,12 +271,12 @@ triangle order = none
|
|||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 88
|
||||
// Id's are bound by 95
|
||||
|
||||
Capability Tessellation
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
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
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
|
|
@ -273,9 +301,11 @@ triangle order = none
|
|||
Name 57 "pcf_data"
|
||||
Name 61 "pcf_data_flTessFactor"
|
||||
Name 76 "pcf_data_flInsideTessFactor"
|
||||
Name 81 "@entryPointOutput"
|
||||
Name 83 "param"
|
||||
Name 85 "param"
|
||||
Name 80 "flattenTemp"
|
||||
Name 82 "param"
|
||||
Name 84 "param"
|
||||
Name 88 "pos"
|
||||
Name 92 "norm"
|
||||
Decorate 51(i) Location 0
|
||||
Decorate 55(tesscoord) Patch
|
||||
Decorate 55(tesscoord) BuiltIn TessCoord
|
||||
|
|
@ -283,7 +313,8 @@ triangle order = none
|
|||
Decorate 61(pcf_data_flTessFactor) BuiltIn TessLevelOuter
|
||||
Decorate 76(pcf_data_flInsideTessFactor) Patch
|
||||
Decorate 76(pcf_data_flInsideTessFactor) BuiltIn TessLevelInner
|
||||
Decorate 81(@entryPointOutput) Location 0
|
||||
Decorate 88(pos) Location 0
|
||||
Decorate 92(norm) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -322,15 +353,18 @@ triangle order = none
|
|||
74: TypeArray 6(float) 73
|
||||
75: TypePointer Input 74
|
||||
76(pcf_data_flInsideTessFactor): 75(ptr) Variable Input
|
||||
80: TypePointer Output 17(gs_in_t)
|
||||
81(@entryPointOutput): 80(ptr) Variable Output
|
||||
87: TypePointer Output 7(fvec4)
|
||||
88(pos): 87(ptr) Variable Output
|
||||
91: TypePointer Output 8(fvec3)
|
||||
92(norm): 91(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
49(i): 48(ptr) Variable Function
|
||||
53(tesscoord): 13(ptr) Variable Function
|
||||
57(pcf_data): 16(ptr) Variable Function
|
||||
83(param): 13(ptr) Variable Function
|
||||
85(param): 16(ptr) Variable Function
|
||||
80(flattenTemp): 24(ptr) Variable Function
|
||||
82(param): 13(ptr) Variable Function
|
||||
84(param): 16(ptr) Variable Function
|
||||
52: 12 Load 51(i)
|
||||
Store 49(i) 52
|
||||
56: 8(fvec3) Load 55(tesscoord)
|
||||
|
|
@ -351,13 +385,19 @@ triangle order = none
|
|||
78: 6(float) Load 77
|
||||
79: 30(ptr) AccessChain 57(pcf_data) 37
|
||||
Store 79 78
|
||||
82: 12 Load 49(i)
|
||||
84: 8(fvec3) Load 53(tesscoord)
|
||||
Store 83(param) 84
|
||||
86:15(pcf_in_t) Load 57(pcf_data)
|
||||
Store 85(param) 86
|
||||
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)
|
||||
Store 81(@entryPointOutput) 87
|
||||
81: 12 Load 49(i)
|
||||
83: 8(fvec3) Load 53(tesscoord)
|
||||
Store 82(param) 83
|
||||
85:15(pcf_in_t) Load 57(pcf_data)
|
||||
Store 84(param) 85
|
||||
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 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
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue