xref: /aosp_15_r20/external/skia/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %main "main" %sk_FragColor
5               OpExecutionMode %main OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "unknownInput"
9               OpName %main "main"
10               OpName %value "value"
11               OpDecorate %sk_FragColor RelaxedPrecision
12               OpDecorate %sk_FragColor Location 0
13               OpDecorate %sk_FragColor Index 0
14               OpMemberDecorate %_UniformBuffer 0 Offset 0
15               OpDecorate %_UniformBuffer Block
16               OpDecorate %7 Binding 0
17               OpDecorate %7 DescriptorSet 0
18               OpDecorate %value RelaxedPrecision
19      %float = OpTypeFloat 32
20    %v4float = OpTypeVector %float 4
21%_ptr_Output_v4float = OpTypePointer Output %v4float
22%sk_FragColor = OpVariable %_ptr_Output_v4float Output
23%_UniformBuffer = OpTypeStruct %float
24%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
25          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
26       %void = OpTypeVoid
27         %11 = OpTypeFunction %void
28%_ptr_Function_float = OpTypePointer Function %float
29    %float_0 = OpConstant %float 0
30        %int = OpTypeInt 32 1
31      %int_0 = OpConstant %int 0
32%_ptr_Uniform_float = OpTypePointer Uniform %float
33    %float_2 = OpConstant %float 2
34       %bool = OpTypeBool
35         %29 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
36    %float_1 = OpConstant %float 1
37       %main = OpFunction %void None %11
38         %12 = OpLabel
39      %value = OpVariable %_ptr_Function_float Function
40               OpStore %value %float_0
41               OpSelectionMerge %18 None
42               OpSwitch %int_0 %18 0 %19 1 %20
43         %19 = OpLabel
44               OpStore %value %float_0
45         %21 = OpAccessChain %_ptr_Uniform_float %7 %int_0
46         %23 = OpLoad %float %21
47         %25 = OpFOrdEqual %bool %23 %float_2
48               OpSelectionMerge %28 None
49               OpBranchConditional %25 %27 %28
50         %27 = OpLabel
51               OpStore %sk_FragColor %29
52               OpBranch %18
53         %28 = OpLabel
54               OpBranch %20
55         %20 = OpLabel
56               OpStore %value %float_1
57               OpBranch %18
58         %18 = OpLabel
59               OpReturn
60               OpFunctionEnd
61