
This commit adds support for copying nested hierarchical types of split types. E.g, a struct of a struct containing both user and builtin interstage IO variables. When copying split types, if any subtree does NOT contain builtin interstage IO, we can copy the whole subtree with one assignment, which saves a bunch of AST verbosity for memberwise copies of that subtree.
251 lines
16 KiB
Plaintext
251 lines
16 KiB
Plaintext
hlsl.structarray.flatten.geom
|
|
Shader version: 450
|
|
invocations = -1
|
|
max_vertices = 4
|
|
input primitive = lines
|
|
output primitive = triangle_strip
|
|
0:? Sequence
|
|
0:16 Function Definition: main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21; (temp void)
|
|
0:16 Function Parameters:
|
|
0:16 '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:16 'outStream' (out structure{temp 4-component vector of float Position position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:? Sequence
|
|
0:19 move second child to first child (temp 4-component vector of float)
|
|
0:19 color: direct index for structure (temp 4-component vector of float)
|
|
0:19 '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:19 Constant:
|
|
0:19 1 (const int)
|
|
0:19 color: direct index for structure (temp 4-component vector of float)
|
|
0:19 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:19 '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:19 Constant:
|
|
0:19 1 (const int)
|
|
0:19 Constant:
|
|
0:19 1 (const int)
|
|
0:20 move second child to first child (temp 2-component vector of float)
|
|
0:20 uv: direct index for structure (temp 2-component vector of float)
|
|
0:20 '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:20 Constant:
|
|
0:20 2 (const int)
|
|
0:20 uv: direct index for structure (temp 2-component vector of float)
|
|
0:20 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:20 '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:20 Constant:
|
|
0:20 1 (const int)
|
|
0:20 Constant:
|
|
0:20 2 (const int)
|
|
0:21 move second child to first child (temp 4-component vector of float)
|
|
0:21 position: direct index for structure (temp 4-component vector of float)
|
|
0:21 '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:21 Constant:
|
|
0:21 0 (const int)
|
|
0:21 position: direct index for structure (temp 4-component vector of float)
|
|
0:21 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:21 '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:21 Constant:
|
|
0:21 1 (const int)
|
|
0:21 Constant:
|
|
0:21 0 (const int)
|
|
0:22 Sequence
|
|
0:22 Sequence
|
|
0:22 move second child to first child (temp 4-component vector of float)
|
|
0:? 'outStream.position' (out 4-component vector of float Position)
|
|
0:22 position: direct index for structure (temp 4-component vector of float)
|
|
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 0 (const int)
|
|
0:22 move second child to first child (temp 4-component vector of float)
|
|
0:22 color: direct index for structure (temp 4-component vector of float)
|
|
0:22 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 0 (const int)
|
|
0:22 color: direct index for structure (temp 4-component vector of float)
|
|
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 1 (const int)
|
|
0:22 move second child to first child (temp 2-component vector of float)
|
|
0:22 uv: direct index for structure (temp 2-component vector of float)
|
|
0:22 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 1 (const int)
|
|
0:22 uv: direct index for structure (temp 2-component vector of float)
|
|
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 2 (const int)
|
|
0:22 EmitVertex (temp void)
|
|
0:? Linker Objects
|
|
0:? 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:? 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:? 'outStream.position' (out 4-component vector of float Position)
|
|
|
|
|
|
Linked geometry stage:
|
|
|
|
|
|
Shader version: 450
|
|
invocations = 1
|
|
max_vertices = 4
|
|
input primitive = lines
|
|
output primitive = triangle_strip
|
|
0:? Sequence
|
|
0:16 Function Definition: main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21; (temp void)
|
|
0:16 Function Parameters:
|
|
0:16 '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:16 'outStream' (out structure{temp 4-component vector of float Position position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:? Sequence
|
|
0:19 move second child to first child (temp 4-component vector of float)
|
|
0:19 color: direct index for structure (temp 4-component vector of float)
|
|
0:19 '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:19 Constant:
|
|
0:19 1 (const int)
|
|
0:19 color: direct index for structure (temp 4-component vector of float)
|
|
0:19 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:19 '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:19 Constant:
|
|
0:19 1 (const int)
|
|
0:19 Constant:
|
|
0:19 1 (const int)
|
|
0:20 move second child to first child (temp 2-component vector of float)
|
|
0:20 uv: direct index for structure (temp 2-component vector of float)
|
|
0:20 '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:20 Constant:
|
|
0:20 2 (const int)
|
|
0:20 uv: direct index for structure (temp 2-component vector of float)
|
|
0:20 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:20 '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:20 Constant:
|
|
0:20 1 (const int)
|
|
0:20 Constant:
|
|
0:20 2 (const int)
|
|
0:21 move second child to first child (temp 4-component vector of float)
|
|
0:21 position: direct index for structure (temp 4-component vector of float)
|
|
0:21 '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:21 Constant:
|
|
0:21 0 (const int)
|
|
0:21 position: direct index for structure (temp 4-component vector of float)
|
|
0:21 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:21 '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:21 Constant:
|
|
0:21 1 (const int)
|
|
0:21 Constant:
|
|
0:21 0 (const int)
|
|
0:22 Sequence
|
|
0:22 Sequence
|
|
0:22 move second child to first child (temp 4-component vector of float)
|
|
0:? 'outStream.position' (out 4-component vector of float Position)
|
|
0:22 position: direct index for structure (temp 4-component vector of float)
|
|
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 0 (const int)
|
|
0:22 move second child to first child (temp 4-component vector of float)
|
|
0:22 color: direct index for structure (temp 4-component vector of float)
|
|
0:22 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 0 (const int)
|
|
0:22 color: direct index for structure (temp 4-component vector of float)
|
|
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 1 (const int)
|
|
0:22 move second child to first child (temp 2-component vector of float)
|
|
0:22 uv: direct index for structure (temp 2-component vector of float)
|
|
0:22 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 1 (const int)
|
|
0:22 uv: direct index for structure (temp 2-component vector of float)
|
|
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:22 Constant:
|
|
0:22 2 (const int)
|
|
0:22 EmitVertex (temp void)
|
|
0:? Linker Objects
|
|
0:? 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:? 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
|
|
0:? 'outStream.position' (out 4-component vector of float Position)
|
|
|
|
// Module Version 10000
|
|
// Generated by (magic number): 80001
|
|
// Id's are bound by 49
|
|
|
|
Capability Geometry
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Geometry 4 "main" 19 36 41
|
|
ExecutionMode 4 InputLines
|
|
ExecutionMode 4 Invocations 1
|
|
ExecutionMode 4 OutputTriangleStrip
|
|
ExecutionMode 4 OutputVertices 4
|
|
Name 4 "main"
|
|
Name 9 "PS_IN"
|
|
MemberName 9(PS_IN) 0 "position"
|
|
MemberName 9(PS_IN) 1 "color"
|
|
MemberName 9(PS_IN) 2 "uv"
|
|
Name 11 "vout"
|
|
Name 14 "VertexData"
|
|
MemberName 14(VertexData) 0 "position"
|
|
MemberName 14(VertexData) 1 "color"
|
|
MemberName 14(VertexData) 2 "uv"
|
|
Name 19 "vin"
|
|
Name 36 "outStream.position"
|
|
Name 39 "PS_IN"
|
|
MemberName 39(PS_IN) 0 "color"
|
|
MemberName 39(PS_IN) 1 "uv"
|
|
Name 41 "outStream"
|
|
Decorate 19(vin) Location 0
|
|
Decorate 36(outStream.position) BuiltIn Position
|
|
Decorate 41(outStream) Location 0
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
6: TypeFloat 32
|
|
7: TypeVector 6(float) 4
|
|
8: TypeVector 6(float) 2
|
|
9(PS_IN): TypeStruct 7(fvec4) 7(fvec4) 8(fvec2)
|
|
10: TypePointer Function 9(PS_IN)
|
|
12: TypeInt 32 1
|
|
13: 12(int) Constant 1
|
|
14(VertexData): TypeStruct 7(fvec4) 7(fvec4) 8(fvec2)
|
|
15: TypeInt 32 0
|
|
16: 15(int) Constant 2
|
|
17: TypeArray 14(VertexData) 16
|
|
18: TypePointer Input 17
|
|
19(vin): 18(ptr) Variable Input
|
|
20: TypePointer Input 7(fvec4)
|
|
23: TypePointer Function 7(fvec4)
|
|
25: 12(int) Constant 2
|
|
26: TypePointer Input 8(fvec2)
|
|
29: TypePointer Function 8(fvec2)
|
|
31: 12(int) Constant 0
|
|
35: TypePointer Output 7(fvec4)
|
|
36(outStream.position): 35(ptr) Variable Output
|
|
39(PS_IN): TypeStruct 7(fvec4) 8(fvec2)
|
|
40: TypePointer Output 39(PS_IN)
|
|
41(outStream): 40(ptr) Variable Output
|
|
47: TypePointer Output 8(fvec2)
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
11(vout): 10(ptr) Variable Function
|
|
21: 20(ptr) AccessChain 19(vin) 13 13
|
|
22: 7(fvec4) Load 21
|
|
24: 23(ptr) AccessChain 11(vout) 13
|
|
Store 24 22
|
|
27: 26(ptr) AccessChain 19(vin) 13 25
|
|
28: 8(fvec2) Load 27
|
|
30: 29(ptr) AccessChain 11(vout) 25
|
|
Store 30 28
|
|
32: 20(ptr) AccessChain 19(vin) 13 31
|
|
33: 7(fvec4) Load 32
|
|
34: 23(ptr) AccessChain 11(vout) 31
|
|
Store 34 33
|
|
37: 23(ptr) AccessChain 11(vout) 31
|
|
38: 7(fvec4) Load 37
|
|
Store 36(outStream.position) 38
|
|
42: 23(ptr) AccessChain 11(vout) 13
|
|
43: 7(fvec4) Load 42
|
|
44: 35(ptr) AccessChain 41(outStream) 31
|
|
Store 44 43
|
|
45: 29(ptr) AccessChain 11(vout) 25
|
|
46: 8(fvec2) Load 45
|
|
48: 47(ptr) AccessChain 41(outStream) 13
|
|
Store 48 46
|
|
EmitVertex
|
|
Return
|
|
FunctionEnd
|