WIP: add other builtins to interstage IO
(Still adding tests: do not commit) This fixes PR #632 so that: (a) The 4 PerVertex builtins are added to an interface block for all stages except fragment. (b) Other builtin qualified variables are added as "loose" linkage members. (c) Arrayness from the PerVertex builtins is moved to the PerVertex block. (d) Sometimes, two PerVertex blocks are created, one for in, one for out (e.g, for some GS that both reads and writes a Position)
This commit is contained in:
@@ -37,7 +37,7 @@ output primitive = triangle_strip
|
||||
0:30 Sequence
|
||||
0:30 Sequence
|
||||
0:30 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'ts.psIn.pos' (out 4-component vector of float Position)
|
||||
0:? 'ts_psIn_pos' (out 4-component vector of float Position)
|
||||
0:30 pos: direct index for structure (temp 4-component vector of float)
|
||||
0:30 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
|
||||
0:30 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
|
||||
@@ -73,8 +73,8 @@ output primitive = triangle_strip
|
||||
0:? Linker Objects
|
||||
0:? 'tin' (layout(location=0 ) in 3-element array of structure{temp 2-component vector of float tc})
|
||||
0:? 'ts' (layout(location=0 ) out structure{temp structure{temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
|
||||
0:? 'tin.pos' (in 3-element array of 4-component vector of float Position)
|
||||
0:? 'ts.psIn.pos' (out 4-component vector of float Position)
|
||||
0:? 'PerVertex_in' (in 3-element array of block{in 4-component vector of float Position tin_pos})
|
||||
0:? 'PerVertex_out' (out block{out 4-component vector of float Position ts_psIn_pos})
|
||||
|
||||
|
||||
Linked geometry stage:
|
||||
@@ -118,7 +118,7 @@ output primitive = triangle_strip
|
||||
0:30 Sequence
|
||||
0:30 Sequence
|
||||
0:30 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'ts.psIn.pos' (out 4-component vector of float Position)
|
||||
0:? 'ts_psIn_pos' (out 4-component vector of float Position)
|
||||
0:30 pos: direct index for structure (temp 4-component vector of float)
|
||||
0:30 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
|
||||
0:30 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
|
||||
@@ -154,17 +154,17 @@ output primitive = triangle_strip
|
||||
0:? Linker Objects
|
||||
0:? 'tin' (layout(location=0 ) in 3-element array of structure{temp 2-component vector of float tc})
|
||||
0:? 'ts' (layout(location=0 ) out structure{temp structure{temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
|
||||
0:? 'tin.pos' (in 3-element array of 4-component vector of float Position)
|
||||
0:? 'ts.psIn.pos' (out 4-component vector of float Position)
|
||||
0:? 'PerVertex_in' (in 3-element array of block{in 4-component vector of float Position tin_pos})
|
||||
0:? 'PerVertex_out' (out block{out 4-component vector of float Position ts_psIn_pos})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 64
|
||||
// Id's are bound by 68
|
||||
|
||||
Capability Geometry
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Geometry 4 "main" 33 40 60 63
|
||||
EntryPoint Geometry 4 "main" 33 40 60 64 67
|
||||
ExecutionMode 4 Triangles
|
||||
ExecutionMode 4 Invocations 1
|
||||
ExecutionMode 4 OutputTriangleStrip
|
||||
@@ -180,7 +180,7 @@ output primitive = triangle_strip
|
||||
MemberName 15(GS_OUT) 0 "psIn"
|
||||
MemberName 15(GS_OUT) 1 "contains_no_builtin_io"
|
||||
Name 17 "o"
|
||||
Name 33 "ts.psIn.pos"
|
||||
Name 33 "ts_psIn_pos"
|
||||
Name 36 "PS_IN"
|
||||
MemberName 36(PS_IN) 0 "tc"
|
||||
Name 37 "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
|
||||
@@ -193,11 +193,19 @@ output primitive = triangle_strip
|
||||
Name 56 "PS_IN"
|
||||
MemberName 56(PS_IN) 0 "tc"
|
||||
Name 60 "tin"
|
||||
Name 63 "tin.pos"
|
||||
Decorate 33(ts.psIn.pos) BuiltIn Position
|
||||
Name 61 "PerVertex_in"
|
||||
MemberName 61(PerVertex_in) 0 "tin_pos"
|
||||
Name 64 "PerVertex_in"
|
||||
Name 65 "PerVertex_out"
|
||||
MemberName 65(PerVertex_out) 0 "ts_psIn_pos"
|
||||
Name 67 "PerVertex_out"
|
||||
Decorate 33(ts_psIn_pos) BuiltIn Position
|
||||
Decorate 40(ts) Location 0
|
||||
Decorate 60(tin) Location 0
|
||||
Decorate 63(tin.pos) BuiltIn Position
|
||||
MemberDecorate 61(PerVertex_in) 0 BuiltIn Position
|
||||
Decorate 61(PerVertex_in) Block
|
||||
MemberDecorate 65(PerVertex_out) 0 BuiltIn Position
|
||||
Decorate 65(PerVertex_out) Block
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -224,7 +232,7 @@ output primitive = triangle_strip
|
||||
29: 8(fvec2) ConstantComposite 27 28
|
||||
30: TypePointer Function 8(fvec2)
|
||||
32: TypePointer Output 7(fvec4)
|
||||
33(ts.psIn.pos): 32(ptr) Variable Output
|
||||
33(ts_psIn_pos): 32(ptr) Variable Output
|
||||
36(PS_IN): TypeStruct 8(fvec2)
|
||||
37(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO): TypeStruct 12 13(int)
|
||||
38(GS_OUT): TypeStruct 36(PS_IN) 37(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
|
||||
@@ -240,9 +248,13 @@ output primitive = triangle_strip
|
||||
58: TypeArray 56(PS_IN) 57
|
||||
59: TypePointer Input 58
|
||||
60(tin): 59(ptr) Variable Input
|
||||
61: TypeArray 7(fvec4) 57
|
||||
62: TypePointer Input 61
|
||||
63(tin.pos): 62(ptr) Variable Input
|
||||
61(PerVertex_in): TypeStruct 7(fvec4)
|
||||
62: TypeArray 61(PerVertex_in) 57
|
||||
63: TypePointer Input 62
|
||||
64(PerVertex_in): 63(ptr) Variable Input
|
||||
65(PerVertex_out): TypeStruct 7(fvec4)
|
||||
66: TypePointer Output 65(PerVertex_out)
|
||||
67(PerVertex_out): 66(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
17(o): 16(ptr) Variable Function
|
||||
@@ -252,7 +264,7 @@ output primitive = triangle_strip
|
||||
Store 31 29
|
||||
34: 24(ptr) AccessChain 17(o) 18 18
|
||||
35: 7(fvec4) Load 34
|
||||
Store 33(ts.psIn.pos) 35
|
||||
Store 33(ts_psIn_pos) 35
|
||||
41: 30(ptr) AccessChain 17(o) 18 26
|
||||
42: 8(fvec2) Load 41
|
||||
44: 43(ptr) AccessChain 40(ts) 18 18
|
||||
|
||||
Reference in New Issue
Block a user