glslang/Test/baseResults/spv.150.vert.out
John Kessenich e770b3e6cf SPV return from main: Simplify a legacy design such returns are not jumps to exit block.
Structured control-flow rules allow leaving the middle of a construct through
a return, but not through a jump to a block that does a return.

Addresses issue #58.
2015-09-14 21:08:58 -06:00

108 lines
5.5 KiB
Plaintext
Executable File

spv.150.vert
Linked vertex stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 52
Source GLSL 150
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
Name 4 "main"
Name 13 "gl_PerVertex"
MemberName 13(gl_PerVertex) 0 "gl_Position"
MemberName 13(gl_PerVertex) 1 "gl_PointSize"
MemberName 13(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 13(gl_PerVertex) 3 "gl_ClipVertex"
MemberName 13(gl_PerVertex) 4 "gl_FrontColor"
MemberName 13(gl_PerVertex) 5 "gl_BackColor"
MemberName 13(gl_PerVertex) 6 "gl_FrontSecondaryColor"
MemberName 13(gl_PerVertex) 7 "gl_BackSecondaryColor"
MemberName 13(gl_PerVertex) 8 "gl_TexCoord"
MemberName 13(gl_PerVertex) 9 "gl_FogFragCoord"
Name 15 ""
Name 19 "iv4"
Name 25 "ps"
Name 35 "s1"
MemberName 35(s1) 0 "a"
MemberName 35(s1) 1 "a2"
MemberName 35(s1) 2 "b"
Name 37 "s2"
MemberName 37(s2) 0 "c"
MemberName 37(s2) 1 "d"
Name 39 "s2out"
Name 41 "i"
Name 48 "ui"
Name 50 "gl_VertexID"
Name 51 "gl_InstanceID"
MemberDecorate 13(gl_PerVertex) 0 Invariant
MemberDecorate 13(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 13(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 13(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 13(gl_PerVertex) Block
Decorate 48(ui) NoStaticUse
Decorate 50(gl_VertexID) BuiltIn VertexId
Decorate 50(gl_VertexID) NoStaticUse
Decorate 51(gl_InstanceID) BuiltIn InstanceId
Decorate 51(gl_InstanceID) NoStaticUse
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeInt 32 0
9: 8(int) Constant 4
10: TypeArray 6(float) 9
11: 8(int) Constant 1
12: TypeArray 7(fvec4) 11
13(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 7(fvec4) 7(fvec4) 7(fvec4) 7(fvec4) 7(fvec4) 12 6(float)
14: TypePointer Output 13(gl_PerVertex)
15: 14(ptr) Variable Output
16: TypeInt 32 1
17: 16(int) Constant 0
18: TypePointer Input 7(fvec4)
19(iv4): 18(ptr) Variable Input
21: TypePointer Output 7(fvec4)
23: 16(int) Constant 1
24: TypePointer UniformConstant 6(float)
25(ps): 24(ptr) Variable UniformConstant
27: TypePointer Output 6(float)
29: 16(int) Constant 2
33: 8(int) Constant 3
34: TypeArray 7(fvec4) 33
35(s1): TypeStruct 16(int) 16(int) 34
36: TypeArray 35(s1) 9
37(s2): TypeStruct 16(int) 36
38: TypePointer Output 37(s2)
39(s2out): 38(ptr) Variable Output
40: TypePointer Function 16(int)
47: TypePointer UniformConstant 16(int)
48(ui): 47(ptr) Variable UniformConstant
49: TypePointer Input 16(int)
50(gl_VertexID): 49(ptr) Variable Input
51(gl_InstanceID): 49(ptr) Variable Input
4(main): 2 Function None 3
5: Label
41(i): 40(ptr) Variable Function
20: 7(fvec4) Load 19(iv4)
22: 21(ptr) AccessChain 15 17
Store 22 20
26: 6(float) Load 25(ps)
28: 27(ptr) AccessChain 15 23
Store 28 26
30: 7(fvec4) Load 19(iv4)
31: 6(float) CompositeExtract 30 0
32: 27(ptr) AccessChain 15 29 29
Store 32 31
42: 16(int) Load 41(i)
43: 6(float) Load 25(ps)
44: 21(ptr) AccessChain 39(s2out) 23 42 29 29
45: 7(fvec4) Load 44
46: 7(fvec4) CompositeInsert 43 45 3
Store 44 46
Return
FunctionEnd