SPV: Add recursive distrubition of 'location' across structure members.
This commit is contained in:
@@ -7,12 +7,12 @@ Linked vertex stage:
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 63
|
||||
// Id's are bound by 69
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 12 23 34 44 45 61 62
|
||||
EntryPoint Vertex 4 "main" 12 23 34 44 45 65 67 68
|
||||
Source GLSL 430
|
||||
Name 4 "main"
|
||||
Name 10 "gl_PerVertex"
|
||||
@@ -33,8 +33,17 @@ Linked vertex stage:
|
||||
Name 55 "sampb1"
|
||||
Name 58 "sampb2"
|
||||
Name 59 "sampb4"
|
||||
Name 61 "gl_VertexID"
|
||||
Name 62 "gl_InstanceID"
|
||||
Name 62 "S"
|
||||
MemberName 62(S) 0 "a"
|
||||
MemberName 62(S) 1 "b"
|
||||
MemberName 62(S) 2 "c"
|
||||
Name 63 "SS"
|
||||
MemberName 63(SS) 0 "b"
|
||||
MemberName 63(SS) 1 "s"
|
||||
MemberName 63(SS) 2 "c"
|
||||
Name 65 "var"
|
||||
Name 67 "gl_VertexID"
|
||||
Name 68 "gl_InstanceID"
|
||||
MemberDecorate 10(gl_PerVertex) 0 BuiltIn ClipDistance
|
||||
Decorate 10(gl_PerVertex) Block
|
||||
Decorate 34(badorder3) Flat
|
||||
@@ -49,8 +58,20 @@ Linked vertex stage:
|
||||
Decorate 55(sampb1) Binding 4
|
||||
Decorate 58(sampb2) Binding 5
|
||||
Decorate 59(sampb4) Binding 31
|
||||
Decorate 61(gl_VertexID) BuiltIn VertexId
|
||||
Decorate 62(gl_InstanceID) BuiltIn InstanceId
|
||||
MemberDecorate 62(S) 0 Flat
|
||||
MemberDecorate 62(S) 0 Location 1
|
||||
MemberDecorate 62(S) 1 Flat
|
||||
MemberDecorate 62(S) 1 Location 2
|
||||
MemberDecorate 62(S) 2 Flat
|
||||
MemberDecorate 62(S) 2 Location 3
|
||||
MemberDecorate 63(SS) 0 Flat
|
||||
MemberDecorate 63(SS) 0 Location 0
|
||||
MemberDecorate 63(SS) 1 Flat
|
||||
MemberDecorate 63(SS) 1 Location 1
|
||||
MemberDecorate 63(SS) 2 Flat
|
||||
MemberDecorate 63(SS) 2 Location 4
|
||||
Decorate 67(gl_VertexID) BuiltIn VertexId
|
||||
Decorate 68(gl_InstanceID) BuiltIn InstanceId
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -97,9 +118,15 @@ Linked vertex stage:
|
||||
57: TypePointer UniformConstant 56
|
||||
58(sampb2): 57(ptr) Variable UniformConstant
|
||||
59(sampb4): 54(ptr) Variable UniformConstant
|
||||
60: TypePointer Input 13(int)
|
||||
61(gl_VertexID): 60(ptr) Variable Input
|
||||
62(gl_InstanceID): 60(ptr) Variable Input
|
||||
60: TypeVector 7(int) 2
|
||||
61: TypeVector 6(float) 3
|
||||
62(S): TypeStruct 6(float) 60(ivec2) 61(fvec3)
|
||||
63(SS): TypeStruct 19(fvec4) 62(S) 19(fvec4)
|
||||
64: TypePointer Output 63(SS)
|
||||
65(var): 64(ptr) Variable Output
|
||||
66: TypePointer Input 13(int)
|
||||
67(gl_VertexID): 66(ptr) Variable Input
|
||||
68(gl_InstanceID): 66(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
18: 17(ptr) AccessChain 12 14 15
|
||||
|
||||
@@ -30,3 +30,7 @@ layout(binding = 7) uniform anonblock { int aoeu; } ;
|
||||
layout(binding = 4) uniform sampler2D sampb1;
|
||||
layout(binding = 5) uniform sampler2D sampb2[10];
|
||||
layout(binding = 31) uniform sampler2D sampb4;
|
||||
|
||||
struct S { mediump float a; highp uvec2 b; highp vec3 c; };
|
||||
struct SS { vec4 b; S s; vec4 c; };
|
||||
layout(location = 0) flat out SS var;
|
||||
|
||||
Reference in New Issue
Block a user