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