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