mesa/src
Eric Anholt 75c601b6cf mesa: Refactor the entirety of _mesa_format_matches_format_and_type().
This function was difficult to implement for new formats due to the
combination of endianness and swapbytes support.  Since it's mostly
used for fast paths, bugs in it were often missed during testing.

Just reimplement it on top of the recent
_mesa_format_from_format_and_type() which can give us a canonical
MESA_FORMAT for a format and type enum (while respecting endianness).

Fixes:
- R4G4B4A4_UNORM, B4G4R4_UINT, R4G4B4A4_UINT incorrectly matched with
  swapBytes (you can't just reverse the channels if the channels
  aren't bytes)
- A4R4G4B4_UNORM and A4R4G4B4_UINT missing BGRA/4444_REV matches
- failing to match RGB/BGR unorm8 array formats on BE
- 2101010 formats incorrectly matching with swapBytes set.
- UINT/SINT byte formats failed to match with swapBytes set.

This deletes the part of tests/mesa_formats.cpp that called
_mesa_format_matches_format_and_type() to make sure it didn't
assertion fail, as it now would assertion fail due to the fact that we
were passing an invalid format (GL_RG) for most types.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-17 21:07:29 +00:00
..
amd aco: don't combine minmax3 if there is a neg or abs modifier in between 2019-10-17 16:21:19 +00:00
broadcom v3d: do not report alpha-test as supported 2019-10-17 10:41:36 +02:00
compiler freedreno/ir3: Implement lowering passes for VS and GS 2019-10-17 13:43:53 -07:00
drm-shim meson: replace libmesa_util with idep_mesautil 2019-08-03 00:08:37 +00:00
egl egl: Configs w/o double buffering support have no EGL_WINDOW_BIT. 2019-10-11 21:57:21 +00:00
etnaviv etnaviv: Add valgrind support 2019-08-14 10:36:20 +02:00
freedreno freedreno/a6xx: Implement PIPE_QUERY_PRIMITIVES_GENERATED for GS 2019-10-17 13:43:53 -07:00
gallium freedreno/a6xx: Turn on geometry shaders 2019-10-17 13:45:03 -07:00
gbm gbm: use size_t for array indexes 2019-10-13 18:10:47 +01:00
getopt meson: build getopt when using msvc 2019-09-10 20:36:47 +00:00
glx dri: Avoid swapbuffer throttling in glXCopySubBufferMESA 2019-10-05 13:19:37 +00:00
gtest
hgl haiku: fix Mesa build 2019-10-01 10:31:02 +00:00
imgui imgui: bump imgui memory editor copy 2019-06-18 15:34:13 +00:00
intel intel/fs/gen12: Add tests for scoreboard pass 2019-10-17 10:02:35 -07:00
loader loader: Simplify handling of the radeonsi driver 2019-10-08 09:02:34 +00:00
mapi meson: maintain names of shared API libraries 2019-10-10 16:33:04 -07:00
mesa mesa: Refactor the entirety of _mesa_format_matches_format_and_type(). 2019-10-17 21:07:29 +00:00
panfrost panfrost: do not report alpha-test as supported 2019-10-17 10:41:36 +02:00
util util/u_atomic: fix return type of p_atomic_{inc,dec}_return() and p_atomic_{cmp,}xchg() 2019-10-16 19:41:47 +01:00
vulkan vulkan: Update the XML and headers to 1.1.125 2019-10-14 08:23:27 -07:00
meson.build meson: rename glvnd_missing_pc_files to not glvnd_has_headers_and_pc_files 2019-10-10 22:18:04 +01:00
SConscript