Lines Matching +full:intel +full:- +full:ui
2 * Mesa 3-D graphics library
4 * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
7 * Copyright (C) 2018-2019 Intel Corporation
39 * Convert a 4-byte float to a 2-byte half float.
47 * - It has no sign bias.
49 * - It reproduces the behavior of real hardware: opcode F32TO16 in Intel's
52 * - By reproducing the behavior of the GPU (at least on Intel hardware),
53 * compile-time evaluation of constant packHalf2x16 GLSL expressions will
72 /* m = 0; - already set */ in _mesa_float_to_half_slow()
76 /* denorm -- denorm float maps to 0 half */ in _mesa_float_to_half_slow()
77 /* m = 0; - already set */ in _mesa_float_to_half_slow()
82 /* m = 0; - already set */ in _mesa_float_to_half_slow()
96 const int new_exp = flt_e - 127; in _mesa_float_to_half_slow()
97 if (new_exp < -14) { in _mesa_float_to_half_slow()
107 /* m = 0; - already set */ in _mesa_float_to_half_slow()
142 * Convert a 2-byte half float to a 4-byte float.
153 infnan.ui = 0x8f << 23; in _mesa_half_to_float_slow()
155 magic.ui = 0xef << 23; in _mesa_half_to_float_slow()
158 f32.ui = (val & 0x7fff) << 13; in _mesa_half_to_float_slow()
166 f32.ui |= 0xff << 23; in _mesa_half_to_float_slow()
169 f32.ui |= (uint32_t)(val & 0x8000) << 16; in _mesa_half_to_float_slow()
175 * Takes a uint16_t, divides by 65536, converts the infinite-precision
176 * result to fp16 with round-to-zero. Used by the ASTC decoder.
186 int n = __builtin_clz(v) - 16; in _mesa_uint16_div_64k_to_half()
189 for (int i = 15; i >= 0; i--) { in _mesa_uint16_div_64k_to_half()
191 n = 15 - i; in _mesa_uint16_div_64k_to_half()
202 /* (0{n} 1 X{15-n}) * 2^-16 in _mesa_uint16_div_64k_to_half()
203 * = 1.X * 2^(15-n-16) in _mesa_uint16_div_64k_to_half()
204 * = 1.X * 2^(14-n - 15) in _mesa_uint16_div_64k_to_half()
205 * which is the FP16 form with e = 14 - n in _mesa_uint16_div_64k_to_half()
207 int e = 14 - n; in _mesa_uint16_div_64k_to_half()