xref: /aosp_15_r20/external/skia/tests/sksl/shared/SwizzleBoolConstants.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 %v "v"
13               OpName %result "result"
14               OpDecorate %sk_FragColor RelaxedPrecision
15               OpDecorate %sk_FragColor Location 0
16               OpDecorate %sk_FragColor Index 0
17               OpMemberDecorate %_UniformBuffer 0 Offset 0
18               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
19               OpMemberDecorate %_UniformBuffer 1 Offset 16
20               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
21               OpDecorate %_UniformBuffer Block
22               OpDecorate %7 Binding 0
23               OpDecorate %7 DescriptorSet 0
24               OpDecorate %31 RelaxedPrecision
25               OpDecorate %32 RelaxedPrecision
26               OpDecorate %111 RelaxedPrecision
27               OpDecorate %114 RelaxedPrecision
28               OpDecorate %115 RelaxedPrecision
29      %float = OpTypeFloat 32
30    %v4float = OpTypeVector %float 4
31%_ptr_Output_v4float = OpTypePointer Output %v4float
32%sk_FragColor = OpVariable %_ptr_Output_v4float Output
33%_UniformBuffer = OpTypeStruct %v4float %v4float
34%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
35          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
36       %void = OpTypeVoid
37         %12 = OpTypeFunction %void
38    %float_0 = OpConstant %float 0
39    %v2float = OpTypeVector %float 2
40         %16 = OpConstantComposite %v2float %float_0 %float_0
41%_ptr_Function_v2float = OpTypePointer Function %v2float
42         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
43       %bool = OpTypeBool
44     %v4bool = OpTypeVector %bool 4
45%_ptr_Function_v4bool = OpTypePointer Function %v4bool
46%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
47        %int = OpTypeInt 32 1
48      %int_0 = OpConstant %int 0
49       %true = OpConstantTrue %bool
50     %v2bool = OpTypeVector %bool 2
51      %false = OpConstantFalse %bool
52     %v3bool = OpTypeVector %bool 3
53%_ptr_Function_v4float = OpTypePointer Function %v4float
54      %int_1 = OpConstant %int 1
55%_entrypoint_v = OpFunction %void None %12
56         %13 = OpLabel
57         %17 = OpVariable %_ptr_Function_v2float Function
58               OpStore %17 %16
59         %19 = OpFunctionCall %v4float %main %17
60               OpStore %sk_FragColor %19
61               OpReturn
62               OpFunctionEnd
63       %main = OpFunction %v4float None %20
64         %21 = OpFunctionParameter %_ptr_Function_v2float
65         %22 = OpLabel
66          %v = OpVariable %_ptr_Function_v4bool Function
67     %result = OpVariable %_ptr_Function_v4bool Function
68        %105 = OpVariable %_ptr_Function_v4float Function
69         %27 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
70         %31 = OpLoad %v4float %27
71         %32 = OpCompositeExtract %float %31 1
72         %33 = OpFUnordNotEqual %bool %32 %float_0
73         %34 = OpCompositeConstruct %v4bool %33 %33 %33 %33
74               OpStore %v %34
75         %36 = OpCompositeExtract %bool %34 0
76         %38 = OpCompositeConstruct %v4bool %36 %true %true %true
77               OpStore %result %38
78         %39 = OpVectorShuffle %v2bool %34 %34 0 1
79         %41 = OpCompositeExtract %bool %39 0
80         %42 = OpCompositeExtract %bool %39 1
81         %44 = OpCompositeConstruct %v4bool %41 %42 %false %true
82               OpStore %result %44
83         %45 = OpCompositeConstruct %v4bool %36 %true %true %false
84               OpStore %result %45
85         %46 = OpCompositeExtract %bool %34 1
86         %47 = OpCompositeConstruct %v4bool %false %46 %true %true
87               OpStore %result %47
88         %48 = OpVectorShuffle %v3bool %34 %34 0 1 2
89         %50 = OpCompositeExtract %bool %48 0
90         %51 = OpCompositeExtract %bool %48 1
91         %52 = OpCompositeExtract %bool %48 2
92         %53 = OpCompositeConstruct %v4bool %50 %51 %52 %true
93               OpStore %result %53
94         %54 = OpVectorShuffle %v2bool %34 %34 0 1
95         %55 = OpCompositeExtract %bool %54 0
96         %56 = OpCompositeExtract %bool %54 1
97         %57 = OpCompositeConstruct %v4bool %55 %56 %true %true
98               OpStore %result %57
99         %58 = OpCompositeExtract %bool %34 2
100         %59 = OpCompositeConstruct %v4bool %36 %false %58 %true
101               OpStore %result %59
102         %60 = OpCompositeConstruct %v4bool %36 %true %false %false
103               OpStore %result %60
104         %61 = OpVectorShuffle %v2bool %34 %34 1 2
105         %62 = OpCompositeExtract %bool %61 0
106         %63 = OpCompositeExtract %bool %61 1
107         %64 = OpCompositeConstruct %v4bool %true %62 %63 %false
108               OpStore %result %64
109         %65 = OpCompositeConstruct %v4bool %false %46 %true %false
110               OpStore %result %65
111         %66 = OpCompositeConstruct %v4bool %true %true %58 %false
112               OpStore %result %66
113               OpStore %result %34
114         %67 = OpVectorShuffle %v3bool %34 %34 0 1 2
115         %68 = OpCompositeExtract %bool %67 0
116         %69 = OpCompositeExtract %bool %67 1
117         %70 = OpCompositeExtract %bool %67 2
118         %71 = OpCompositeConstruct %v4bool %68 %69 %70 %true
119               OpStore %result %71
120         %72 = OpVectorShuffle %v2bool %34 %34 0 1
121         %73 = OpCompositeExtract %bool %72 0
122         %74 = OpCompositeExtract %bool %72 1
123         %75 = OpCompositeExtract %bool %34 3
124         %76 = OpCompositeConstruct %v4bool %73 %74 %false %75
125               OpStore %result %76
126         %77 = OpVectorShuffle %v2bool %34 %34 0 1
127         %78 = OpCompositeExtract %bool %77 0
128         %79 = OpCompositeExtract %bool %77 1
129         %80 = OpCompositeConstruct %v4bool %78 %79 %true %false
130               OpStore %result %80
131         %81 = OpVectorShuffle %v2bool %34 %34 2 3
132         %82 = OpCompositeExtract %bool %81 0
133         %83 = OpCompositeExtract %bool %81 1
134         %84 = OpCompositeConstruct %v4bool %36 %true %82 %83
135               OpStore %result %84
136               OpStore %result %59
137         %85 = OpCompositeConstruct %v4bool %36 %true %true %75
138               OpStore %result %85
139         %86 = OpCompositeConstruct %v4bool %36 %true %false %true
140               OpStore %result %86
141         %87 = OpVectorShuffle %v3bool %34 %34 1 2 3
142         %88 = OpCompositeExtract %bool %87 0
143         %89 = OpCompositeExtract %bool %87 1
144         %90 = OpCompositeExtract %bool %87 2
145         %91 = OpCompositeConstruct %v4bool %true %88 %89 %90
146               OpStore %result %91
147         %92 = OpVectorShuffle %v2bool %34 %34 1 2
148         %93 = OpCompositeExtract %bool %92 0
149         %94 = OpCompositeExtract %bool %92 1
150         %95 = OpCompositeConstruct %v4bool %false %93 %94 %true
151               OpStore %result %95
152         %96 = OpCompositeConstruct %v4bool %false %46 %true %75
153               OpStore %result %96
154         %97 = OpCompositeConstruct %v4bool %true %46 %true %true
155               OpStore %result %97
156         %98 = OpVectorShuffle %v2bool %34 %34 2 3
157         %99 = OpCompositeExtract %bool %98 0
158        %100 = OpCompositeExtract %bool %98 1
159        %101 = OpCompositeConstruct %v4bool %false %false %99 %100
160               OpStore %result %101
161        %102 = OpCompositeConstruct %v4bool %false %false %58 %true
162               OpStore %result %102
163        %103 = OpCompositeConstruct %v4bool %false %true %true %75
164               OpStore %result %103
165        %104 = OpAny %bool %103
166               OpSelectionMerge %109 None
167               OpBranchConditional %104 %107 %108
168        %107 = OpLabel
169        %110 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
170        %111 = OpLoad %v4float %110
171               OpStore %105 %111
172               OpBranch %109
173        %108 = OpLabel
174        %112 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
175        %114 = OpLoad %v4float %112
176               OpStore %105 %114
177               OpBranch %109
178        %109 = OpLabel
179        %115 = OpLoad %v4float %105
180               OpReturnValue %115
181               OpFunctionEnd
182