Don't remove SPIR-V blocks before codegen.
[platform/upstream/glslang.git] / Test / baseResults / spv.functionCall.frag.out
1 spv.functionCall.frag
2 WARNING: 0:4: varying deprecated in version 130; may be removed in future release
3
4
5 Linked fragment stage:
6
7
8 // Module Version 10000
9 // Generated by (magic number): 80001
10 // Id's are bound by 77
11
12                               Capability Shader
13                1:             ExtInstImport  "GLSL.std.450"
14                               MemoryModel Logical GLSL450
15                               EntryPoint Fragment 4  "main" 58 69
16                               ExecutionMode 4 OriginLowerLeft
17                               Source GLSL 130
18                               Name 4  "main"
19                               Name 11  "foo(vf4;"
20                               Name 10  "bar"
21                               Name 13  "bar("
22                               Name 16  "unreachableReturn("
23                               Name 18  "missingReturn("
24                               Name 21  "h"
25                               Name 35  "d"
26                               Name 56  "color"
27                               Name 58  "BaseColor"
28                               Name 59  "param"
29                               Name 64  "f"
30                               Name 66  "g"
31                               Name 69  "gl_FragColor"
32                               Name 76  "bigColor"
33                2:             TypeVoid
34                3:             TypeFunction 2
35                6:             TypeFloat 32
36                7:             TypeVector 6(float) 4
37                8:             TypePointer Function 7(fvec4)
38                9:             TypeFunction 6(float) 8(ptr)
39               15:             TypeFunction 6(float)
40               20:             TypePointer Private 6(float)
41            21(h):     20(ptr) Variable Private
42               22:    6(float) Constant 0
43               23:             TypeInt 32 0
44               24:     23(int) Constant 0
45               25:             TypePointer Function 6(float)
46               28:     23(int) Constant 1
47               34:             TypePointer UniformConstant 6(float)
48            35(d):     34(ptr) Variable UniformConstant
49               37:    6(float) Constant 1082549862
50               38:             TypeBool
51               42:    6(float) Constant 1067030938
52               45:    6(float) Constant 1083179008
53               53:    6(float) Constant 1081711002
54               57:             TypePointer Input 7(fvec4)
55    58(BaseColor):     57(ptr) Variable Input
56               68:             TypePointer Output 7(fvec4)
57 69(gl_FragColor):     68(ptr) Variable Output
58               75:             TypePointer UniformConstant 7(fvec4)
59     76(bigColor):     75(ptr) Variable UniformConstant
60          4(main):           2 Function None 3
61                5:             Label
62        56(color):      8(ptr) Variable Function
63        59(param):      8(ptr) Variable Function
64            64(f):     25(ptr) Variable Function
65            66(g):     25(ptr) Variable Function
66                               Store 21(h) 22
67               60:    7(fvec4) Load 58(BaseColor)
68                               Store 59(param) 60
69               61:    6(float) FunctionCall 11(foo(vf4;) 59(param)
70               62:    7(fvec4) CompositeConstruct 61 61 61 61
71                               Store 56(color) 62
72               63:           2 FunctionCall 13(bar()
73               65:    6(float) FunctionCall 16(unreachableReturn()
74                               Store 64(f) 65
75               67:    6(float) FunctionCall 18(missingReturn()
76                               Store 66(g) 67
77               70:    7(fvec4) Load 56(color)
78               71:    6(float) Load 64(f)
79               72:    7(fvec4) VectorTimesScalar 70 71
80               73:    6(float) Load 21(h)
81               74:    7(fvec4) VectorTimesScalar 72 73
82                               Store 69(gl_FragColor) 74
83                               Return
84                               FunctionEnd
85     11(foo(vf4;):    6(float) Function None 9
86          10(bar):      8(ptr) FunctionParameter
87               12:             Label
88               26:     25(ptr) AccessChain 10(bar) 24
89               27:    6(float) Load 26
90               29:     25(ptr) AccessChain 10(bar) 28
91               30:    6(float) Load 29
92               31:    6(float) FAdd 27 30
93                               ReturnValue 31
94                               FunctionEnd
95         13(bar():           2 Function None 3
96               14:             Label
97                               Return
98                               FunctionEnd
99 16(unreachableReturn():    6(float) Function None 15
100               17:             Label
101               36:    6(float) Load 35(d)
102               39:    38(bool) FOrdLessThan 36 37
103                               SelectionMerge 41 None
104                               BranchConditional 39 40 44
105               40:               Label
106                                 ReturnValue 42
107               44:               Label
108                                 ReturnValue 45
109               41:             Label
110               47:    6(float) Undef
111                               ReturnValue 47
112                               FunctionEnd
113 18(missingReturn():    6(float) Function None 15
114               19:             Label
115               48:    6(float) Load 35(d)
116               49:    38(bool) FOrdLessThan 48 45
117                               SelectionMerge 51 None
118                               BranchConditional 49 50 51
119               50:               Label
120               52:    6(float)   Load 35(d)
121                                 Store 21(h) 52
122                                 ReturnValue 53
123               51:             Label
124               55:    6(float) Undef
125                               ReturnValue 55
126                               FunctionEnd