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

@@ -239,7 +239,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:
@@ -485,17 +485,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 161
// Id's are bound by 164
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 156
EntryPoint Vertex 4 "main" 156 163
Name 4 "main"
Name 9 "txval10"
Name 12 "g_tTex1df4"
@@ -527,6 +527,9 @@ Shader version: 450
Name 150 "vsout"
Name 156 "Pos"
Name 160 "g_tTex1df4a"
Name 161 "PerVertex_out"
MemberName 161(PerVertex_out) 0 "Pos"
Name 163 "PerVertex_out"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@@ -545,6 +548,8 @@ Shader version: 450
Decorate 156(Pos) BuiltIn Position
Decorate 160(g_tTex1df4a) DescriptorSet 0
Decorate 160(g_tTex1df4a) Binding 1
MemberDecorate 161(PerVertex_out) 0 BuiltIn Position
Decorate 161(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -637,6 +642,9 @@ Shader version: 450
155: TypePointer Output 7(fvec4)
156(Pos): 155(ptr) Variable Output
160(g_tTex1df4a): 11(ptr) Variable UniformConstant
161(PerVertex_out): TypeStruct 7(fvec4)
162: TypePointer Output 161(PerVertex_out)
163(PerVertex_out): 162(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function