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