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:
@@ -64,7 +64,7 @@ output primitive = triangle_strip
|
||||
0:? Linker Objects
|
||||
0:? 'v' (layout(location=0 ) in 1-element array of uint)
|
||||
0:? 'OutputStream' (layout(location=0 ) out structure{temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
||||
0:? 'OutputStream.Pos' (out 4-component vector of float Position)
|
||||
0:? 'PerVertex_out' (out block{out 4-component vector of float Position OutputStream_Pos})
|
||||
|
||||
|
||||
Linked geometry stage:
|
||||
@@ -135,16 +135,16 @@ output primitive = triangle_strip
|
||||
0:? Linker Objects
|
||||
0:? 'v' (layout(location=0 ) in 1-element array of uint)
|
||||
0:? 'OutputStream' (layout(location=0 ) out structure{temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
||||
0:? 'OutputStream.Pos' (out 4-component vector of float Position)
|
||||
0:? 'PerVertex_out' (out block{out 4-component vector of float Position OutputStream_Pos})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 89
|
||||
// Id's are bound by 90
|
||||
|
||||
Capability Geometry
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Geometry 4 "main" 83 86 88
|
||||
EntryPoint Geometry 4 "main" 83 86 89
|
||||
ExecutionMode 4 InputPoints
|
||||
ExecutionMode 4 Invocations 1
|
||||
ExecutionMode 4 OutputTriangleStrip
|
||||
@@ -175,11 +175,14 @@ output primitive = triangle_strip
|
||||
MemberName 84(PSInput) 1 "TerrainPos"
|
||||
MemberName 84(PSInput) 2 "VertexID"
|
||||
Name 86 "OutputStream"
|
||||
Name 88 "OutputStream.Pos"
|
||||
Name 87 "PerVertex_out"
|
||||
MemberName 87(PerVertex_out) 0 "OutputStream_Pos"
|
||||
Name 89 "PerVertex_out"
|
||||
MemberDecorate 14(PSInput) 0 BuiltIn Position
|
||||
Decorate 83(v) Location 0
|
||||
Decorate 86(OutputStream) Location 0
|
||||
Decorate 88(OutputStream.Pos) BuiltIn Position
|
||||
MemberDecorate 87(PerVertex_out) 0 BuiltIn Position
|
||||
Decorate 87(PerVertex_out) Block
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -221,8 +224,9 @@ output primitive = triangle_strip
|
||||
84(PSInput): TypeStruct 8(fvec2) 9(fvec3) 10(int)
|
||||
85: TypePointer Output 84(PSInput)
|
||||
86(OutputStream): 85(ptr) Variable Output
|
||||
87: TypePointer Output 7(fvec4)
|
||||
88(OutputStream.Pos): 87(ptr) Variable Output
|
||||
87(PerVertex_out): TypeStruct 7(fvec4)
|
||||
88: TypePointer Output 87(PerVertex_out)
|
||||
89(PerVertex_out): 88(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
13(Out): 12(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user