mesa/src
Eric R. Smith 4d298673da get_color_read_type: make sure format/type combo is legal for gles
The GLES spec limits the valid combinations of format and type that
may be returned by queries and/or used by ReadPixel. The list of valid
combinations appears in table 8.2 of the GLES 3.2 spec. Our code for
reporting the type and format of the current framebuffer, however,
does not verify that the combination is legal for GLES. For example,
RGBA and UNSIGNED_SHORT_1_5_5_5_REV is not a valid GLES combination,
but it's what we were returning for a panthor 16 bit frame buffer.

We can fix this either by changing the format or type that we return
(internally we can handle any format/type combination). We advertise the
read_format_bgra extension, so we could return GL_BGRA for the format.
However, very few applications (including notably the Khronos CTS for GLES)
cope well with BGRA. So instead we change the type to a non-_REV one
so that the combination appears in the GLES spec table of legal values.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29144>
2024-05-23 15:04:30 +00:00
..
amd radv: fix setting a custom pitch for CB on GFX10_3+ 2024-05-23 06:10:07 +00:00
android_stub vulkan/android: Add helper to probe AHB support 2024-05-14 14:53:44 +00:00
asahi asahi: unify naming for COUNTS structs 2024-05-16 13:25:56 -04:00
broadcom v3dv/ci: Add more dEQP-VK subgroups that are currently skipped 2024-05-23 11:55:26 +02:00
c11
compiler nir/opt_varyings: Don't promote flat inputs when moving post-dominator. 2024-05-23 13:14:46 +00:00
drm-shim drm-shim: Stub syncobj reset ioctl 2024-05-21 14:14:25 +00:00
egl egl/android: Fix sRGB visuals 2024-05-21 11:57:55 +00:00
etnaviv ci/etnaviv: add flakes from nightly runs 2024-05-17 19:29:40 +00:00
freedreno turnip/ci: add vkcts jobs on the a750 2024-05-23 06:58:01 +00:00
gallium Uprev Piglit to e180f96239edba441f22f58dfc852cafb902844a 2024-05-23 14:04:22 +00:00
gbm loader: silence implicit-load zink error by the loader 2024-05-10 14:19:59 +00:00
getopt
glx glxext: don't try zink if not enabled in mesa 2024-05-13 08:34:57 +00:00
gtest
imagination pvr: use common stype debug 2024-05-10 18:49:38 +00:00
imgui
intel anv: Attempt to compile all pipelines even after errors 2024-05-22 17:46:34 +00:00
loader loader: silence implicit-load zink error by the loader 2024-05-10 14:19:59 +00:00
mapi glapi: fix param type in TexGenxOES 2024-05-01 00:47:59 +02:00
mesa get_color_read_type: make sure format/type combo is legal for gles 2024-05-23 15:04:30 +00:00
microsoft microsoft/clc: fix incorrect changes that got through while the Windows CI was down 2024-05-10 20:52:21 +00:00
nouveau nvk/ci: mark the job as failing in case of hangs, instead of silently rebooting 2024-05-23 10:48:19 +00:00
panfrost panfrost: untangle faces from layers 2024-05-23 10:18:07 +00:00
tool pps: Config tweaks to avoid loosing traces 2024-03-25 19:49:50 +00:00
util meson: use glslang --depfile argument when possible 2024-05-20 17:34:17 +00:00
virtio venus: enable VK_KHR_maintenance5 2024-05-22 18:15:34 +00:00
vulkan wsi/wayland: Fix use after free from improperly stored VkAllocationCallbacks 2024-05-21 21:01:25 +00:00
.clang-format asahi: add agx_ppp_push_merged helper 2024-05-14 04:57:27 +00:00
meson.build loader/wayland: Add fallback wl_display_dispatch_queue_timeout 2024-02-27 13:10:13 +00:00