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:
parent
5d89d4d483
commit
46d5428422
16 changed files with 519 additions and 196 deletions
|
|
@ -218,7 +218,7 @@ Shader version: 450
|
|||
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
|
||||
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
|
||||
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||
0:? 'Pos' (out 4-component vector of float Position)
|
||||
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
|
@ -443,18 +443,18 @@ Shader version: 450
|
|||
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
|
||||
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
|
||||
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||
0:? 'Pos' (out 4-component vector of float Position)
|
||||
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 166
|
||||
// Id's are bound by 169
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 123
|
||||
EntryPoint Vertex 4 "main" 123 168
|
||||
Name 4 "main"
|
||||
Name 9 "g_tTex1df4"
|
||||
Name 15 "$Global"
|
||||
|
|
@ -492,6 +492,9 @@ Shader version: 450
|
|||
Name 159 "g_tTexcdf4a"
|
||||
Name 162 "g_tTexcdi4a"
|
||||
Name 165 "g_tTexcdu4a"
|
||||
Name 166 "PerVertex_out"
|
||||
MemberName 166(PerVertex_out) 0 "Pos"
|
||||
Name 168 "PerVertex_out"
|
||||
Decorate 9(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 9(g_tTex1df4) Binding 0
|
||||
MemberDecorate 15($Global) 0 Offset 0
|
||||
|
|
@ -527,6 +530,8 @@ Shader version: 450
|
|||
Decorate 159(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 162(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 165(g_tTexcdu4a) DescriptorSet 0
|
||||
MemberDecorate 166(PerVertex_out) 0 BuiltIn Position
|
||||
Decorate 166(PerVertex_out) Block
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -624,6 +629,9 @@ Shader version: 450
|
|||
163: TypeImage 19(int) Cube array sampled format:Unknown
|
||||
164: TypePointer UniformConstant 163
|
||||
165(g_tTexcdu4a): 164(ptr) Variable UniformConstant
|
||||
166(PerVertex_out): TypeStruct 27(fvec4)
|
||||
167: TypePointer Output 166(PerVertex_out)
|
||||
168(PerVertex_out): 167(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
116(vsout): 115(ptr) Variable Function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue