Fix precision propagation around shifts
[platform/upstream/glslang.git] / Test / baseResults / spv.precision.frag.out
1 spv.precision.frag
2 // Module Version 10000
3 // Generated by (magic number): 8000a
4 // Id's are bound by 165
5
6                               Capability Shader
7                1:             ExtInstImport  "GLSL.std.450"
8                               MemoryModel Logical GLSL450
9                               EntryPoint Fragment 4  "main" 23 62 64 76 119 149
10                               ExecutionMode 4 OriginUpperLeft
11                               Source ESSL 310
12                               SourceExtension  "GL_OES_sample_variables"
13                               Name 4  "main"
14                               Name 12  "foo(vf3;"
15                               Name 11  "mv3"
16                               Name 19  "boolfun(vb2;"
17                               Name 18  "bv2"
18                               Name 23  "highfin"
19                               Name 41  "sum"
20                               Name 43  "uniform_medium"
21                               Name 45  "uniform_high"
22                               Name 51  "uniform_low"
23                               Name 56  "arg1"
24                               Name 58  "arg2"
25                               Name 60  "d"
26                               Name 62  "lowfin"
27                               Name 64  "mediumfin"
28                               Name 68  "global_highp"
29                               Name 72  "local_highp"
30                               Name 76  "mediumfout"
31                               Name 107  "ub2"
32                               Name 108  "param"
33                               Name 117  "S"
34                               MemberName 117(S) 0  "a"
35                               MemberName 117(S) 1  "b"
36                               Name 119  "s"
37                               Name 149  "gl_SampleMaskIn"
38                               Decorate 12(foo(vf3;) RelaxedPrecision
39                               Decorate 11(mv3) RelaxedPrecision
40                               Decorate 23(highfin) Location 2
41                               Decorate 27 RelaxedPrecision
42                               Decorate 28 RelaxedPrecision
43                               Decorate 41(sum) RelaxedPrecision
44                               Decorate 43(uniform_medium) RelaxedPrecision
45                               Decorate 44 RelaxedPrecision
46                               Decorate 49 RelaxedPrecision
47                               Decorate 51(uniform_low) RelaxedPrecision
48                               Decorate 52 RelaxedPrecision
49                               Decorate 53 RelaxedPrecision
50                               Decorate 54 RelaxedPrecision
51                               Decorate 56(arg1) RelaxedPrecision
52                               Decorate 58(arg2) RelaxedPrecision
53                               Decorate 60(d) RelaxedPrecision
54                               Decorate 62(lowfin) RelaxedPrecision
55                               Decorate 62(lowfin) Location 0
56                               Decorate 63 RelaxedPrecision
57                               Decorate 64(mediumfin) RelaxedPrecision
58                               Decorate 64(mediumfin) Location 1
59                               Decorate 65 RelaxedPrecision
60                               Decorate 66 RelaxedPrecision
61                               Decorate 76(mediumfout) RelaxedPrecision
62                               Decorate 76(mediumfout) Location 0
63                               Decorate 77 RelaxedPrecision
64                               Decorate 78 RelaxedPrecision
65                               Decorate 79 RelaxedPrecision
66                               Decorate 80 RelaxedPrecision
67                               Decorate 81 RelaxedPrecision
68                               Decorate 82 RelaxedPrecision
69                               Decorate 86 RelaxedPrecision
70                               Decorate 88 RelaxedPrecision
71                               Decorate 90 RelaxedPrecision
72                               Decorate 91 RelaxedPrecision
73                               Decorate 93 RelaxedPrecision
74                               Decorate 94 RelaxedPrecision
75                               Decorate 97 RelaxedPrecision
76                               Decorate 98 RelaxedPrecision
77                               Decorate 99 RelaxedPrecision
78                               Decorate 100 RelaxedPrecision
79                               Decorate 101 RelaxedPrecision
80                               Decorate 102 RelaxedPrecision
81                               Decorate 103 RelaxedPrecision
82                               Decorate 104 RelaxedPrecision
83                               Decorate 105 RelaxedPrecision
84                               Decorate 113 RelaxedPrecision
85                               Decorate 115 RelaxedPrecision
86                               Decorate 116 RelaxedPrecision
87                               MemberDecorate 117(S) 1 RelaxedPrecision
88                               Decorate 119(s) Location 3
89                               Decorate 123 RelaxedPrecision
90                               Decorate 127 RelaxedPrecision
91                               Decorate 128 RelaxedPrecision
92                               Decorate 129 RelaxedPrecision
93                               Decorate 130 RelaxedPrecision
94                               Decorate 131 RelaxedPrecision
95                               Decorate 132 RelaxedPrecision
96                               Decorate 135 RelaxedPrecision
97                               Decorate 139 RelaxedPrecision
98                               Decorate 140 RelaxedPrecision
99                               Decorate 143 RelaxedPrecision
100                               Decorate 144 RelaxedPrecision
101                               Decorate 145 RelaxedPrecision
102                               Decorate 149(gl_SampleMaskIn) Flat
103                               Decorate 149(gl_SampleMaskIn) BuiltIn SampleMask
104                               Decorate 153 RelaxedPrecision
105                               Decorate 156 RelaxedPrecision
106                               Decorate 159 RelaxedPrecision
107                               Decorate 160 RelaxedPrecision
108                               Decorate 162 RelaxedPrecision
109                               Decorate 163 RelaxedPrecision
110                               Decorate 164 RelaxedPrecision
111                2:             TypeVoid
112                3:             TypeFunction 2
113                6:             TypeFloat 32
114                7:             TypeVector 6(float) 3
115                8:             TypePointer Function 7(fvec3)
116                9:             TypeVector 6(float) 2
117               10:             TypeFunction 9(fvec2) 8(ptr)
118               14:             TypeBool
119               15:             TypeVector 14(bool) 2
120               16:             TypePointer Function 15(bvec2)
121               17:             TypeFunction 14(bool) 16(ptr)
122               21:             TypeVector 6(float) 4
123               22:             TypePointer Input 21(fvec4)
124      23(highfin):     22(ptr) Variable Input
125               26:             TypePointer Function 9(fvec2)
126               32:    14(bool) ConstantFalse
127               33:    14(bool) ConstantTrue
128               34:   15(bvec2) ConstantComposite 32 33
129               39:             TypeInt 32 1
130               40:             TypePointer Function 39(int)
131               42:             TypePointer Private 39(int)
132 43(uniform_medium):     42(ptr) Variable Private
133 45(uniform_high):     42(ptr) Variable Private
134  51(uniform_low):     42(ptr) Variable Private
135               55:             TypePointer Function 6(float)
136               57:    6(float) Constant 1078774989
137               59:    6(float) Constant 1232730691
138               61:             TypePointer Input 6(float)
139       62(lowfin):     61(ptr) Variable Input
140    64(mediumfin):     61(ptr) Variable Input
141               67:             TypePointer Private 6(float)
142 68(global_highp):     67(ptr) Variable Private
143               71:             TypePointer Function 21(fvec4)
144               75:             TypePointer Output 21(fvec4)
145   76(mediumfout):     75(ptr) Variable Output
146               85:     39(int) Constant 4
147               87:             TypeVector 39(int) 2
148               95:             TypeInt 32 0
149               96:     95(int) Constant 0
150              106:             TypePointer Private 15(bvec2)
151         107(ub2):    106(ptr) Variable Private
152              114:    6(float) Constant 1065353216
153           117(S):             TypeStruct 6(float) 6(float)
154              118:             TypePointer Input 117(S)
155           119(s):    118(ptr) Variable Input
156              120:     39(int) Constant 0
157              125:     39(int) Constant 1
158              133:    6(float) Constant 1082549862
159              138:    6(float) Constant 1073741824
160              142:    6(float) Constant 1077936128
161              146:     95(int) Constant 1
162              147:             TypeArray 39(int) 146
163              148:             TypePointer Input 147
164 149(gl_SampleMaskIn):    148(ptr) Variable Input
165              150:             TypePointer Input 39(int)
166          4(main):           2 Function None 3
167                5:             Label
168          41(sum):     40(ptr) Variable Function
169         56(arg1):     55(ptr) Variable Function
170         58(arg2):     55(ptr) Variable Function
171            60(d):     55(ptr) Variable Function
172  72(local_highp):     71(ptr) Variable Function
173       108(param):     16(ptr) Variable Function
174              135:     71(ptr) Variable Function
175              156:     71(ptr) Variable Function
176               44:     39(int) Load 43(uniform_medium)
177               46:     39(int) Load 45(uniform_high)
178               47:     39(int) IAdd 44 46
179                               Store 41(sum) 47
180               48:     39(int) Load 45(uniform_high)
181               49:     39(int) Load 41(sum)
182               50:     39(int) IAdd 49 48
183                               Store 41(sum) 50
184               52:     39(int) Load 51(uniform_low)
185               53:     39(int) Load 41(sum)
186               54:     39(int) IAdd 53 52
187                               Store 41(sum) 54
188                               Store 56(arg1) 57
189                               Store 58(arg2) 59
190               63:    6(float) Load 62(lowfin)
191               65:    6(float) Load 64(mediumfin)
192               66:    6(float) ExtInst 1(GLSL.std.450) 67(Distance) 63 65
193                               Store 60(d) 66
194               69:   21(fvec4) Load 23(highfin)
195               70:    6(float) ExtInst 1(GLSL.std.450) 66(Length) 69
196                               Store 68(global_highp) 70
197               73:    6(float) Load 68(global_highp)
198               74:   21(fvec4) CompositeConstruct 73 73 73 73
199                               Store 72(local_highp) 74
200               77:    6(float) Load 60(d)
201               78:    6(float) ExtInst 1(GLSL.std.450) 13(Sin) 77
202               79:   21(fvec4) CompositeConstruct 78 78 78 78
203               80:    6(float) Load 58(arg2)
204               81:   21(fvec4) CompositeConstruct 80 80 80 80
205               82:   21(fvec4) FAdd 79 81
206               83:   21(fvec4) Load 72(local_highp)
207               84:   21(fvec4) FAdd 82 83
208                               Store 76(mediumfout) 84
209               86:     39(int) Load 51(uniform_low)
210               88:   87(ivec2) CompositeConstruct 86 86
211               89:     39(int) Load 45(uniform_high)
212               90:   87(ivec2) CompositeConstruct 89 89
213               91:   87(ivec2) IMul 88 90
214               92:     39(int) Load 45(uniform_high)
215               93:   87(ivec2) CompositeConstruct 92 92
216               94:   87(ivec2) IAdd 91 93
217               97:     39(int) CompositeExtract 94 0
218               98:     39(int) IAdd 85 97
219               99:     39(int) Load 41(sum)
220              100:     39(int) IAdd 99 98
221                               Store 41(sum) 100
222              101:     39(int) Load 41(sum)
223              102:    6(float) ConvertSToF 101
224              103:   21(fvec4) CompositeConstruct 102 102 102 102
225              104:   21(fvec4) Load 76(mediumfout)
226              105:   21(fvec4) FAdd 104 103
227                               Store 76(mediumfout) 105
228              109:   15(bvec2) Load 107(ub2)
229                               Store 108(param) 109
230              110:    14(bool) FunctionCall 19(boolfun(vb2;) 108(param)
231                               SelectionMerge 112 None
232                               BranchConditional 110 111 112
233              111:               Label
234              113:   21(fvec4)   Load 76(mediumfout)
235              115:   21(fvec4)   CompositeConstruct 114 114 114 114
236              116:   21(fvec4)   FAdd 113 115
237                                 Store 76(mediumfout) 116
238                                 Branch 112
239              112:             Label
240              121:     61(ptr) AccessChain 119(s) 120
241              122:    6(float) Load 121
242              123:   21(fvec4) Load 76(mediumfout)
243              124:   21(fvec4) VectorTimesScalar 123 122
244                               Store 76(mediumfout) 124
245              126:     61(ptr) AccessChain 119(s) 125
246              127:    6(float) Load 126
247              128:   21(fvec4) Load 76(mediumfout)
248              129:   21(fvec4) VectorTimesScalar 128 127
249                               Store 76(mediumfout) 129
250              130:    6(float) Load 64(mediumfin)
251              131:    6(float) Load 64(mediumfin)
252              132:    6(float) FMul 130 131
253              134:    14(bool) FOrdGreaterThan 132 133
254                               SelectionMerge 137 None
255                               BranchConditional 134 136 141
256              136:               Label
257              139:   21(fvec4)   Load 76(mediumfout)
258              140:   21(fvec4)   VectorTimesScalar 139 138
259                                 Store 135 140
260                                 Branch 137
261              141:               Label
262              143:   21(fvec4)   Load 76(mediumfout)
263              144:   21(fvec4)   VectorTimesScalar 143 142
264                                 Store 135 144
265                                 Branch 137
266              137:             Label
267              145:   21(fvec4) Load 135
268                               Store 76(mediumfout) 145
269              151:    150(ptr) AccessChain 149(gl_SampleMaskIn) 120
270              152:     39(int) Load 151
271              153:     39(int) Load 43(uniform_medium)
272              154:     39(int) ShiftRightArithmetic 152 153
273              155:    14(bool) SGreaterThan 154 120
274                               SelectionMerge 158 None
275                               BranchConditional 155 157 161
276              157:               Label
277              159:   21(fvec4)   Load 76(mediumfout)
278              160:   21(fvec4)   VectorTimesScalar 159 138
279                                 Store 156 160
280                                 Branch 158
281              161:               Label
282              162:   21(fvec4)   Load 76(mediumfout)
283              163:   21(fvec4)   VectorTimesScalar 162 142
284                                 Store 156 163
285                                 Branch 158
286              158:             Label
287              164:   21(fvec4) Load 156
288                               Store 76(mediumfout) 164
289                               Return
290                               FunctionEnd
291     12(foo(vf3;):    9(fvec2) Function None 10
292          11(mv3):      8(ptr) FunctionParameter
293               13:             Label
294               27:     26(ptr) Variable Function
295               24:   21(fvec4) Load 23(highfin)
296               25:    9(fvec2) VectorShuffle 24 24 0 1
297                               Store 27 25
298               28:    9(fvec2) Load 27
299                               ReturnValue 28
300                               FunctionEnd
301 19(boolfun(vb2;):    14(bool) Function None 17
302          18(bv2):     16(ptr) FunctionParameter
303               20:             Label
304               31:   15(bvec2) Load 18(bv2)
305               35:   15(bvec2) LogicalEqual 31 34
306               36:    14(bool) All 35
307                               ReturnValue 36
308                               FunctionEnd