Fix issue with separable shader validation in iomapper

This commit is contained in:
Kevin McCullough 2021-10-13 15:32:38 -07:00
parent b9ba4c5743
commit cbab732905
15 changed files with 1350 additions and 2 deletions

View File

@ -0,0 +1,413 @@
iomap.blockOutVariableIn.2.vert
Shader version: 440
0:? Sequence
0:9 Function Definition: main( ( global void)
0:9 Function Parameters:
0:11 Sequence
0:11 move second child to first child ( temp 4-component vector of float)
0:11 a1: direct index for structure ( out 4-component vector of float)
0:11 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:11 Constant:
0:11 0 (const uint)
0:11 Constant:
0:11 1.000000
0:11 1.000000
0:11 1.000000
0:11 1.000000
0:12 move second child to first child ( temp 2-component vector of float)
0:12 a2: direct index for structure ( out 2-component vector of float)
0:12 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:12 Constant:
0:12 1 (const uint)
0:12 Constant:
0:12 0.500000
0:12 0.500000
0:13 move second child to first child ( temp 4-component vector of float)
0:13 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:13 'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:13 Constant:
0:13 0 (const uint)
0:13 Constant:
0:13 1.000000
0:13 1.000000
0:13 1.000000
0:13 1.000000
0:? Linker Objects
0:? 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:? 'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
iomap.blockOutVariableIn.geom
Shader version: 440
invocations = -1
max_vertices = 3
input primitive = triangles
output primitive = triangle_strip
0:? Sequence
0:12 Function Definition: main( ( global void)
0:12 Function Parameters:
0:14 Sequence
0:14 move second child to first child ( temp 4-component vector of float)
0:14 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:14 direct index (layout( location=0) temp 4-component vector of float)
0:14 'in_a1' (layout( location=0) in 3-element array of 4-component vector of float)
0:14 Constant:
0:14 0 (const int)
0:15 move second child to first child ( temp 2-component vector of float)
0:15 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:15 direct index (layout( location=1) temp 2-component vector of float)
0:15 'in_a2' (layout( location=1) in 3-element array of 2-component vector of float)
0:15 Constant:
0:15 0 (const int)
0:16 move second child to first child ( temp 4-component vector of float)
0:16 gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
0:16 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:16 Constant:
0:16 0 (const uint)
0:16 Constant:
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:17 EmitVertex ( global void)
0:19 move second child to first child ( temp 4-component vector of float)
0:19 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:19 direct index (layout( location=0) temp 4-component vector of float)
0:19 'in_a1' (layout( location=0) in 3-element array of 4-component vector of float)
0:19 Constant:
0:19 1 (const int)
0:20 move second child to first child ( temp 2-component vector of float)
0:20 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:20 direct index (layout( location=1) temp 2-component vector of float)
0:20 'in_a2' (layout( location=1) in 3-element array of 2-component vector of float)
0:20 Constant:
0:20 1 (const int)
0:21 move second child to first child ( temp 4-component vector of float)
0:21 gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
0:21 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:21 Constant:
0:21 0 (const uint)
0:21 Constant:
0:21 1.000000
0:21 1.000000
0:21 1.000000
0:21 1.000000
0:22 EmitVertex ( global void)
0:24 move second child to first child ( temp 4-component vector of float)
0:24 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:24 direct index (layout( location=0) temp 4-component vector of float)
0:24 'in_a1' (layout( location=0) in 3-element array of 4-component vector of float)
0:24 Constant:
0:24 2 (const int)
0:25 move second child to first child ( temp 2-component vector of float)
0:25 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:25 direct index (layout( location=1) temp 2-component vector of float)
0:25 'in_a2' (layout( location=1) in 3-element array of 2-component vector of float)
0:25 Constant:
0:25 2 (const int)
0:26 move second child to first child ( temp 4-component vector of float)
0:26 gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
0:26 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:26 Constant:
0:26 0 (const uint)
0:26 Constant:
0:26 1.000000
0:26 1.000000
0:26 1.000000
0:26 1.000000
0:27 EmitVertex ( global void)
0:? Linker Objects
0:? 'in_a1' (layout( location=0) in 3-element array of 4-component vector of float)
0:? 'in_a2' (layout( location=1) in 3-element array of 2-component vector of float)
0:? 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:? 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance})
Linked vertex stage:
Linked geometry stage:
Shader version: 440
0:? Sequence
0:9 Function Definition: main( ( global void)
0:9 Function Parameters:
0:11 Sequence
0:11 move second child to first child ( temp 4-component vector of float)
0:11 a1: direct index for structure ( out 4-component vector of float)
0:11 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:11 Constant:
0:11 0 (const uint)
0:11 Constant:
0:11 1.000000
0:11 1.000000
0:11 1.000000
0:11 1.000000
0:12 move second child to first child ( temp 2-component vector of float)
0:12 a2: direct index for structure ( out 2-component vector of float)
0:12 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:12 Constant:
0:12 1 (const uint)
0:12 Constant:
0:12 0.500000
0:12 0.500000
0:13 move second child to first child ( temp 4-component vector of float)
0:13 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:13 'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:13 Constant:
0:13 0 (const uint)
0:13 Constant:
0:13 1.000000
0:13 1.000000
0:13 1.000000
0:13 1.000000
0:? Linker Objects
0:? 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:? 'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Shader version: 440
invocations = 1
max_vertices = 3
input primitive = triangles
output primitive = triangle_strip
0:? Sequence
0:12 Function Definition: main( ( global void)
0:12 Function Parameters:
0:14 Sequence
0:14 move second child to first child ( temp 4-component vector of float)
0:14 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:14 direct index (layout( location=0) temp 4-component vector of float)
0:14 'in_a1' (layout( location=0) in 3-element array of 4-component vector of float)
0:14 Constant:
0:14 0 (const int)
0:15 move second child to first child ( temp 2-component vector of float)
0:15 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:15 direct index (layout( location=1) temp 2-component vector of float)
0:15 'in_a2' (layout( location=1) in 3-element array of 2-component vector of float)
0:15 Constant:
0:15 0 (const int)
0:16 move second child to first child ( temp 4-component vector of float)
0:16 gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
0:16 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance})
0:16 Constant:
0:16 0 (const uint)
0:16 Constant:
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:17 EmitVertex ( global void)
0:19 move second child to first child ( temp 4-component vector of float)
0:19 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:19 direct index (layout( location=0) temp 4-component vector of float)
0:19 'in_a1' (layout( location=0) in 3-element array of 4-component vector of float)
0:19 Constant:
0:19 1 (const int)
0:20 move second child to first child ( temp 2-component vector of float)
0:20 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:20 direct index (layout( location=1) temp 2-component vector of float)
0:20 'in_a2' (layout( location=1) in 3-element array of 2-component vector of float)
0:20 Constant:
0:20 1 (const int)
0:21 move second child to first child ( temp 4-component vector of float)
0:21 gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
0:21 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance})
0:21 Constant:
0:21 0 (const uint)
0:21 Constant:
0:21 1.000000
0:21 1.000000
0:21 1.000000
0:21 1.000000
0:22 EmitVertex ( global void)
0:24 move second child to first child ( temp 4-component vector of float)
0:24 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:24 direct index (layout( location=0) temp 4-component vector of float)
0:24 'in_a1' (layout( location=0) in 3-element array of 4-component vector of float)
0:24 Constant:
0:24 2 (const int)
0:25 move second child to first child ( temp 2-component vector of float)
0:25 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:25 direct index (layout( location=1) temp 2-component vector of float)
0:25 'in_a2' (layout( location=1) in 3-element array of 2-component vector of float)
0:25 Constant:
0:25 2 (const int)
0:26 move second child to first child ( temp 4-component vector of float)
0:26 gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
0:26 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance})
0:26 Constant:
0:26 0 (const uint)
0:26 Constant:
0:26 1.000000
0:26 1.000000
0:26 1.000000
0:26 1.000000
0:27 EmitVertex ( global void)
0:? Linker Objects
0:? 'in_a1' (layout( location=0) in 3-element array of 4-component vector of float)
0:? 'in_a2' (layout( location=1) in 3-element array of 2-component vector of float)
0:? 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:? 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance})
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 33
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 11 28 31 32
Source GLSL 440
Name 4 "main"
Name 9 "Block"
MemberName 9(Block) 0 "a1"
MemberName 9(Block) 1 "a2"
Name 11 ""
Name 26 "gl_PerVertex"
MemberName 26(gl_PerVertex) 0 "gl_Position"
MemberName 26(gl_PerVertex) 1 "gl_PointSize"
MemberName 26(gl_PerVertex) 2 "gl_ClipDistance"
Name 28 ""
Name 31 "gl_VertexID"
Name 32 "gl_InstanceID"
Decorate 9(Block) Block
Decorate 11 Location 0
MemberDecorate 26(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 26(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 26(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 26(gl_PerVertex) Block
Decorate 31(gl_VertexID) BuiltIn VertexId
Decorate 32(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeVector 6(float) 2
9(Block): TypeStruct 7(fvec4) 8(fvec2)
10: TypePointer Output 9(Block)
11: 10(ptr) Variable Output
12: TypeInt 32 1
13: 12(int) Constant 0
14: 6(float) Constant 1065353216
15: 7(fvec4) ConstantComposite 14 14 14 14
16: TypePointer Output 7(fvec4)
18: 12(int) Constant 1
19: 6(float) Constant 1056964608
20: 8(fvec2) ConstantComposite 19 19
21: TypePointer Output 8(fvec2)
23: TypeInt 32 0
24: 23(int) Constant 1
25: TypeArray 6(float) 24
26(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 25
27: TypePointer Output 26(gl_PerVertex)
28: 27(ptr) Variable Output
30: TypePointer Input 12(int)
31(gl_VertexID): 30(ptr) Variable Input
32(gl_InstanceID): 30(ptr) Variable Input
4(main): 2 Function None 3
5: Label
17: 16(ptr) AccessChain 11 13
Store 17 15
22: 21(ptr) AccessChain 11 18
Store 22 20
29: 16(ptr) AccessChain 28 13
Store 29 15
Return
FunctionEnd
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 49
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 9 14 22 25 33
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 3
Source GLSL 440
Name 4 "main"
Name 9 "a1"
Name 14 "in_a1"
Name 22 "a2"
Name 25 "in_a2"
Name 31 "gl_PerVertex"
MemberName 31(gl_PerVertex) 0 "gl_Position"
MemberName 31(gl_PerVertex) 1 "gl_PointSize"
MemberName 31(gl_PerVertex) 2 "gl_ClipDistance"
Name 33 ""
Decorate 9(a1) Location 0
Decorate 14(in_a1) Location 0
Decorate 22(a2) Location 1
Decorate 25(in_a2) Location 1
MemberDecorate 31(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 31(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 31(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 31(gl_PerVertex) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(a1): 8(ptr) Variable Output
10: TypeInt 32 0
11: 10(int) Constant 3
12: TypeArray 7(fvec4) 11
13: TypePointer Input 12
14(in_a1): 13(ptr) Variable Input
15: TypeInt 32 1
16: 15(int) Constant 0
17: TypePointer Input 7(fvec4)
20: TypeVector 6(float) 2
21: TypePointer Output 20(fvec2)
22(a2): 21(ptr) Variable Output
23: TypeArray 20(fvec2) 11
24: TypePointer Input 23
25(in_a2): 24(ptr) Variable Input
26: TypePointer Input 20(fvec2)
29: 10(int) Constant 1
30: TypeArray 6(float) 29
31(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 30
32: TypePointer Output 31(gl_PerVertex)
33: 32(ptr) Variable Output
34: 6(float) Constant 1065353216
35: 7(fvec4) ConstantComposite 34 34 34 34
37: 15(int) Constant 1
43: 15(int) Constant 2
4(main): 2 Function None 3
5: Label
18: 17(ptr) AccessChain 14(in_a1) 16
19: 7(fvec4) Load 18
Store 9(a1) 19
27: 26(ptr) AccessChain 25(in_a2) 16
28: 20(fvec2) Load 27
Store 22(a2) 28
36: 8(ptr) AccessChain 33 16
Store 36 35
EmitVertex
38: 17(ptr) AccessChain 14(in_a1) 37
39: 7(fvec4) Load 38
Store 9(a1) 39
40: 26(ptr) AccessChain 25(in_a2) 37
41: 20(fvec2) Load 40
Store 22(a2) 41
42: 8(ptr) AccessChain 33 16
Store 42 35
EmitVertex
44: 17(ptr) AccessChain 14(in_a1) 43
45: 7(fvec4) Load 44
Store 9(a1) 45
46: 26(ptr) AccessChain 25(in_a2) 43
47: 20(fvec2) Load 46
Store 22(a2) 47
48: 8(ptr) AccessChain 33 16
Store 48 35
EmitVertex
Return
FunctionEnd

View File

@ -0,0 +1,234 @@
iomap.blockOutVariableIn.vert
Shader version: 440
0:? Sequence
0:9 Function Definition: main( ( global void)
0:9 Function Parameters:
0:11 Sequence
0:11 move second child to first child ( temp 4-component vector of float)
0:11 a1: direct index for structure ( out 4-component vector of float)
0:11 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:11 Constant:
0:11 0 (const uint)
0:11 Constant:
0:11 1.000000
0:11 1.000000
0:11 1.000000
0:11 1.000000
0:12 move second child to first child ( temp 2-component vector of float)
0:12 a2: direct index for structure ( out 2-component vector of float)
0:12 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:12 Constant:
0:12 1 (const uint)
0:12 Constant:
0:12 0.500000
0:12 0.500000
0:13 move second child to first child ( temp 4-component vector of float)
0:13 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:13 'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:13 Constant:
0:13 0 (const uint)
0:13 Constant:
0:13 1.000000
0:13 1.000000
0:13 1.000000
0:13 1.000000
0:? Linker Objects
0:? 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:? 'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
iomap.blockOutVariableIn.frag
Shader version: 440
0:? Sequence
0:8 Function Definition: main( ( global void)
0:8 Function Parameters:
0:10 Sequence
0:10 move second child to first child ( temp 4-component vector of float)
0:10 'color' (layout( location=0) out 4-component vector of float)
0:10 Construct vec4 ( temp 4-component vector of float)
0:10 vector swizzle ( temp 2-component vector of float)
0:10 'a1' (layout( location=0) smooth in 4-component vector of float)
0:10 Sequence
0:10 Constant:
0:10 0 (const int)
0:10 Constant:
0:10 1 (const int)
0:10 'a2' (layout( location=1) smooth in 2-component vector of float)
0:? Linker Objects
0:? 'a1' (layout( location=0) smooth in 4-component vector of float)
0:? 'a2' (layout( location=1) smooth in 2-component vector of float)
0:? 'color' (layout( location=0) out 4-component vector of float)
Linked vertex stage:
Linked fragment stage:
Shader version: 440
0:? Sequence
0:9 Function Definition: main( ( global void)
0:9 Function Parameters:
0:11 Sequence
0:11 move second child to first child ( temp 4-component vector of float)
0:11 a1: direct index for structure ( out 4-component vector of float)
0:11 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:11 Constant:
0:11 0 (const uint)
0:11 Constant:
0:11 1.000000
0:11 1.000000
0:11 1.000000
0:11 1.000000
0:12 move second child to first child ( temp 2-component vector of float)
0:12 a2: direct index for structure ( out 2-component vector of float)
0:12 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:12 Constant:
0:12 1 (const uint)
0:12 Constant:
0:12 0.500000
0:12 0.500000
0:13 move second child to first child ( temp 4-component vector of float)
0:13 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:13 'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:13 Constant:
0:13 0 (const uint)
0:13 Constant:
0:13 1.000000
0:13 1.000000
0:13 1.000000
0:13 1.000000
0:? Linker Objects
0:? 'anon@0' (layout( location=0) out block{ out 4-component vector of float a1, out 2-component vector of float a2})
0:? 'anon@1' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Shader version: 440
0:? Sequence
0:8 Function Definition: main( ( global void)
0:8 Function Parameters:
0:10 Sequence
0:10 move second child to first child ( temp 4-component vector of float)
0:10 'color' (layout( location=0) out 4-component vector of float)
0:10 Construct vec4 ( temp 4-component vector of float)
0:10 vector swizzle ( temp 2-component vector of float)
0:10 'a1' (layout( location=0) smooth in 4-component vector of float)
0:10 Sequence
0:10 Constant:
0:10 0 (const int)
0:10 Constant:
0:10 1 (const int)
0:10 'a2' (layout( location=1) smooth in 2-component vector of float)
0:? Linker Objects
0:? 'a1' (layout( location=0) smooth in 4-component vector of float)
0:? 'a2' (layout( location=1) smooth in 2-component vector of float)
0:? 'color' (layout( location=0) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 33
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 11 28 31 32
Source GLSL 440
Name 4 "main"
Name 9 "Block"
MemberName 9(Block) 0 "a1"
MemberName 9(Block) 1 "a2"
Name 11 ""
Name 26 "gl_PerVertex"
MemberName 26(gl_PerVertex) 0 "gl_Position"
MemberName 26(gl_PerVertex) 1 "gl_PointSize"
MemberName 26(gl_PerVertex) 2 "gl_ClipDistance"
Name 28 ""
Name 31 "gl_VertexID"
Name 32 "gl_InstanceID"
Decorate 9(Block) Block
Decorate 11 Location 0
MemberDecorate 26(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 26(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 26(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 26(gl_PerVertex) Block
Decorate 31(gl_VertexID) BuiltIn VertexId
Decorate 32(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeVector 6(float) 2
9(Block): TypeStruct 7(fvec4) 8(fvec2)
10: TypePointer Output 9(Block)
11: 10(ptr) Variable Output
12: TypeInt 32 1
13: 12(int) Constant 0
14: 6(float) Constant 1065353216
15: 7(fvec4) ConstantComposite 14 14 14 14
16: TypePointer Output 7(fvec4)
18: 12(int) Constant 1
19: 6(float) Constant 1056964608
20: 8(fvec2) ConstantComposite 19 19
21: TypePointer Output 8(fvec2)
23: TypeInt 32 0
24: 23(int) Constant 1
25: TypeArray 6(float) 24
26(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 25
27: TypePointer Output 26(gl_PerVertex)
28: 27(ptr) Variable Output
30: TypePointer Input 12(int)
31(gl_VertexID): 30(ptr) Variable Input
32(gl_InstanceID): 30(ptr) Variable Input
4(main): 2 Function None 3
5: Label
17: 16(ptr) AccessChain 11 13
Store 17 15
22: 21(ptr) AccessChain 11 18
Store 22 20
29: 16(ptr) AccessChain 28 13
Store 29 15
Return
FunctionEnd
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 23
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 9 11 16
ExecutionMode 4 OriginLowerLeft
Source GLSL 440
Name 4 "main"
Name 9 "color"
Name 11 "a1"
Name 16 "a2"
Decorate 9(color) Location 0
Decorate 11(a1) Location 0
Decorate 16(a2) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(color): 8(ptr) Variable Output
10: TypePointer Input 7(fvec4)
11(a1): 10(ptr) Variable Input
12: TypeVector 6(float) 2
15: TypePointer Input 12(fvec2)
16(a2): 15(ptr) Variable Input
4(main): 2 Function None 3
5: Label
13: 7(fvec4) Load 11(a1)
14: 12(fvec2) VectorShuffle 13 13 0 1
17: 12(fvec2) Load 16(a2)
18: 6(float) CompositeExtract 14 0
19: 6(float) CompositeExtract 14 1
20: 6(float) CompositeExtract 17 0
21: 6(float) CompositeExtract 17 1
22: 7(fvec4) CompositeConstruct 18 19 20 21
Store 9(color) 22
Return
FunctionEnd

View File

@ -0,0 +1,276 @@
iomap.variableOutBlockIn.2.vert
Shader version: 440
0:? Sequence
0:6 Function Definition: main( ( global void)
0:6 Function Parameters:
0:8 Sequence
0:8 move second child to first child ( temp 4-component vector of float)
0:8 'a1' (layout( location=0) smooth out 4-component vector of float)
0:8 Constant:
0:8 1.000000
0:8 1.000000
0:8 1.000000
0:8 1.000000
0:9 move second child to first child ( temp 2-component vector of float)
0:9 'a2' (layout( location=1) smooth out 2-component vector of float)
0:9 Constant:
0:9 0.500000
0:9 0.500000
0:10 move second child to first child ( temp 4-component vector of float)
0:10 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:10 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:10 Constant:
0:10 0 (const uint)
0:10 Constant:
0:10 1.000000
0:10 1.000000
0:10 1.000000
0:10 1.000000
0:? Linker Objects
0:? 'a1' (layout( location=0) smooth out 4-component vector of float)
0:? 'a2' (layout( location=1) smooth out 2-component vector of float)
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
iomap.variableOutBlockIn.geom
Shader version: 440
invocations = -1
max_vertices = 3
input primitive = triangles
output primitive = triangle_strip
0:? Sequence
0:14 Function Definition: main( ( global void)
0:14 Function Parameters:
0:16 Sequence
0:16 move second child to first child ( temp 4-component vector of float)
0:16 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:16 Constant:
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:17 move second child to first child ( temp 2-component vector of float)
0:17 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:17 Constant:
0:17 0.500000
0:17 0.500000
0:18 move second child to first child ( temp 4-component vector of float)
0:18 gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
0:18 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:18 Constant:
0:18 0 (const uint)
0:18 Constant:
0:18 1.000000
0:18 1.000000
0:18 1.000000
0:18 1.000000
0:? Linker Objects
0:? 'gin' (layout( location=0) in 3-element array of block{ in 4-component vector of float a1, in 2-component vector of float a2})
0:? 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:? 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 1-element array of float ClipDistance gl_ClipDistance})
Linked vertex stage:
Linked geometry stage:
Shader version: 440
0:? Sequence
0:6 Function Definition: main( ( global void)
0:6 Function Parameters:
0:8 Sequence
0:8 move second child to first child ( temp 4-component vector of float)
0:8 'a1' (layout( location=0) smooth out 4-component vector of float)
0:8 Constant:
0:8 1.000000
0:8 1.000000
0:8 1.000000
0:8 1.000000
0:9 move second child to first child ( temp 2-component vector of float)
0:9 'a2' (layout( location=1) smooth out 2-component vector of float)
0:9 Constant:
0:9 0.500000
0:9 0.500000
0:10 move second child to first child ( temp 4-component vector of float)
0:10 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:10 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:10 Constant:
0:10 0 (const uint)
0:10 Constant:
0:10 1.000000
0:10 1.000000
0:10 1.000000
0:10 1.000000
0:? Linker Objects
0:? 'a1' (layout( location=0) smooth out 4-component vector of float)
0:? 'a2' (layout( location=1) smooth out 2-component vector of float)
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Shader version: 440
invocations = 1
max_vertices = 3
input primitive = triangles
output primitive = triangle_strip
0:? Sequence
0:14 Function Definition: main( ( global void)
0:14 Function Parameters:
0:16 Sequence
0:16 move second child to first child ( temp 4-component vector of float)
0:16 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:16 Constant:
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:16 1.000000
0:17 move second child to first child ( temp 2-component vector of float)
0:17 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:17 Constant:
0:17 0.500000
0:17 0.500000
0:18 move second child to first child ( temp 4-component vector of float)
0:18 gl_Position: direct index for structure (layout( stream=0) gl_Position 4-component vector of float Position)
0:18 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance})
0:18 Constant:
0:18 0 (const uint)
0:18 Constant:
0:18 1.000000
0:18 1.000000
0:18 1.000000
0:18 1.000000
0:? Linker Objects
0:? 'gin' (layout( location=0) in 3-element array of block{ in 4-component vector of float a1, in 2-component vector of float a2})
0:? 'a1' (layout( location=0 stream=0) out 4-component vector of float)
0:? 'a2' (layout( location=1 stream=0) out 2-component vector of float)
0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance})
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 29
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 9 14 22 27 28
Source GLSL 440
Name 4 "main"
Name 9 "a1"
Name 14 "a2"
Name 20 "gl_PerVertex"
MemberName 20(gl_PerVertex) 0 "gl_Position"
MemberName 20(gl_PerVertex) 1 "gl_PointSize"
MemberName 20(gl_PerVertex) 2 "gl_ClipDistance"
Name 22 ""
Name 27 "gl_VertexID"
Name 28 "gl_InstanceID"
Decorate 9(a1) Location 0
Decorate 14(a2) Location 1
MemberDecorate 20(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 20(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 20(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 20(gl_PerVertex) Block
Decorate 27(gl_VertexID) BuiltIn VertexId
Decorate 28(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(a1): 8(ptr) Variable Output
10: 6(float) Constant 1065353216
11: 7(fvec4) ConstantComposite 10 10 10 10
12: TypeVector 6(float) 2
13: TypePointer Output 12(fvec2)
14(a2): 13(ptr) Variable Output
15: 6(float) Constant 1056964608
16: 12(fvec2) ConstantComposite 15 15
17: TypeInt 32 0
18: 17(int) Constant 1
19: TypeArray 6(float) 18
20(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 19
21: TypePointer Output 20(gl_PerVertex)
22: 21(ptr) Variable Output
23: TypeInt 32 1
24: 23(int) Constant 0
26: TypePointer Input 23(int)
27(gl_VertexID): 26(ptr) Variable Input
28(gl_InstanceID): 26(ptr) Variable Input
4(main): 2 Function None 3
5: Label
Store 9(a1) 11
Store 14(a2) 16
25: 8(ptr) AccessChain 22 24
Store 25 11
Return
FunctionEnd
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 31
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 9 14 22 30
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 3
Source GLSL 440
Name 4 "main"
Name 9 "a1"
Name 14 "a2"
Name 20 "gl_PerVertex"
MemberName 20(gl_PerVertex) 0 "gl_Position"
MemberName 20(gl_PerVertex) 1 "gl_PointSize"
MemberName 20(gl_PerVertex) 2 "gl_ClipDistance"
Name 22 ""
Name 26 "Inputs"
MemberName 26(Inputs) 0 "a1"
MemberName 26(Inputs) 1 "a2"
Name 30 "gin"
Decorate 9(a1) Location 0
Decorate 14(a2) Location 1
MemberDecorate 20(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 20(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 20(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 20(gl_PerVertex) Block
Decorate 26(Inputs) Block
Decorate 30(gin) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(a1): 8(ptr) Variable Output
10: 6(float) Constant 1065353216
11: 7(fvec4) ConstantComposite 10 10 10 10
12: TypeVector 6(float) 2
13: TypePointer Output 12(fvec2)
14(a2): 13(ptr) Variable Output
15: 6(float) Constant 1056964608
16: 12(fvec2) ConstantComposite 15 15
17: TypeInt 32 0
18: 17(int) Constant 1
19: TypeArray 6(float) 18
20(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 19
21: TypePointer Output 20(gl_PerVertex)
22: 21(ptr) Variable Output
23: TypeInt 32 1
24: 23(int) Constant 0
26(Inputs): TypeStruct 7(fvec4) 12(fvec2)
27: 17(int) Constant 3
28: TypeArray 26(Inputs) 27
29: TypePointer Input 28
30(gin): 29(ptr) Variable Input
4(main): 2 Function None 3
5: Label
Store 9(a1) 11
Store 14(a2) 16
25: 8(ptr) AccessChain 22 24
Store 25 11
Return
FunctionEnd

View File

@ -0,0 +1,236 @@
iomap.variableOutBlockIn.vert
Shader version: 440
0:? Sequence
0:6 Function Definition: main( ( global void)
0:6 Function Parameters:
0:8 Sequence
0:8 move second child to first child ( temp 4-component vector of float)
0:8 'a1' (layout( location=0) smooth out 4-component vector of float)
0:8 Constant:
0:8 1.000000
0:8 1.000000
0:8 1.000000
0:8 1.000000
0:9 move second child to first child ( temp 2-component vector of float)
0:9 'a2' (layout( location=1) smooth out 2-component vector of float)
0:9 Constant:
0:9 0.500000
0:9 0.500000
0:10 move second child to first child ( temp 4-component vector of float)
0:10 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:10 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:10 Constant:
0:10 0 (const uint)
0:10 Constant:
0:10 1.000000
0:10 1.000000
0:10 1.000000
0:10 1.000000
0:? Linker Objects
0:? 'a1' (layout( location=0) smooth out 4-component vector of float)
0:? 'a2' (layout( location=1) smooth out 2-component vector of float)
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
iomap.variableOutBlockIn.frag
Shader version: 440
0:? Sequence
0:10 Function Definition: main( ( global void)
0:10 Function Parameters:
0:12 Sequence
0:12 move second child to first child ( temp 4-component vector of float)
0:12 'color' (layout( location=0) out 4-component vector of float)
0:12 Construct vec4 ( temp 4-component vector of float)
0:12 vector swizzle ( temp 2-component vector of float)
0:12 a1: direct index for structure ( in 4-component vector of float)
0:12 'anon@0' (layout( location=0) in block{ in 4-component vector of float a1, in 2-component vector of float a2})
0:12 Constant:
0:12 0 (const uint)
0:12 Sequence
0:12 Constant:
0:12 0 (const int)
0:12 Constant:
0:12 1 (const int)
0:12 a2: direct index for structure ( in 2-component vector of float)
0:12 'anon@0' (layout( location=0) in block{ in 4-component vector of float a1, in 2-component vector of float a2})
0:12 Constant:
0:12 1 (const uint)
0:? Linker Objects
0:? 'anon@0' (layout( location=0) in block{ in 4-component vector of float a1, in 2-component vector of float a2})
0:? 'color' (layout( location=0) out 4-component vector of float)
Linked vertex stage:
Linked fragment stage:
Shader version: 440
0:? Sequence
0:6 Function Definition: main( ( global void)
0:6 Function Parameters:
0:8 Sequence
0:8 move second child to first child ( temp 4-component vector of float)
0:8 'a1' (layout( location=0) smooth out 4-component vector of float)
0:8 Constant:
0:8 1.000000
0:8 1.000000
0:8 1.000000
0:8 1.000000
0:9 move second child to first child ( temp 2-component vector of float)
0:9 'a2' (layout( location=1) smooth out 2-component vector of float)
0:9 Constant:
0:9 0.500000
0:9 0.500000
0:10 move second child to first child ( temp 4-component vector of float)
0:10 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
0:10 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:10 Constant:
0:10 0 (const uint)
0:10 Constant:
0:10 1.000000
0:10 1.000000
0:10 1.000000
0:10 1.000000
0:? Linker Objects
0:? 'a1' (layout( location=0) smooth out 4-component vector of float)
0:? 'a2' (layout( location=1) smooth out 2-component vector of float)
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Shader version: 440
0:? Sequence
0:10 Function Definition: main( ( global void)
0:10 Function Parameters:
0:12 Sequence
0:12 move second child to first child ( temp 4-component vector of float)
0:12 'color' (layout( location=0) out 4-component vector of float)
0:12 Construct vec4 ( temp 4-component vector of float)
0:12 vector swizzle ( temp 2-component vector of float)
0:12 a1: direct index for structure ( in 4-component vector of float)
0:12 'anon@0' (layout( location=0) in block{ in 4-component vector of float a1, in 2-component vector of float a2})
0:12 Constant:
0:12 0 (const uint)
0:12 Sequence
0:12 Constant:
0:12 0 (const int)
0:12 Constant:
0:12 1 (const int)
0:12 a2: direct index for structure ( in 2-component vector of float)
0:12 'anon@0' (layout( location=0) in block{ in 4-component vector of float a1, in 2-component vector of float a2})
0:12 Constant:
0:12 1 (const uint)
0:? Linker Objects
0:? 'anon@0' (layout( location=0) in block{ in 4-component vector of float a1, in 2-component vector of float a2})
0:? 'color' (layout( location=0) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 29
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 9 14 22 27 28
Source GLSL 440
Name 4 "main"
Name 9 "a1"
Name 14 "a2"
Name 20 "gl_PerVertex"
MemberName 20(gl_PerVertex) 0 "gl_Position"
MemberName 20(gl_PerVertex) 1 "gl_PointSize"
MemberName 20(gl_PerVertex) 2 "gl_ClipDistance"
Name 22 ""
Name 27 "gl_VertexID"
Name 28 "gl_InstanceID"
Decorate 9(a1) Location 0
Decorate 14(a2) Location 1
MemberDecorate 20(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 20(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 20(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 20(gl_PerVertex) Block
Decorate 27(gl_VertexID) BuiltIn VertexId
Decorate 28(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(a1): 8(ptr) Variable Output
10: 6(float) Constant 1065353216
11: 7(fvec4) ConstantComposite 10 10 10 10
12: TypeVector 6(float) 2
13: TypePointer Output 12(fvec2)
14(a2): 13(ptr) Variable Output
15: 6(float) Constant 1056964608
16: 12(fvec2) ConstantComposite 15 15
17: TypeInt 32 0
18: 17(int) Constant 1
19: TypeArray 6(float) 18
20(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 19
21: TypePointer Output 20(gl_PerVertex)
22: 21(ptr) Variable Output
23: TypeInt 32 1
24: 23(int) Constant 0
26: TypePointer Input 23(int)
27(gl_VertexID): 26(ptr) Variable Input
28(gl_InstanceID): 26(ptr) Variable Input
4(main): 2 Function None 3
5: Label
Store 9(a1) 11
Store 14(a2) 16
25: 8(ptr) AccessChain 22 24
Store 25 11
Return
FunctionEnd
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 29
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 9 13
ExecutionMode 4 OriginLowerLeft
Source GLSL 440
Name 4 "main"
Name 9 "color"
Name 11 "Inputs"
MemberName 11(Inputs) 0 "a1"
MemberName 11(Inputs) 1 "a2"
Name 13 ""
Decorate 9(color) Location 0
Decorate 11(Inputs) Block
Decorate 13 Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(color): 8(ptr) Variable Output
10: TypeVector 6(float) 2
11(Inputs): TypeStruct 7(fvec4) 10(fvec2)
12: TypePointer Input 11(Inputs)
13: 12(ptr) Variable Input
14: TypeInt 32 1
15: 14(int) Constant 0
16: TypePointer Input 7(fvec4)
20: 14(int) Constant 1
21: TypePointer Input 10(fvec2)
4(main): 2 Function None 3
5: Label
17: 16(ptr) AccessChain 13 15
18: 7(fvec4) Load 17
19: 10(fvec2) VectorShuffle 18 18 0 1
22: 21(ptr) AccessChain 13 20
23: 10(fvec2) Load 22
24: 6(float) CompositeExtract 19 0
25: 6(float) CompositeExtract 19 1
26: 6(float) CompositeExtract 23 0
27: 6(float) CompositeExtract 23 1
28: 7(fvec4) CompositeConstruct 24 25 26 27
Store 9(color) 28
Return
FunctionEnd

View File

@ -0,0 +1,14 @@
#version 440
layout(location = 0) out Block
{
vec4 a1;
vec2 a2;
};
void main()
{
a1 = vec4(1.0);
a2 = vec2(0.5);
gl_Position = vec4(1.0);
}

View File

@ -0,0 +1,11 @@
#version 440
layout(location = 0) in vec4 a1;
layout(location = 1) in vec2 a2;
layout(location = 0) out vec4 color;
void main()
{
color = vec4(a1.xy, a2);
}

View File

@ -0,0 +1,28 @@
#version 440
layout(triangles) in;
layout(triangle_strip, max_vertices=3) out;
layout(location = 0) in vec4 in_a1[3];
layout(location = 1) in vec2 in_a2[3];
layout(location = 0) out vec4 a1;
layout(location = 1) out vec2 a2;
void main()
{
a1 = in_a1[0];
a2 = in_a2[0];
gl_Position = vec4(1.0);
EmitVertex();
a1 = in_a1[1];
a2 = in_a2[1];
gl_Position = vec4(1.0);
EmitVertex();
a1 = in_a1[2];
a2 = in_a2[2];
gl_Position = vec4(1.0);
EmitVertex();
}

View File

@ -0,0 +1,14 @@
#version 440
layout(location = 0) out Block
{
vec4 a1;
vec2 a2;
};
void main()
{
a1 = vec4(1.0);
a2 = vec2(0.5);
gl_Position = vec4(1.0);
}

View File

@ -0,0 +1,11 @@
#version 440
layout(location = 0) out vec4 a1;
layout(location = 1) out vec2 a2;
void main()
{
a1 = vec4(1.0);
a2 = vec2(0.5);
gl_Position = vec4(1.0);
}

View File

@ -0,0 +1,13 @@
#version 440
layout(location = 0) in Inputs {
vec4 a1;
vec2 a2;
};
layout(location = 0) out vec4 color;
void main()
{
color = vec4(a1.xy, a2);
}

View File

@ -0,0 +1,19 @@
#version 440
layout(triangles) in;
layout(triangle_strip, max_vertices=3) out;
layout(location = 0) in Inputs {
vec4 a1;
vec2 a2;
} gin[3];
layout(location = 0) out vec4 a1;
layout(location = 1) out vec2 a2;
void main()
{
a1 = vec4(1.0);
a2 = vec2(0.5);
gl_Position = vec4(1.0);
}

View File

@ -0,0 +1,11 @@
#version 440
layout(location = 0) out vec4 a1;
layout(location = 1) out vec2 a2;
void main()
{
a1 = vec4(1.0);
a2 = vec2(0.5);
gl_Position = vec4(1.0);
}

View File

@ -514,6 +514,24 @@ struct TSymbolValidater
return;
}
else {
// Deal with input/output pairs where one is a block member but the other is loose,
// e.g. with ARB_separate_shader_objects
if (type1.getBasicType() == EbtBlock &&
type1.isStruct() && !type2.isStruct()) {
// Iterate through block members tracking layout
glslang::TString name;
type1.getStruct()->begin()->type->appendMangledName(name);
if (name == mangleName2
&& type1.getQualifier().layoutLocation == type2.getQualifier().layoutLocation) return;
}
if (type2.getBasicType() == EbtBlock &&
type2.isStruct() && !type1.isStruct()) {
// Iterate through block members tracking layout
glslang::TString name;
type2.getStruct()->begin()->type->appendMangledName(name);
if (name == mangleName1
&& type1.getQualifier().layoutLocation == type2.getQualifier().layoutLocation) return;
}
TString err = "Invalid In/Out variable type : " + entKey.first;
infoSink.info.message(EPrefixInternalError, err.c_str());
hadError = true;

View File

@ -759,7 +759,10 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
auto checkName = [this, unitSymbol, &infoSink](const TString& name) {
for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) {
if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()) {
if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()
&& !((*unitSymbol->getType().getStruct())[i].type->getQualifier().hasLocation()
|| unitSymbol->getType().getQualifier().hasLocation())
) {
error(infoSink, "Anonymous member name used for global variable or other anonymous member: ");
infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n";
}

View File

@ -109,7 +109,50 @@ bool verifyIOMapping(std::string& linkingError, glslang::TProgram& program) {
success &= outQualifier.layoutLocation == inQualifier.layoutLocation;
}
else {
success &= false;
if (!in.getType()->isStruct()) {
bool found = false;
for (auto outIt : pipeOut) {
if (outIt.second->getType()->isStruct()) {
unsigned int baseLoc = outIt.second->getType()->getQualifier().hasLocation() ? outIt.second->getType()->getQualifier().layoutLocation : -1;
for (int j = 0; j < outIt.second->getType()->getStruct()->size(); j++) {
baseLoc = (*outIt.second->getType()->getStruct())[j].type->getQualifier().hasLocation() ?
(*outIt.second->getType()->getStruct())[j].type->getQualifier().layoutLocation : baseLoc;
if (baseLoc != -1) {
if (baseLoc == in.getType()->getQualifier().layoutLocation) {
found = true;
break;
}
baseLoc += glslang::TIntermediate::computeTypeLocationSize(*(*outIt.second->getType()->getStruct())[j].type, EShLangVertex);
}
}
if (found) {
break;
}
}
}
success &= found;
}
else {
unsigned int baseLoc = in.getType()->getQualifier().hasLocation() ? in.getType()->getQualifier().layoutLocation : -1;
for (int j = 0; j < in.getType()->getStruct()->size(); j++) {
baseLoc = (*in.getType()->getStruct())[j].type->getQualifier().hasLocation() ?
(*in.getType()->getStruct())[j].type->getQualifier().layoutLocation : baseLoc;
if (baseLoc != -1) {
bool isMemberFound = false;
for (auto outIt : pipeOut) {
if (baseLoc == outIt.second->getType()->getQualifier().layoutLocation) {
isMemberFound = true;
break;
}
}
if (!isMemberFound) {
success &= false;
break;
}
baseLoc += glslang::TIntermediate::computeTypeLocationSize(*(*in.getType()->getStruct())[j].type, EShLangVertex);
}
}
}
}
}
}
@ -295,6 +338,10 @@ INSTANTIATE_TEST_SUITE_P(
::testing::ValuesIn(std::vector<IoMapData>({
{{"iomap.crossStage.vert", "iomap.crossStage.frag" }, Semantics::OpenGL},
{{"iomap.crossStage.2.vert", "iomap.crossStage.2.geom", "iomap.crossStage.2.frag" }, Semantics::OpenGL},
{{"iomap.blockOutVariableIn.vert", "iomap.blockOutVariableIn.frag"}, Semantics::OpenGL},
{{"iomap.variableOutBlockIn.vert", "iomap.variableOutBlockIn.frag"}, Semantics::OpenGL},
{{"iomap.blockOutVariableIn.2.vert", "iomap.blockOutVariableIn.geom"}, Semantics::OpenGL},
{{"iomap.variableOutBlockIn.2.vert", "iomap.variableOutBlockIn.geom"}, Semantics::OpenGL},
// vulkan semantics
{{"iomap.crossStage.vk.vert", "iomap.crossStage.vk.geom", "iomap.crossStage.vk.frag" }, Semantics::Vulkan},
}))