xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/FloatBitsToInt.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 "testMatrix2x2"
9               OpMemberName %_UniformBuffer 1 "colorGreen"
10               OpMemberName %_UniformBuffer 2 "colorRed"
11               OpName %_entrypoint_v "_entrypoint_v"
12               OpName %main "main"
13               OpName %inputVal "inputVal"
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 ColMajor
19               OpMemberDecorate %_UniformBuffer 0 MatrixStride 16
20               OpMemberDecorate %_UniformBuffer 1 Offset 32
21               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
22               OpMemberDecorate %_UniformBuffer 2 Offset 48
23               OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
24               OpDecorate %_UniformBuffer Block
25               OpDecorate %7 Binding 0
26               OpDecorate %7 DescriptorSet 0
27               OpDecorate %86 RelaxedPrecision
28               OpDecorate %89 RelaxedPrecision
29               OpDecorate %90 RelaxedPrecision
30      %float = OpTypeFloat 32
31    %v4float = OpTypeVector %float 4
32%_ptr_Output_v4float = OpTypePointer Output %v4float
33%sk_FragColor = OpVariable %_ptr_Output_v4float Output
34    %v2float = OpTypeVector %float 2
35%mat2v2float = OpTypeMatrix %v2float 2
36%_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float
37%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
38          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
39       %void = OpTypeVoid
40         %14 = OpTypeFunction %void
41    %float_0 = OpConstant %float 0
42         %17 = OpConstantComposite %v2float %float_0 %float_0
43%_ptr_Function_v2float = OpTypePointer Function %v2float
44         %21 = OpTypeFunction %v4float %_ptr_Function_v2float
45%_ptr_Function_v4float = OpTypePointer Function %v4float
46%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
47        %int = OpTypeInt 32 1
48      %int_0 = OpConstant %int 0
49    %float_1 = OpConstant %float 1
50   %float_n1 = OpConstant %float -1
51         %38 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1
52       %bool = OpTypeBool
53      %false = OpConstantFalse %bool
54%int_1065353216 = OpConstant %int 1065353216
55      %v2int = OpTypeVector %int 2
56%int_1073741824 = OpConstant %int 1073741824
57         %52 = OpConstantComposite %v2int %int_1065353216 %int_1073741824
58     %v2bool = OpTypeVector %bool 2
59    %v3float = OpTypeVector %float 3
60      %v3int = OpTypeVector %int 3
61%int_n1069547520 = OpConstant %int -1069547520
62         %64 = OpConstantComposite %v3int %int_1065353216 %int_1073741824 %int_n1069547520
63     %v3bool = OpTypeVector %bool 3
64      %v4int = OpTypeVector %int 4
65%int_n1065353216 = OpConstant %int -1065353216
66         %74 = OpConstantComposite %v4int %int_1065353216 %int_1073741824 %int_n1069547520 %int_n1065353216
67     %v4bool = OpTypeVector %bool 4
68%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
69      %int_1 = OpConstant %int 1
70      %int_2 = OpConstant %int 2
71%_entrypoint_v = OpFunction %void None %14
72         %15 = OpLabel
73         %18 = OpVariable %_ptr_Function_v2float Function
74               OpStore %18 %17
75         %20 = OpFunctionCall %v4float %main %18
76               OpStore %sk_FragColor %20
77               OpReturn
78               OpFunctionEnd
79       %main = OpFunction %v4float None %21
80         %22 = OpFunctionParameter %_ptr_Function_v2float
81         %23 = OpLabel
82   %inputVal = OpVariable %_ptr_Function_v4float Function
83         %79 = OpVariable %_ptr_Function_v4float Function
84         %26 = OpAccessChain %_ptr_Uniform_mat2v2float %7 %int_0
85         %30 = OpLoad %mat2v2float %26
86         %31 = OpCompositeExtract %float %30 0 0
87         %32 = OpCompositeExtract %float %30 0 1
88         %33 = OpCompositeExtract %float %30 1 0
89         %34 = OpCompositeExtract %float %30 1 1
90         %35 = OpCompositeConstruct %v4float %31 %32 %33 %34
91         %39 = OpFMul %v4float %35 %38
92               OpStore %inputVal %39
93         %43 = OpCompositeExtract %float %39 0
94         %42 = OpBitcast %int %43
95         %45 = OpIEqual %bool %42 %int_1065353216
96               OpSelectionMerge %47 None
97               OpBranchConditional %45 %46 %47
98         %46 = OpLabel
99         %49 = OpVectorShuffle %v2float %39 %39 0 1
100         %48 = OpBitcast %v2int %49
101         %53 = OpIEqual %v2bool %48 %52
102         %55 = OpAll %bool %53
103               OpBranch %47
104         %47 = OpLabel
105         %56 = OpPhi %bool %false %23 %55 %46
106               OpSelectionMerge %58 None
107               OpBranchConditional %56 %57 %58
108         %57 = OpLabel
109         %60 = OpVectorShuffle %v3float %39 %39 0 1 2
110         %59 = OpBitcast %v3int %60
111         %65 = OpIEqual %v3bool %59 %64
112         %67 = OpAll %bool %65
113               OpBranch %58
114         %58 = OpLabel
115         %68 = OpPhi %bool %false %47 %67 %57
116               OpSelectionMerge %70 None
117               OpBranchConditional %68 %69 %70
118         %69 = OpLabel
119         %71 = OpBitcast %v4int %39
120         %75 = OpIEqual %v4bool %71 %74
121         %77 = OpAll %bool %75
122               OpBranch %70
123         %70 = OpLabel
124         %78 = OpPhi %bool %false %58 %77 %69
125               OpSelectionMerge %82 None
126               OpBranchConditional %78 %80 %81
127         %80 = OpLabel
128         %83 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
129         %86 = OpLoad %v4float %83
130               OpStore %79 %86
131               OpBranch %82
132         %81 = OpLabel
133         %87 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
134         %89 = OpLoad %v4float %87
135               OpStore %79 %89
136               OpBranch %82
137         %82 = OpLabel
138         %90 = OpLoad %v4float %79
139               OpReturnValue %90
140               OpFunctionEnd
141