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