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

@ -102,7 +102,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:
@ -211,17 +211,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 121
// Id's are bound by 124
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 97
EntryPoint Vertex 4 "main" 97 123
Name 4 "main"
Name 9 "txval20"
Name 12 "g_tTex2df4"
@ -248,6 +248,9 @@ Shader version: 450
Name 114 "g_tTex3df4"
Name 117 "g_tTex3di4"
Name 120 "g_tTex3du4"
Name 121 "PerVertex_out"
MemberName 121(PerVertex_out) 0 "Pos"
Name 123 "PerVertex_out"
Decorate 12(g_tTex2df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 16(g_sSamp) Binding 0
@ -267,6 +270,8 @@ Shader version: 450
Decorate 114(g_tTex3df4) DescriptorSet 0
Decorate 117(g_tTex3di4) DescriptorSet 0
Decorate 120(g_tTex3du4) DescriptorSet 0
MemberDecorate 121(PerVertex_out) 0 BuiltIn Position
Decorate 121(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -349,6 +354,9 @@ Shader version: 450
118: TypeImage 41(int) 3D sampled format:Unknown
119: TypePointer UniformConstant 118
120(g_tTex3du4): 119(ptr) Variable UniformConstant
121(PerVertex_out): TypeStruct 7(fvec4)
122: TypePointer Output 121(PerVertex_out)
123(PerVertex_out): 122(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(txval20): 8(ptr) Variable Function