mesa/src/util
Eric Anholt 8bd91d1368 util: Fix big-endian handling of z/s formats.
channel datatypes in Mesa are the host's endianness.  For example,
PIPE_FORMAT_R32_UINT doesn't do a bswap in and out in u_format_table.c's
pack/unpack functions.  So, z32_unorm shouldn't be byte swapping either,
and neither should z24s8 which is also a packed format, and once you've
got those it becomes clear that all of the swaps in this file were
mistaken.

Things would mostly work out because it's unusual to read/write Z/S data
through the GL API, and even for drivers like softpipe as long as the pack
and unpack both swap it could work anyway.  However, the bug would be
visible in glReadPixels() with the matching datatype which would hit the
memcpy fastpath without doing another swap.

Caught by a mesa/main unit test on transitioning to using these
pack/unpack functions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
2021-04-21 19:59:10 +00:00
..
format util: Fix big-endian handling of z/s formats. 2021-04-21 19:59:10 +00:00
sha1
tests util: Switch the non-block formats to unpacking rgba rows instead of rects. 2021-04-19 17:59:44 +00:00
00-mesa-defaults.conf Revert "radeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it" 2021-04-20 17:42:21 +00:00
Android.mk util/format: Add some NEON intrinsics-based u_format_unpack. 2021-04-19 17:59:44 +00:00
anon_file.c
anon_file.h
bigmath.h
bitscan.c
bitscan.h util/bitscan: add u_foreach_bit macros 2021-02-24 17:11:44 +00:00
bitset.h nir: add many passes that lower and optimize 16-bit input/outputs and samplers 2021-04-13 05:07:42 +00:00
bitset_test.cpp
blob.c
blob.h
blob_test.c
build_id.c
build_id.h
cnd_monotonic.h util,radv: Cross-platform monotonic condition variable 2020-11-26 07:58:56 +00:00
compiler.h util: Disable [[fallthrough]] for C17 2020-12-02 19:35:59 +00:00
compress.c meson, util: Make zlib optional again 2021-03-19 19:33:59 +00:00
compress.h meson, util: Make zlib optional again 2021-03-19 19:33:59 +00:00
crc32.c
crc32.h
dag.c
dag.h
debug.c
debug.h Revert "util: Add helpers for various one-time-init patters" 2020-11-25 09:44:11 +00:00
detect_os.h
disk_cache.c util/disk_cache: make MESA_DISK_CACHE_READ_ONLY_FOZ_DBS a relative path 2021-03-04 04:07:46 +00:00
disk_cache.h util/disk_cache: use a new cache dir for the single file cache feature 2021-02-21 02:50:45 +00:00
disk_cache_os.c util/disk_cache: add cache item headers to single file cache entries 2021-03-16 23:37:48 +00:00
disk_cache_os.h util/disk_cache: make MESA_DISK_CACHE_READ_ONLY_FOZ_DBS a relative path 2021-03-04 04:07:46 +00:00
double.c
double.h
driconf.h st/nine: Default tearfree_discard to true 2021-04-14 08:33:14 +00:00
driconf_static.py driconf: avoid Non-ASCII character error in driconf_static.py 2021-03-01 20:52:28 +00:00
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 util/fossilize_db: remove compression from foz db helper 2021-03-15 03:34:48 +00:00
fossilize_db.h util/fossilize_db: remove compression from foz db helper 2021-03-15 03:34:48 +00:00
futex.h
half_float.c
half_float.h util: Add accessor for util_cpu_caps 2021-02-26 18:31:19 +00:00
hash_table.c util/hash_table: add macro for destructively iterating entries 2021-04-07 22:57:27 +00:00
hash_table.h util/hash_table: add macro for destructively iterating entries 2021-04-07 22:57:27 +00:00
libsync.h android: Add pre-4.7 Android kernel compatibility to our libsync header. 2020-10-19 18:41:50 +00:00
list.h util/list: use helper function in list_is_singular 2020-12-18 01:46:00 +00:00
log.c
log.h
macros.h macros: Add thread-safety annotation macros 2021-02-18 00:27:49 +00:00
Makefile.sources android: util: create some standalone compression helpers 2021-03-18 01:31:31 +00:00
memstream.c util: Disable memstream for Apple builds 2021-01-08 09:37:14 +00:00
memstream.h
mesa-sha1.c util/mesa_sha1: add helper to reconvert sha1 hex strings 2021-02-21 02:50:45 +00:00
mesa-sha1.h util/mesa_sha1: add helper to reconvert sha1 hex strings 2021-02-21 02:50:45 +00:00
mesa-sha1_test.c
meson.build util: create some standalone compression helpers 2021-03-15 03:34:48 +00:00
os_file.c util: Make os_read_file use O_BINARY on Windows 2021-03-11 23:43:47 +00:00
os_file.h util: Make os_read_file use O_BINARY on Windows 2021-03-11 23:43:47 +00:00
os_memory.h Fix VMware capitalization. 2020-10-27 15:33:40 -07:00
os_memory_aligned.h
os_memory_debug.h
os_memory_stdc.h
os_misc.c util: Remove unused Android options_tbl_lock 2021-04-15 16:01:21 +00:00
os_misc.h util: Add os_get_page_size query 2020-12-02 10:12:27 -08:00
os_socket.c
os_socket.h
os_time.c util/os_time: Safe os_time_get_nano for Windows 2020-11-26 07:58:56 +00:00
os_time.h util: Add os_localtime 2020-12-01 07:11:44 +00:00
process_test.c util/u_process: implement util_get_process_name for Windows 2020-11-12 11:49:12 +00:00
ralloc.c
ralloc.h
rand_xor.c
rand_xor.h
rb_tree.c
rb_tree.h
rb_tree_test.c
register_allocate.c
register_allocate.h
rgtc.c
rgtc.h
roundeven_test.c
rounding.h util: When building 'ARM64EC', don't use x64 intrinsics which need to be emulated 2021-01-22 17:56:08 +00:00
rwlock.h util: Fix rwlock Windows include for MinGW 2020-10-20 08:33:42 +00:00
set.c util/set: add macro for destructively iterating set entries 2021-04-07 22:57:27 +00:00
set.h util/set: add macro for destructively iterating set entries 2021-04-07 22:57:27 +00:00
simple_list.h
simple_mtx.h util: Add helgrind support for simple_mtx 2020-11-24 21:03:34 +00:00
slab.c util/slab: do not dereference NULL-pointer 2020-12-01 18:03:31 +00:00
slab.h util/slab: allow usage from c++ code 2020-11-10 15:37:07 +00:00
softfloat.c softfloat: Silence a warning at -Og 2021-02-18 20:59:43 +00:00
softfloat.h
sparse_array.c
sparse_array.h
string_buffer.c
string_buffer.h
strndup.h
strtod.c
strtod.h
texcompress_rgtc_tmp.h
timespec.h lavapipe: fix usleep usage in lvp_device 2020-10-27 21:05:55 +00:00
u_atomic.c
u_atomic.h util: Use explicit relaxed reads for u_queue 2021-01-28 18:07:09 +00:00
u_atomic_test.c
u_cpu_detect.c util: rework AMD cpu L3 cache affinity code. 2021-03-29 08:31:09 +00:00
u_cpu_detect.h st/glthread: allow for invalid L3 cache id. 2021-03-29 08:31:09 +00:00
u_debug.c util: add a env getter for versions 2020-11-11 06:08:15 +10:00
u_debug.h util: Add helper to get FILE* options 2020-12-03 21:19:57 +00:00
u_debug_memory.c
u_debug_stack.c util: Fix pointer to integer conversion error when using libunwind 2021-01-15 20:00:20 +00:00
u_debug_stack.h
u_debug_stack_android.cpp
u_debug_stack_test.cpp
u_debug_symbol.c
u_debug_symbol.h
u_drm.h
u_dynarray.h
u_endian.h
u_idalloc.c
u_idalloc.h
u_math.c util: Add accessor for util_cpu_caps 2021-02-26 18:31:19 +00:00
u_math.h mesa: Undefine ALIGN macro before it is used as a function name. Issues on MacOS. 2020-11-11 09:09:45 +00:00
u_memory.h
u_memset.h util: add optimised memset64 2021-02-22 00:30:46 +00:00
u_mm.c
u_mm.h
u_printf.cpp util: add printf specifier shared helper code. 2020-12-29 09:07:23 +10:00
u_printf.h util: add printf specifier shared helper code. 2020-12-29 09:07:23 +10:00
u_process.c util: implement GET_PROGRAM_NAME for Haiku 2021-01-09 20:51:03 -06:00
u_process.h
u_queue.c util: Always use timespec_get on Windows. 2021-03-02 14:37:46 +00:00
u_queue.h util: Use explicit relaxed reads for u_queue 2021-01-28 18:07:09 +00:00
u_string.h util: fix gcc vsnprintf overflow 2021-02-19 11:05:38 +00:00
u_thread.h util: Extract thread-id helpers from u_current 2021-03-11 04:42:15 +00:00
u_vector.c
u_vector.h util: Promote __builtin_types_compatible_p compat 2020-12-10 16:48:36 +00:00
vma.c
vma.h
xmlconfig.c xmlconfig: Fix MSVC warning C4334 (32bit shift cast to 64bit) 2021-04-20 00:28:35 +00:00
xmlconfig.h xmlconfig: Disable WITH_XMLCONFIG on Windows 2020-12-14 17:28:04 +00:00
xxd.py
xxhash.h xxhash: update fallthrough comments 2020-12-01 10:04:41 +01:00