xref: /aosp_15_r20/external/skia/tests/sksl/shared/PrefixExpressionsES3.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 "colorGreen"
9               OpMemberName %_UniformBuffer 1 "colorRed"
10               OpName %_entrypoint_v "_entrypoint_v"
11               OpName %main "main"
12               OpName %ok "ok"
13               OpName %val "val"
14               OpName %mask "mask"
15               OpName %imask "imask"
16               OpDecorate %sk_FragColor RelaxedPrecision
17               OpDecorate %sk_FragColor Location 0
18               OpDecorate %sk_FragColor Index 0
19               OpMemberDecorate %_UniformBuffer 0 Offset 0
20               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
21               OpMemberDecorate %_UniformBuffer 1 Offset 16
22               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
23               OpDecorate %_UniformBuffer Block
24               OpDecorate %7 Binding 0
25               OpDecorate %7 DescriptorSet 0
26               OpDecorate %34 RelaxedPrecision
27               OpDecorate %35 RelaxedPrecision
28               OpDecorate %74 RelaxedPrecision
29               OpDecorate %77 RelaxedPrecision
30               OpDecorate %78 RelaxedPrecision
31      %float = OpTypeFloat 32
32    %v4float = OpTypeVector %float 4
33%_ptr_Output_v4float = OpTypePointer Output %v4float
34%sk_FragColor = OpVariable %_ptr_Output_v4float Output
35%_UniformBuffer = OpTypeStruct %v4float %v4float
36%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
37          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
38       %void = OpTypeVoid
39         %12 = OpTypeFunction %void
40    %float_0 = OpConstant %float 0
41    %v2float = OpTypeVector %float 2
42         %16 = OpConstantComposite %v2float %float_0 %float_0
43%_ptr_Function_v2float = OpTypePointer Function %v2float
44         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
45       %bool = OpTypeBool
46%_ptr_Function_bool = OpTypePointer Function %bool
47       %true = OpConstantTrue %bool
48       %uint = OpTypeInt 32 0
49%_ptr_Function_uint = OpTypePointer Function %uint
50%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
51        %int = OpTypeInt 32 1
52      %int_0 = OpConstant %int 0
53     %v2uint = OpTypeVector %uint 2
54%_ptr_Function_v2uint = OpTypePointer Function %v2uint
55      %v2int = OpTypeVector %int 2
56%_ptr_Function_v2int = OpTypePointer Function %v2int
57      %false = OpConstantFalse %bool
58     %uint_0 = OpConstant %uint 0
59         %63 = OpConstantComposite %v2uint %uint_0 %uint_0
60     %v2bool = OpTypeVector %bool 2
61%_ptr_Function_v4float = OpTypePointer Function %v4float
62      %int_1 = OpConstant %int 1
63%_entrypoint_v = OpFunction %void None %12
64         %13 = OpLabel
65         %17 = OpVariable %_ptr_Function_v2float Function
66               OpStore %17 %16
67         %19 = OpFunctionCall %v4float %main %17
68               OpStore %sk_FragColor %19
69               OpReturn
70               OpFunctionEnd
71       %main = OpFunction %v4float None %20
72         %21 = OpFunctionParameter %_ptr_Function_v2float
73         %22 = OpLabel
74         %ok = OpVariable %_ptr_Function_bool Function
75        %val = OpVariable %_ptr_Function_uint Function
76       %mask = OpVariable %_ptr_Function_v2uint Function
77      %imask = OpVariable %_ptr_Function_v2int Function
78         %68 = OpVariable %_ptr_Function_v4float Function
79               OpStore %ok %true
80         %30 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
81         %34 = OpLoad %v4float %30
82         %35 = OpCompositeExtract %float %34 0
83         %36 = OpConvertFToU %uint %35
84               OpStore %val %36
85         %40 = OpNot %uint %36
86         %41 = OpCompositeConstruct %v2uint %36 %40
87               OpStore %mask %41
88         %45 = OpNot %v2uint %41
89         %46 = OpCompositeExtract %uint %45 0
90         %47 = OpBitcast %int %46
91         %48 = OpCompositeExtract %uint %45 1
92         %49 = OpBitcast %int %48
93         %50 = OpCompositeConstruct %v2int %47 %49
94               OpStore %imask %50
95         %51 = OpNot %v2uint %41
96         %52 = OpNot %v2int %50
97         %53 = OpCompositeExtract %int %52 0
98         %54 = OpBitcast %uint %53
99         %55 = OpCompositeExtract %int %52 1
100         %56 = OpBitcast %uint %55
101         %57 = OpCompositeConstruct %v2uint %54 %56
102         %58 = OpBitwiseAnd %v2uint %51 %57
103               OpStore %mask %58
104               OpSelectionMerge %61 None
105               OpBranchConditional %true %60 %61
106         %60 = OpLabel
107         %64 = OpIEqual %v2bool %58 %63
108         %66 = OpAll %bool %64
109               OpBranch %61
110         %61 = OpLabel
111         %67 = OpPhi %bool %false %22 %66 %60
112               OpStore %ok %67
113               OpSelectionMerge %72 None
114               OpBranchConditional %67 %70 %71
115         %70 = OpLabel
116         %73 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
117         %74 = OpLoad %v4float %73
118               OpStore %68 %74
119               OpBranch %72
120         %71 = OpLabel
121         %75 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
122         %77 = OpLoad %v4float %75
123               OpStore %68 %77
124               OpBranch %72
125         %72 = OpLabel
126         %78 = OpLoad %v4float %68
127               OpReturnValue %78
128               OpFunctionEnd
129