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:
steve-lunarg 2017-01-07 09:07:14 -07:00
parent 5d89d4d483
commit 46d5428422
16 changed files with 519 additions and 196 deletions

View file

@ -185,7 +185,7 @@ Shader version: 450
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
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:
@ -377,17 +377,17 @@ Shader version: 450
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
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 157
// Id's are bound by 160
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 152
EntryPoint Vertex 4 "main" 152 159
Name 4 "main"
Name 9 "txval10"
Name 12 "g_tTex1df4"
@ -419,6 +419,9 @@ Shader version: 450
Name 146 "vsout"
Name 152 "Pos"
Name 156 "g_tTex1df4a"
Name 157 "PerVertex_out"
MemberName 157(PerVertex_out) 0 "Pos"
Name 159 "PerVertex_out"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@ -437,6 +440,8 @@ Shader version: 450
Decorate 152(Pos) BuiltIn Position
Decorate 156(g_tTex1df4a) DescriptorSet 0
Decorate 156(g_tTex1df4a) Binding 1
MemberDecorate 157(PerVertex_out) 0 BuiltIn Position
Decorate 157(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -525,6 +530,9 @@ Shader version: 450
151: TypePointer Output 7(fvec4)
152(Pos): 151(ptr) Variable Output
156(g_tTex1df4a): 11(ptr) Variable UniformConstant
157(PerVertex_out): TypeStruct 7(fvec4)
158: TypePointer Output 157(PerVertex_out)
159(PerVertex_out): 158(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function