glslang/Test/baseResults/spv.prepost.frag.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

151 lines
6.6 KiB
Plaintext
Executable File

spv.prepost.frag
Linked fragment stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 96
Source GLSL 140
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 8 "index"
Name 14 "s"
MemberName 14(s) 0 "y"
Name 16 "str"
Name 22 "t"
Name 50 "x"
Name 61 "y"
Name 66 "z"
Name 73 "v"
Name 92 "gl_FragColor"
Decorate 92(gl_FragColor) BuiltIn FragColor
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Function 6(int)
9: 6(int) Constant 5
10: TypeFloat 32
11: TypeInt 32 0
12: 11(int) Constant 5
13: TypeArray 10(float) 12
14(s): TypeStruct 13
15: TypePointer Function 14(s)
17: 6(int) Constant 0
18: 6(int) Constant 4
19: 10(float) Constant 1073741824
20: TypePointer Function 10(float)
24: 6(int) Constant 1
28: 10(float) Constant 1065353216
71: TypeVector 10(float) 4
72: TypePointer Function 71(fvec4)
74: 10(float) Constant 1077936128
75: 10(float) Constant 1082130432
76: 71(fvec4) ConstantComposite 28 19 74 75
91: TypePointer Output 71(fvec4)
92(gl_FragColor): 91(ptr) Variable Output
4(main): 2 Function None 3
5: Label
8(index): 7(ptr) Variable Function
16(str): 15(ptr) Variable Function
22(t): 20(ptr) Variable Function
50(x): 20(ptr) Variable Function
61(y): 20(ptr) Variable Function
66(z): 20(ptr) Variable Function
73(v): 72(ptr) Variable Function
Store 8(index) 9
21: 20(ptr) AccessChain 16(str) 17 18
Store 21 19
23: 6(int) Load 8(index)
25: 6(int) ISub 23 24
Store 8(index) 25
26: 20(ptr) AccessChain 16(str) 17 25
27: 10(float) Load 26
29: 10(float) FAdd 27 28
Store 26 29
Store 22(t) 29
30: 10(float) Load 22(t)
31: 20(ptr) AccessChain 16(str) 17 18
32: 10(float) Load 31
33: 10(float) FAdd 32 30
34: 20(ptr) AccessChain 16(str) 17 18
Store 34 33
35: 20(ptr) AccessChain 16(str) 17 18
36: 10(float) Load 35
37: 10(float) FSub 36 28
Store 35 37
Store 22(t) 36
38: 6(int) Load 8(index)
39: 6(int) IAdd 38 24
Store 8(index) 39
40: 10(float) Load 22(t)
41: 20(ptr) AccessChain 16(str) 17 38
42: 10(float) Load 41
43: 10(float) FAdd 42 40
44: 20(ptr) AccessChain 16(str) 17 38
Store 44 43
45: 6(int) Load 8(index)
46: 6(int) ISub 45 24
Store 8(index) 46
47: 20(ptr) AccessChain 16(str) 17 46
48: 10(float) Load 47
49: 10(float) FSub 48 28
Store 47 49
51: 20(ptr) AccessChain 16(str) 17 18
52: 10(float) Load 51
Store 50(x) 52
53: 10(float) Load 50(x)
54: 10(float) FAdd 53 28
Store 50(x) 54
55: 10(float) Load 50(x)
56: 10(float) FSub 55 28
Store 50(x) 56
57: 10(float) Load 50(x)
58: 10(float) FAdd 57 28
Store 50(x) 58
59: 10(float) Load 50(x)
60: 10(float) FSub 59 28
Store 50(x) 60
62: 10(float) Load 50(x)
63: 10(float) Load 50(x)
64: 10(float) FAdd 63 28
Store 50(x) 64
65: 10(float) FMul 62 64
Store 61(y) 65
67: 10(float) Load 61(y)
68: 10(float) Load 50(x)
69: 10(float) FSub 68 28
Store 50(x) 69
70: 10(float) FMul 67 68
Store 66(z) 70
Store 73(v) 76
77: 71(fvec4) Load 73(v)
78: 10(float) CompositeExtract 77 2
79: 10(float) FSub 78 28
80: 71(fvec4) Load 73(v)
81: 71(fvec4) CompositeInsert 79 80 2
Store 73(v) 81
82: 71(fvec4) Load 73(v)
83: 71(fvec4) CompositeInsert 78 82 1
Store 73(v) 83
84: 71(fvec4) Load 73(v)
85: 10(float) CompositeExtract 84 3
86: 10(float) FSub 85 28
87: 71(fvec4) Load 73(v)
88: 71(fvec4) CompositeInsert 86 87 3
Store 73(v) 88
89: 71(fvec4) Load 73(v)
90: 71(fvec4) CompositeInsert 86 89 0
Store 73(v) 90
93: 10(float) Load 66(z)
94: 71(fvec4) Load 73(v)
95: 71(fvec4) VectorTimesScalar 94 93
Store 92(gl_FragColor) 95
Return
FunctionEnd