xref: /aosp_15_r20/external/skia/tests/sksl/shared/SwizzleScalarBool.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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 "unknownInput"
9               OpName %_entrypoint_v "_entrypoint_v"
10               OpName %main "main"
11               OpName %b "b"
12               OpName %b4 "b4"
13               OpDecorate %sk_FragColor RelaxedPrecision
14               OpDecorate %sk_FragColor Location 0
15               OpDecorate %sk_FragColor Index 0
16               OpMemberDecorate %_UniformBuffer 0 Offset 0
17               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
18               OpDecorate %_UniformBuffer Block
19               OpDecorate %7 Binding 0
20               OpDecorate %7 DescriptorSet 0
21               OpDecorate %30 RelaxedPrecision
22               OpDecorate %45 RelaxedPrecision
23               OpDecorate %48 RelaxedPrecision
24               OpDecorate %50 RelaxedPrecision
25               OpDecorate %52 RelaxedPrecision
26               OpDecorate %53 RelaxedPrecision
27      %float = OpTypeFloat 32
28    %v4float = OpTypeVector %float 4
29%_ptr_Output_v4float = OpTypePointer Output %v4float
30%sk_FragColor = OpVariable %_ptr_Output_v4float Output
31%_UniformBuffer = OpTypeStruct %float
32%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
33          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
34       %void = OpTypeVoid
35         %12 = OpTypeFunction %void
36    %float_0 = OpConstant %float 0
37    %v2float = OpTypeVector %float 2
38         %16 = OpConstantComposite %v2float %float_0 %float_0
39%_ptr_Function_v2float = OpTypePointer Function %v2float
40         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
41       %bool = OpTypeBool
42%_ptr_Function_bool = OpTypePointer Function %bool
43%_ptr_Uniform_float = OpTypePointer Uniform %float
44        %int = OpTypeInt 32 1
45      %int_0 = OpConstant %int 0
46     %v4bool = OpTypeVector %bool 4
47%_ptr_Function_v4bool = OpTypePointer Function %v4bool
48     %v2bool = OpTypeVector %bool 2
49      %false = OpConstantFalse %bool
50       %true = OpConstantTrue %bool
51    %float_1 = OpConstant %float 1
52%_entrypoint_v = OpFunction %void None %12
53         %13 = OpLabel
54         %17 = OpVariable %_ptr_Function_v2float Function
55               OpStore %17 %16
56         %19 = OpFunctionCall %v4float %main %17
57               OpStore %sk_FragColor %19
58               OpReturn
59               OpFunctionEnd
60       %main = OpFunction %v4float None %20
61         %21 = OpFunctionParameter %_ptr_Function_v2float
62         %22 = OpLabel
63          %b = OpVariable %_ptr_Function_bool Function
64         %b4 = OpVariable %_ptr_Function_v4bool Function
65         %26 = OpAccessChain %_ptr_Uniform_float %7 %int_0
66         %30 = OpLoad %float %26
67         %31 = OpFUnordNotEqual %bool %30 %float_0
68               OpStore %b %31
69         %35 = OpCompositeConstruct %v4bool %31 %31 %31 %31
70               OpStore %b4 %35
71         %37 = OpCompositeConstruct %v2bool %31 %31
72         %38 = OpCompositeExtract %bool %37 0
73         %39 = OpCompositeExtract %bool %37 1
74         %42 = OpCompositeConstruct %v4bool %38 %39 %false %true
75               OpStore %b4 %42
76         %43 = OpCompositeConstruct %v4bool %false %31 %true %false
77               OpStore %b4 %43
78         %44 = OpCompositeConstruct %v4bool %false %31 %false %31
79               OpStore %b4 %44
80         %45 = OpSelect %float %false %float_1 %float_0
81         %47 = OpCompositeExtract %bool %44 1
82         %48 = OpSelect %float %47 %float_1 %float_0
83         %49 = OpCompositeExtract %bool %44 2
84         %50 = OpSelect %float %49 %float_1 %float_0
85         %51 = OpCompositeExtract %bool %44 3
86         %52 = OpSelect %float %51 %float_1 %float_0
87         %53 = OpCompositeConstruct %v4float %45 %48 %50 %52
88               OpReturnValue %53
89               OpFunctionEnd
90