• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
5               OpExecutionMode %_entrypoint_v OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "colorGreen"
9               OpMemberName %_UniformBuffer 1 "colorRed"
10               OpName %_entrypoint_v "_entrypoint_v"
11               OpName %test_return_b "test_return_b"
12               OpName %test_break_b "test_break_b"
13               OpName %test_continue_b "test_continue_b"
14               OpName %test_if_return_b "test_if_return_b"
15               OpName %test_if_break_b "test_if_break_b"
16               OpName %test_else_b "test_else_b"
17               OpName %test_loop_return_b "test_loop_return_b"
18               OpName %test_loop_break_b "test_loop_break_b"
19               OpName %x "x"
20               OpName %main "main"
21               OpDecorate %sk_FragColor RelaxedPrecision
22               OpDecorate %sk_FragColor Location 0
23               OpDecorate %sk_FragColor Index 0
24               OpMemberDecorate %_UniformBuffer 0 Offset 0
25               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
26               OpMemberDecorate %_UniformBuffer 1 Offset 16
27               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
28               OpDecorate %_UniformBuffer Block
29               OpDecorate %15 Binding 0
30               OpDecorate %15 DescriptorSet 0
31               OpDecorate %60 RelaxedPrecision
32               OpDecorate %61 RelaxedPrecision
33               OpDecorate %73 RelaxedPrecision
34               OpDecorate %74 RelaxedPrecision
35               OpDecorate %86 RelaxedPrecision
36               OpDecorate %87 RelaxedPrecision
37               OpDecorate %144 RelaxedPrecision
38               OpDecorate %146 RelaxedPrecision
39               OpDecorate %147 RelaxedPrecision
40      %float = OpTypeFloat 32
41    %v4float = OpTypeVector %float 4
42%_ptr_Output_v4float = OpTypePointer Output %v4float
43%sk_FragColor = OpVariable %_ptr_Output_v4float Output
44%_UniformBuffer = OpTypeStruct %v4float %v4float
45%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
46         %15 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
47       %void = OpTypeVoid
48         %20 = OpTypeFunction %void
49    %float_0 = OpConstant %float 0
50    %v2float = OpTypeVector %float 2
51         %24 = OpConstantComposite %v2float %float_0 %float_0
52%_ptr_Function_v2float = OpTypePointer Function %v2float
53       %bool = OpTypeBool
54         %29 = OpTypeFunction %bool
55       %true = OpConstantTrue %bool
56      %false = OpConstantFalse %bool
57%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
58        %int = OpTypeInt 32 1
59      %int_0 = OpConstant %int 0
60%_ptr_Function_int = OpTypePointer Function %int
61      %int_1 = OpConstant %int 1
62        %106 = OpTypeFunction %v4float %_ptr_Function_v2float
63%_ptr_Function_v4float = OpTypePointer Function %v4float
64%_entrypoint_v = OpFunction %void None %20
65         %21 = OpLabel
66         %25 = OpVariable %_ptr_Function_v2float Function
67               OpStore %25 %24
68         %27 = OpFunctionCall %v4float %main %25
69               OpStore %sk_FragColor %27
70               OpReturn
71               OpFunctionEnd
72%test_return_b = OpFunction %bool None %29
73         %30 = OpLabel
74               OpBranch %31
75         %31 = OpLabel
76               OpLoopMerge %35 %34 None
77               OpBranch %32
78         %32 = OpLabel
79               OpReturnValue %true
80         %34 = OpLabel
81               OpBranchConditional %false %31 %35
82         %35 = OpLabel
83               OpUnreachable
84               OpFunctionEnd
85%test_break_b = OpFunction %bool None %29
86         %38 = OpLabel
87               OpBranch %39
88         %39 = OpLabel
89               OpLoopMerge %43 %42 None
90               OpBranch %40
91         %40 = OpLabel
92               OpBranch %43
93         %42 = OpLabel
94               OpBranchConditional %false %39 %43
95         %43 = OpLabel
96               OpReturnValue %true
97               OpFunctionEnd
98%test_continue_b = OpFunction %bool None %29
99         %44 = OpLabel
100               OpBranch %45
101         %45 = OpLabel
102               OpLoopMerge %49 %48 None
103               OpBranch %46
104         %46 = OpLabel
105               OpBranch %48
106         %48 = OpLabel
107               OpBranchConditional %false %45 %49
108         %49 = OpLabel
109               OpReturnValue %true
110               OpFunctionEnd
111%test_if_return_b = OpFunction %bool None %29
112         %50 = OpLabel
113               OpBranch %51
114         %51 = OpLabel
115               OpLoopMerge %55 %54 None
116               OpBranch %52
117         %52 = OpLabel
118         %56 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0
119         %60 = OpLoad %v4float %56
120         %61 = OpCompositeExtract %float %60 1
121         %62 = OpFOrdGreaterThan %bool %61 %float_0
122               OpSelectionMerge %65 None
123               OpBranchConditional %62 %63 %64
124         %63 = OpLabel
125               OpReturnValue %true
126         %64 = OpLabel
127               OpBranch %55
128         %65 = OpLabel
129               OpBranch %54
130         %54 = OpLabel
131               OpBranchConditional %false %51 %55
132         %55 = OpLabel
133               OpReturnValue %false
134               OpFunctionEnd
135%test_if_break_b = OpFunction %bool None %29
136         %66 = OpLabel
137               OpBranch %67
138         %67 = OpLabel
139               OpLoopMerge %71 %70 None
140               OpBranch %68
141         %68 = OpLabel
142         %72 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0
143         %73 = OpLoad %v4float %72
144         %74 = OpCompositeExtract %float %73 1
145         %75 = OpFOrdGreaterThan %bool %74 %float_0
146               OpSelectionMerge %78 None
147               OpBranchConditional %75 %76 %77
148         %76 = OpLabel
149               OpBranch %71
150         %77 = OpLabel
151               OpBranch %70
152         %78 = OpLabel
153               OpBranch %69
154         %69 = OpLabel
155               OpBranch %70
156         %70 = OpLabel
157               OpBranchConditional %false %67 %71
158         %71 = OpLabel
159               OpReturnValue %true
160               OpFunctionEnd
161%test_else_b = OpFunction %bool None %29
162         %79 = OpLabel
163               OpBranch %80
164         %80 = OpLabel
165               OpLoopMerge %84 %83 None
166               OpBranch %81
167         %81 = OpLabel
168         %85 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0
169         %86 = OpLoad %v4float %85
170         %87 = OpCompositeExtract %float %86 1
171         %88 = OpFOrdEqual %bool %87 %float_0
172               OpSelectionMerge %91 None
173               OpBranchConditional %88 %89 %90
174         %89 = OpLabel
175               OpReturnValue %false
176         %90 = OpLabel
177               OpReturnValue %true
178         %91 = OpLabel
179               OpBranch %82
180         %82 = OpLabel
181               OpBranch %83
182         %83 = OpLabel
183               OpBranchConditional %false %80 %84
184         %84 = OpLabel
185               OpUnreachable
186               OpFunctionEnd
187%test_loop_return_b = OpFunction %bool None %29
188         %92 = OpLabel
189               OpReturnValue %true
190               OpFunctionEnd
191%test_loop_break_b = OpFunction %bool None %29
192         %93 = OpLabel
193          %x = OpVariable %_ptr_Function_int Function
194               OpStore %x %int_0
195               OpBranch %96
196         %96 = OpLabel
197               OpLoopMerge %100 %99 None
198               OpBranch %97
199         %97 = OpLabel
200        %101 = OpLoad %int %x
201        %103 = OpSLessThanEqual %bool %101 %int_1
202               OpBranchConditional %103 %98 %100
203         %98 = OpLabel
204               OpBranch %100
205         %99 = OpLabel
206        %104 = OpLoad %int %x
207        %105 = OpIAdd %int %104 %int_1
208               OpStore %x %105
209               OpBranch %96
210        %100 = OpLabel
211               OpReturnValue %true
212               OpFunctionEnd
213       %main = OpFunction %v4float None %106
214        %107 = OpFunctionParameter %_ptr_Function_v2float
215        %108 = OpLabel
216        %138 = OpVariable %_ptr_Function_v4float Function
217        %109 = OpFunctionCall %bool %test_return_b
218               OpSelectionMerge %111 None
219               OpBranchConditional %109 %110 %111
220        %110 = OpLabel
221        %112 = OpFunctionCall %bool %test_break_b
222               OpBranch %111
223        %111 = OpLabel
224        %113 = OpPhi %bool %false %108 %112 %110
225               OpSelectionMerge %115 None
226               OpBranchConditional %113 %114 %115
227        %114 = OpLabel
228        %116 = OpFunctionCall %bool %test_continue_b
229               OpBranch %115
230        %115 = OpLabel
231        %117 = OpPhi %bool %false %111 %116 %114
232               OpSelectionMerge %119 None
233               OpBranchConditional %117 %118 %119
234        %118 = OpLabel
235        %120 = OpFunctionCall %bool %test_if_return_b
236               OpBranch %119
237        %119 = OpLabel
238        %121 = OpPhi %bool %false %115 %120 %118
239               OpSelectionMerge %123 None
240               OpBranchConditional %121 %122 %123
241        %122 = OpLabel
242        %124 = OpFunctionCall %bool %test_if_break_b
243               OpBranch %123
244        %123 = OpLabel
245        %125 = OpPhi %bool %false %119 %124 %122
246               OpSelectionMerge %127 None
247               OpBranchConditional %125 %126 %127
248        %126 = OpLabel
249        %128 = OpFunctionCall %bool %test_else_b
250               OpBranch %127
251        %127 = OpLabel
252        %129 = OpPhi %bool %false %123 %128 %126
253               OpSelectionMerge %131 None
254               OpBranchConditional %129 %130 %131
255        %130 = OpLabel
256        %132 = OpFunctionCall %bool %test_loop_return_b
257               OpBranch %131
258        %131 = OpLabel
259        %133 = OpPhi %bool %false %127 %132 %130
260               OpSelectionMerge %135 None
261               OpBranchConditional %133 %134 %135
262        %134 = OpLabel
263        %136 = OpFunctionCall %bool %test_loop_break_b
264               OpBranch %135
265        %135 = OpLabel
266        %137 = OpPhi %bool %false %131 %136 %134
267               OpSelectionMerge %142 None
268               OpBranchConditional %137 %140 %141
269        %140 = OpLabel
270        %143 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0
271        %144 = OpLoad %v4float %143
272               OpStore %138 %144
273               OpBranch %142
274        %141 = OpLabel
275        %145 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1
276        %146 = OpLoad %v4float %145
277               OpStore %138 %146
278               OpBranch %142
279        %142 = OpLabel
280        %147 = OpLoad %v4float %138
281               OpReturnValue %147
282               OpFunctionEnd
283