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:
@@ -49,7 +49,7 @@ output primitive = triangle_strip
|
||||
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:? '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:
|
||||
@@ -76,7 +76,7 @@ output primitive = triangle_strip
|
||||
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)
|
||||
0:? 'PerVertex_out' (out block{out 4-component vector of float Position outStream_position})
|
||||
|
||||
|
||||
Linked geometry stage:
|
||||
@@ -132,7 +132,7 @@ output primitive = triangle_strip
|
||||
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:? '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:
|
||||
@@ -159,16 +159,16 @@ output primitive = triangle_strip
|
||||
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)
|
||||
0:? 'PerVertex_out' (out block{out 4-component vector of float Position outStream_position})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 49
|
||||
// Id's are bound by 52
|
||||
|
||||
Capability Geometry
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Geometry 4 "main" 19 36 41
|
||||
EntryPoint Geometry 4 "main" 19 36 41 51
|
||||
ExecutionMode 4 InputLines
|
||||
ExecutionMode 4 Invocations 1
|
||||
ExecutionMode 4 OutputTriangleStrip
|
||||
@@ -184,14 +184,19 @@ output primitive = triangle_strip
|
||||
MemberName 14(VertexData) 1 "color"
|
||||
MemberName 14(VertexData) 2 "uv"
|
||||
Name 19 "vin"
|
||||
Name 36 "outStream.position"
|
||||
Name 36 "outStream_position"
|
||||
Name 39 "PS_IN"
|
||||
MemberName 39(PS_IN) 0 "color"
|
||||
MemberName 39(PS_IN) 1 "uv"
|
||||
Name 41 "outStream"
|
||||
Name 49 "PerVertex_out"
|
||||
MemberName 49(PerVertex_out) 0 "outStream_position"
|
||||
Name 51 "PerVertex_out"
|
||||
Decorate 19(vin) Location 0
|
||||
Decorate 36(outStream.position) BuiltIn Position
|
||||
Decorate 36(outStream_position) BuiltIn Position
|
||||
Decorate 41(outStream) Location 0
|
||||
MemberDecorate 49(PerVertex_out) 0 BuiltIn Position
|
||||
Decorate 49(PerVertex_out) Block
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -214,11 +219,14 @@ output primitive = triangle_strip
|
||||
29: TypePointer Function 8(fvec2)
|
||||
31: 12(int) Constant 0
|
||||
35: TypePointer Output 7(fvec4)
|
||||
36(outStream.position): 35(ptr) Variable Output
|
||||
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)
|
||||
49(PerVertex_out): TypeStruct 7(fvec4)
|
||||
50: TypePointer Output 49(PerVertex_out)
|
||||
51(PerVertex_out): 50(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
11(vout): 10(ptr) Variable Function
|
||||
@@ -236,7 +244,7 @@ output primitive = triangle_strip
|
||||
Store 34 33
|
||||
37: 23(ptr) AccessChain 11(vout) 31
|
||||
38: 7(fvec4) Load 37
|
||||
Store 36(outStream.position) 38
|
||||
Store 36(outStream_position) 38
|
||||
42: 23(ptr) AccessChain 11(vout) 13
|
||||
43: 7(fvec4) Load 42
|
||||
44: 35(ptr) AccessChain 41(outStream) 31
|
||||
|
||||
Reference in New Issue
Block a user