mesa/src/util
Iván Briano 8382ee6e23 util: add double_to_float16 helpers
We convert from doubles to half by going through float in between, but
as noted in the comment in this commit, that can give wrong results in
some cases.

Add some helpers to ensure correct results based on rounding mode that
will be used in the next commit.

v2: Use fi/di from u_math.h (Ian)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25281>
2023-10-09 23:37:52 +00:00
..
blake3 util: Blake3 - Identify arm64ec as aarch64 instead of x64 2023-07-13 15:30:39 +00:00
format aux/trace: add context video methods 2023-08-16 00:11:30 +00:00
perf util/u_trace: count number of tracepoints 2023-09-25 13:05:45 +00:00
sha1
tests util: Avoid waste space when linear alloc'ing large sizes 2023-10-08 00:55:20 +00:00
tools
u_gralloc u_gralloc: Add a function that returns gralloc type 2023-09-21 10:50:34 +00:00
00-mesa-defaults.conf drirc: remove Path of Exile workarounds 2023-09-19 07:53:51 +00:00
00-radv-defaults.conf radv: remove drirc workarounds for Path Of Exile 2023-09-19 07:53:51 +00:00
anon_file.c
anon_file.h
bigmath.h
bitpack_helpers.h
bitscan.c
bitscan.h util: use uint32_t instead of unsigned in bitscan.h 2023-06-29 00:45:30 +00:00
bitset.h util/bitset: Add some extra functions 2023-07-03 19:51:04 +00:00
blend.h util/blend: Add helpers for normalizing inverts 2023-07-13 21:03:32 +00:00
blob.c
blob.h
build_id.c
build_id.h
cnd_monotonic.h
compiler.h util: Merge p_compiler.h into src/util/compiler.h 2023-06-27 18:18:30 +08:00
compress.c
compress.h
crc32.c
crc32.h
dag.c
dag.h
dbghelp.h util: Move u_pack_color.h and dbughelp.h into src/util from/src/gallium/auxiliary/util/ 2023-08-02 03:41:24 +00:00
detect.h
detect_arch.h
detect_cc.h
detect_os.h
disk_cache.c util: Decouple disk cache from EGL_ANDROID_blob_cache 2023-08-23 00:04:16 +00:00
disk_cache.h
disk_cache_os.c util: Decouple disk cache from EGL_ANDROID_blob_cache 2023-08-23 00:04:16 +00:00
disk_cache_os.h
double.c
double.h util: add double_to_float16 helpers 2023-10-09 23:37:52 +00:00
driconf.h tu,util/driconf: Add option to not reserve descriptor set 2023-10-07 18:15:02 +00:00
driconf_static.py
enum_operators.h
fast_idiv_by_const.c
fast_idiv_by_const.h
fast_urem_by_const.h
format_r11g11b10f.h
format_rgb9e5.h
format_srgb.h
format_srgb.py
fossilize_db.c
fossilize_db.h
futex.c
futex.h
glheader.h
glsl2spirv.py
half_float.c
half_float.h util: Do not include immintrin.h in half_float.h 2023-06-28 18:56:20 +00:00
hash_table.c
hash_table.h
hex.h
libdrm.h
libsync.h
list.h
log.c
log.h util: Add more PRINTFLIKE and MALLOCLIKE annotations 2023-09-22 10:47:33 -07:00
macros.h util: Deduplicate macros between u_math.h and macros.h 2023-10-09 16:25:34 +08:00
memstream.c
memstream.h
mesa-blake3.c
mesa-blake3.h
mesa-sha1.c
mesa-sha1.h
mesa_cache_db.c
mesa_cache_db.h
mesa_cache_db_multipart.c
mesa_cache_db_multipart.h
meson.build util: Add a few basic tests for linear_alloc 2023-09-25 17:26:17 +00:00
os_file.c
os_file.h
os_memory.h
os_memory_aligned.h
os_memory_debug.h
os_memory_fd.c
os_memory_fd.h
os_memory_stdc.h
os_misc.c
os_misc.h
os_mman.h
os_socket.c
os_socket.h
os_time.c
os_time.h
ptralloc.h
ralloc.c util: Avoid waste space when linear alloc'ing large sizes 2023-10-08 00:55:20 +00:00
ralloc.h util: Add function print information about a ralloc tree 2023-10-07 01:34:13 +00:00
rand_xor.c
rand_xor.h
rb_tree.c util/rb-tree: Inline rb_tree_init 2023-09-14 22:31:22 +00:00
rb_tree.h util/rb-tree: Inline rb_tree_init 2023-09-14 22:31:22 +00:00
reallocarray.h
register_allocate.c util: Do not use align64 over unsigned int in register_allocate.c 2023-06-29 00:45:31 +00:00
register_allocate.h
register_allocate_internal.h
rgtc.c
rgtc.h
rounding.h
rwlock.c
rwlock.h
set.c
set.h
simple_mtx.c
simple_mtx.h
slab.c
slab.h
softfloat.c
softfloat.h
sparse_array.c
sparse_array.h
streaming-load-memcpy.c
streaming-load-memcpy.h
string_buffer.c
string_buffer.h util: Add more PRINTFLIKE and MALLOCLIKE annotations 2023-09-22 10:47:33 -07:00
strndup.h
strtod.c
strtod.h
texcompress_rgtc_tmp.h
timespec.h
u_atomic.c
u_atomic.h
u_call_once.c
u_call_once.h
u_cpu_detect.c util/u_cpu_detect: Detect clflushopt support 2023-09-06 01:39:53 +00:00
u_cpu_detect.h util/u_cpu_detect: Detect clflushopt support 2023-09-06 01:39:53 +00:00
u_debug.c
u_debug.h
u_debug_memory.c
u_debug_stack.c
u_debug_stack.h
u_debug_stack_android.cpp
u_debug_symbol.c util: include "util/compiler.h" instead of "pipe/p_compiler.h" 2023-06-27 18:18:30 +08:00
u_debug_symbol.h
u_dl.c
u_dl.h
u_drm.h
u_dynarray.c
u_dynarray.h
u_endian.h
u_hash_table.c
u_hash_table.h util: Remove include "pipe/*.h" in src/util/* files 2023-08-02 03:41:24 +00:00
u_hexdump.h
u_idalloc.c
u_idalloc.h
u_math.c
u_math.h util: Deduplicate macros between u_math.h and macros.h 2023-10-09 16:25:34 +08:00
u_memory.h
u_memset.h
u_mm.c
u_mm.h
u_pack_color.h util: Move u_pack_color.h and dbughelp.h into src/util from/src/gallium/auxiliary/util/ 2023-08-02 03:41:24 +00:00
u_pointer.h
u_printf.c
u_printf.h
u_process.c
u_process.h
u_qsort.cpp
u_qsort.h
u_queue.c util/u_queue: always enable UTIL_QUEUE_INIT_SCALE_THREADS, remove the flag 2023-07-18 11:11:12 -04:00
u_queue.h util/u_queue: always enable UTIL_QUEUE_INIT_SCALE_THREADS, remove the flag 2023-07-18 11:11:12 -04:00
u_string.h util: Add more PRINTFLIKE and MALLOCLIKE annotations 2023-09-22 10:47:33 -07:00
u_thread.c
u_thread.h
u_vector.c util: Replace the usage of redundant u_align_u32 with align and remove u_align_u32 2023-06-29 00:45:30 +00:00
u_vector.h util: Replace the usage of redundant u_align_u32 with align and remove u_align_u32 2023-06-29 00:45:30 +00:00
u_worklist.c
u_worklist.h
vl_rbsp.h
vl_vlc.h util/vl_vlc: Use UINT64_MAX instead of ~0UL with MSVC compiler 2023-09-06 20:47:20 +00:00
vl_zscan_data.c util/vl: extract gallium vl scanning data to shared code 2023-08-25 03:08:13 +00:00
vl_zscan_data.h util/vl: extract gallium vl scanning data to shared code 2023-08-25 03:08:13 +00:00
vma.c util/vma: Allow initializing zero-size heaps 2023-08-04 21:32:00 +00:00
vma.h
xmlconfig.c
xmlconfig.h
xxd.py
xxhash.h