Don't remove SPIR-V blocks before codegen.
[platform/upstream/glslang.git] / Test / baseResults / spv.precision.frag.out
1 spv.precision.frag
2
3 Linked fragment stage:
4
5
6 // Module Version 10000
7 // Generated by (magic number): 80001
8 // Id's are bound by 114
9
10                               Capability Shader
11                1:             ExtInstImport  "GLSL.std.450"
12                               MemoryModel Logical GLSL450
13                               EntryPoint Fragment 4  "main" 23 59 61 73
14                               ExecutionMode 4 OriginLowerLeft
15                               Source ESSL 300
16                               Name 4  "main"
17                               Name 12  "foo(vf3;"
18                               Name 11  "mv3"
19                               Name 19  "boolfun(vb2;"
20                               Name 18  "bv2"
21                               Name 23  "highfin"
22                               Name 38  "sum"
23                               Name 40  "uniform_medium"
24                               Name 42  "uniform_high"
25                               Name 48  "uniform_low"
26                               Name 53  "arg1"
27                               Name 55  "arg2"
28                               Name 57  "d"
29                               Name 59  "lowfin"
30                               Name 61  "mediumfin"
31                               Name 65  "global_highp"
32                               Name 69  "local_highp"
33                               Name 73  "mediumfout"
34                               Name 104  "ub2"
35                               Name 105  "param"
36                               Decorate 38(sum) RelaxedPrecision
37                               Decorate 40(uniform_medium) RelaxedPrecision
38                               Decorate 48(uniform_low) RelaxedPrecision
39                               Decorate 53(arg1) RelaxedPrecision
40                               Decorate 55(arg2) RelaxedPrecision
41                               Decorate 57(d) RelaxedPrecision
42                               Decorate 59(lowfin) RelaxedPrecision
43                               Decorate 61(mediumfin) RelaxedPrecision
44                               Decorate 73(mediumfout) RelaxedPrecision
45                2:             TypeVoid
46                3:             TypeFunction 2
47                6:             TypeFloat 32
48                7:             TypeVector 6(float) 3
49                8:             TypePointer Function 7(fvec3)
50                9:             TypeVector 6(float) 2
51               10:             TypeFunction 9(fvec2) 8(ptr)
52               14:             TypeBool
53               15:             TypeVector 14(bool) 2
54               16:             TypePointer Function 15(bvec2)
55               17:             TypeFunction 14(bool) 16(ptr)
56               21:             TypeVector 6(float) 4
57               22:             TypePointer Input 21(fvec4)
58      23(highfin):     22(ptr) Variable Input
59               29:    14(bool) ConstantFalse
60               30:    14(bool) ConstantTrue
61               31:   15(bvec2) ConstantComposite 29 30
62               36:             TypeInt 32 1
63               37:             TypePointer Function 36(int)
64               39:             TypePointer UniformConstant 36(int)
65 40(uniform_medium):     39(ptr) Variable UniformConstant
66 42(uniform_high):     39(ptr) Variable UniformConstant
67  48(uniform_low):     39(ptr) Variable UniformConstant
68               52:             TypePointer Function 6(float)
69               54:    6(float) Constant 1078774989
70               56:    6(float) Constant 1232730691
71               58:             TypePointer Input 6(float)
72       59(lowfin):     58(ptr) Variable Input
73    61(mediumfin):     58(ptr) Variable Input
74               64:             TypePointer Private 6(float)
75 65(global_highp):     64(ptr) Variable Private
76               68:             TypePointer Function 21(fvec4)
77               72:             TypePointer Output 21(fvec4)
78   73(mediumfout):     72(ptr) Variable Output
79               82:     36(int) Constant 4
80               84:             TypeVector 36(int) 2
81               92:             TypeInt 32 0
82               93:     92(int) Constant 0
83              103:             TypePointer UniformConstant 15(bvec2)
84         104(ub2):    103(ptr) Variable UniformConstant
85              111:    6(float) Constant 1065353216
86          4(main):           2 Function None 3
87                5:             Label
88          38(sum):     37(ptr) Variable Function
89         53(arg1):     52(ptr) Variable Function
90         55(arg2):     52(ptr) Variable Function
91            57(d):     52(ptr) Variable Function
92  69(local_highp):     68(ptr) Variable Function
93       105(param):     16(ptr) Variable Function
94               41:     36(int) Load 40(uniform_medium)
95               43:     36(int) Load 42(uniform_high)
96               44:     36(int) IAdd 41 43
97                               Store 38(sum) 44
98               45:     36(int) Load 42(uniform_high)
99               46:     36(int) Load 38(sum)
100               47:     36(int) IAdd 46 45
101                               Store 38(sum) 47
102               49:     36(int) Load 48(uniform_low)
103               50:     36(int) Load 38(sum)
104               51:     36(int) IAdd 50 49
105                               Store 38(sum) 51
106                               Store 53(arg1) 54
107                               Store 55(arg2) 56
108               60:    6(float) Load 59(lowfin)
109               62:    6(float) Load 61(mediumfin)
110               63:    6(float) ExtInst 1(GLSL.std.450) 67(Distance) 60 62
111                               Store 57(d) 63
112               66:   21(fvec4) Load 23(highfin)
113               67:    6(float) ExtInst 1(GLSL.std.450) 66(Length) 66
114                               Store 65(global_highp) 67
115               70:    6(float) Load 65(global_highp)
116               71:   21(fvec4) CompositeConstruct 70 70 70 70
117                               Store 69(local_highp) 71
118               74:    6(float) Load 57(d)
119               75:    6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74
120               76:   21(fvec4) CompositeConstruct 75 75 75 75
121               77:    6(float) Load 55(arg2)
122               78:   21(fvec4) CompositeConstruct 77 77 77 77
123               79:   21(fvec4) FAdd 76 78
124               80:   21(fvec4) Load 69(local_highp)
125               81:   21(fvec4) FAdd 79 80
126                               Store 73(mediumfout) 81
127               83:     36(int) Load 48(uniform_low)
128               85:   84(ivec2) CompositeConstruct 83 83
129               86:     36(int) Load 42(uniform_high)
130               87:   84(ivec2) CompositeConstruct 86 86
131               88:   84(ivec2) IMul 85 87
132               89:     36(int) Load 42(uniform_high)
133               90:   84(ivec2) CompositeConstruct 89 89
134               91:   84(ivec2) IAdd 88 90
135               94:     36(int) CompositeExtract 91 0
136               95:     36(int) IAdd 82 94
137               96:     36(int) Load 38(sum)
138               97:     36(int) IAdd 96 95
139                               Store 38(sum) 97
140               98:     36(int) Load 38(sum)
141               99:    6(float) ConvertSToF 98
142              100:   21(fvec4) CompositeConstruct 99 99 99 99
143              101:   21(fvec4) Load 73(mediumfout)
144              102:   21(fvec4) FAdd 101 100
145                               Store 73(mediumfout) 102
146              106:   15(bvec2) Load 104(ub2)
147                               Store 105(param) 106
148              107:    14(bool) FunctionCall 19(boolfun(vb2;) 105(param)
149                               SelectionMerge 109 None
150                               BranchConditional 107 108 109
151              108:               Label
152              110:   21(fvec4)   Load 73(mediumfout)
153              112:   21(fvec4)   CompositeConstruct 111 111 111 111
154              113:   21(fvec4)   FAdd 110 112
155                                 Store 73(mediumfout) 113
156                                 Branch 109
157              109:             Label
158                               Return
159                               FunctionEnd
160     12(foo(vf3;):    9(fvec2) Function None 10
161          11(mv3):      8(ptr) FunctionParameter
162               13:             Label
163               24:   21(fvec4) Load 23(highfin)
164               25:    9(fvec2) VectorShuffle 24 24 0 1
165                               ReturnValue 25
166                               FunctionEnd
167 19(boolfun(vb2;):    14(bool) Function None 17
168          18(bv2):     16(ptr) FunctionParameter
169               20:             Label
170               28:   15(bvec2) Load 18(bv2)
171               32:   15(bvec2) LogicalEqual 28 31
172               33:    14(bool) All 32
173                               ReturnValue 33
174                               FunctionEnd