Files
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
..
2019-08-08 22:02:54 +01:00
2019-09-19 19:56:22 +00:00
2020-09-25 20:09:08 +00:00
2020-08-31 09:14:57 +00:00
2020-10-27 15:33:40 -07:00
2020-12-02 10:12:27 -08:00
2020-12-01 07:11:44 +00:00
2020-08-21 18:22:21 +00:00
2020-11-10 15:37:07 +00:00
2020-11-11 06:08:15 +10:00
2021-02-26 18:31:19 +00:00
2021-02-22 00:30:46 +00:00
2021-02-19 11:05:38 +00:00
2020-05-13 23:36:44 +00:00
2020-05-13 23:36:44 +00:00
2020-12-01 10:04:41 +01:00