4
0
mirror of https://github.com/revyos-package/mesa.git synced 2026-04-28 09:13:36 +00:00
Commit Graph

183884 Commits

Author SHA1 Message Date
Han Gao
6a19102db7 debian/changelog: update changelog
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-24 01:49:29 +08:00
Han Gao
788bd17909 debian/rules: enable llvmpipe on riscv64
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-24 01:49:29 +08:00
Han Gao
25bcb39838 debian/patches: fix crlf in patch
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-24 01:49:29 +08:00
Han Gao
991cfb38fa debian/patches: update patchset & add llvmpipe support
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-24 01:34:55 +08:00
Han Gao
5ee8c01994 debian/changelog: update changelog
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-18 23:52:06 +08:00
Han Gao
acb4d2afd2 debian/symbols: update symbols for pvr support
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-18 23:52:06 +08:00
Han Gao
17e60702f4 debian/install: add pvr file
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-18 23:52:06 +08:00
Han Gao
cdace5cf8b debian/control: add spirv-tools dep
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-18 23:52:06 +08:00
Han Gao
28b142b792 debian/rules: remove epoch
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-18 23:52:06 +08:00
Han Gao
ccc21716f8 debian/rules: add pvr support
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-18 23:52:06 +08:00
Han Gao
bc4cd3ada1 debian/patches: fix crlf in patch
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-18 23:52:06 +08:00
Han Gao
47c01ad100 debian/patches: add pvr support
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-18 23:38:40 +08:00
Han Gao
d31a7fa117 debian/patches: remove old patchset
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-12 23:26:10 +08:00
Han Gao
8a398b42f4 debian: modify gbp.conf for revyos
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-12 23:10:24 +08:00
Han Gao
3a50b131c7 debian: sync debian dir
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-12 23:07:37 +08:00
Eric Engestrom
839270df1c VERSION: bump for 24.0.9 2024-06-06 20:57:27 +02:00
Eric Engestrom
f791ff0ac0 docs: add release notes for 24.0.9 2024-06-06 20:56:57 +02:00
Juan A. Suarez Romero
bbea9bf21e ci: define SNMP base interface on runner
In order to turn on/off through SNMP DuT under PoE switch, the SNMP key
in some vendors don't directly use the interface number, but a number
shifted a base number.

Define this base number as BM_POE_BASE environment in the runner.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29306>
(cherry picked from commit 90f8be9bda9b3841c41f48414897d89ebbceb43b)
2024-05-31 18:06:24 +02:00
Karol Herbst
79c30d20f7 rusticl/event: fix deadlock when calling clGetEventProfilingInfo inside callbacks
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11243
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29483>
(cherry picked from commit 6f713a764fb412567caaabd9ae574822e79da383)
2024-05-31 15:32:54 +02:00
Jose Maria Casanova Crespo
9b6e18a19d v3d: really fix CLE MMU errors on 7.1HW Rpi5
Macro values that define values for different HW generations should
use the V3DV_X helper instead of being defined under a V3D_VERSION #if
condition.

Without this change, the original V3D_CLE_READAHEAD and
V3D_CLE_BUFFER_MIN_SIZE definitions used were only working for 4.2 HW.
For the 7.1 HW (RPi5) the 4.2 definitions were applied.

The CLE MMU errors were hidden as they were reported at dmesg as
"MMU error from client PTB (1) at 0x1884200, pte invalid" instead of
client CLE. So fixes all v3d dmesg warnings for PTB MMU errors on RPi5.

With this change we really don't need different functions per HW generation,
so we rename back file v3dx_cl.c to v3d_cl.c. As before, we can use
only the packets definitions for 4.2 HW as they use the same opcode as 7.1 HW.

Fixes: 11dce2ac815 ("v3d: fix CLE MMU errors avoiding using last bytes of CL BOs.")
Fixes: e2c624e74e3 ("v3d: Increase alignment to 16k on CL BO on RPi5")

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29496>
(cherry picked from commit f32a258503b40e8e19a1498998b0d4f8b8abb488)
2024-05-31 15:31:35 +02:00
Jose Maria Casanova Crespo
175287f68d v3dv: really fix CLE MMU errors on 7.1HW Rpi5
Macro values that define values for different HW generations should
use the V3DV_X helper instead of being defined under a V3D_VERSION #if
condition.

Without this change, the original V3D_CLE_READAHEAD and
V3D_CLE_BUFFER_MIN_SIZE definitions used were only working for 4.2 HW.
For the 7.1 HW (RPi5) the 4.2 definitions were applied.

The CLE MMU errors were hidden as they were reported at dmesg as
"MMU error from client PTB (1) at 0x1884200, pte invalid" instead of
client CLE. So fixes all v3dv dmesg warnings for PTB MMU errors on RPi5.

With this change we really don't need different functions per HW generation,
so we rename back file v3dvx_cl.c to v3dv_cl.c. As before, we can use
only the packets definitions for 4.2 HW as they use the same opcode as 7.1 HW.

It fixes also an indentation error introduced with 26c8a5cd721.

Fixes: bb77ac983e4 ("v3dv: Increase alignment to 16k on CL BO on RPi5")
Fixes: 26c8a5cd721 ("v3dv: fix CLE MMU errors avoiding using last bytes of CL BOs.")

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29496>
(cherry picked from commit 07d3d557832a223c574aa205db3f4acfb04161ad)
2024-05-31 15:31:33 +02:00
Eric Engestrom
37e984121f .pick_status.json: Update to 6f713a764fb412567caaabd9ae574822e79da383 2024-05-31 15:31:24 +02:00
Eric Engestrom
ebe810542e panfrost/ci: add missing genxml trigger path
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29487>
(cherry picked from commit fbb306df155fab8882cd74ad7884931f8a42802c)
2024-05-31 15:30:20 +02:00
Eric Engestrom
c203e7f81d panfrost: mark tests as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29487>
(cherry picked from commit 3ec480825e6b0ab790773de96261f56f953f05e0)
2024-05-31 15:30:20 +02:00
Eric R. Smith
9499883916 panfrost: change default rounding mode for samplers
The SamplerDescriptor structure has a field which describes how
floating point coordinates should be converted to fixed point.
Setting this to "true" (which causes round to nearest even) fixes
a failing CTS test.

The CTS test in question is:
dEQP-GLES31.functional.texture.border_clamp.range_clamp.linear_float_color

The OpenGL spec is somewhat vague about how rounding is to be
performed, so it appears both settings should be legal; this may
indicate a problem with the CTS. Nevertheless "round to nearest even"
is probably a better default and since it fixes the failing test we
may as well use it.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29464>
(cherry picked from commit d91d2c275ef916e79e1e211cb1a86562d0e76f13)
2024-05-31 15:27:28 +02:00
Karol Herbst
6a75e40ae0 rusticl: link against libgalliumvl_stub
Fixes compiling rusticl with certain configurations

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
(cherry picked from commit 691a22f01505a2e858ba9fcd7c6a353e80355bce)
2024-05-31 15:27:24 +02:00
Karol Herbst
0134dcfedd meson: centralize galliumvl_stub handling
This way frontends can simply link against the stub, but get the full
version if it's actually required (e.g. for radeonsi).

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
(cherry picked from commit b6f281bcb5ee9e1ded5605a11244bd32bc08efb8)
2024-05-31 15:27:23 +02:00
Karol Herbst
a3c7f98c42 gallium/vl: remove stubs which are defined in mesa_util
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
(cherry picked from commit 6c9c48a3ae16a72d02b928b4346a53c56e43d597)
2024-05-31 15:27:12 +02:00
Karol Herbst
4ed7184aef gallium/vl: stub vl_video_buffer_create_as_resource
It's used by radeonsi

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
(cherry picked from commit 95871d48aadf4babf6b0106ff52c46b51a43b0c9)
2024-05-31 15:27:11 +02:00
Lionel Landwerlin
6b7a7dbee3 anv: fix timestamp copies from secondary buffers
We increased the size of the timestamps but only copied 64bit values
from the secondaries.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 521c216efc ("anv: use COMPUTE_WALKER post sync field to track compute work")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29438>
(cherry picked from commit 1d4e56d22a6525484a4e4593173febc93855b116)
2024-05-31 15:27:09 +02:00
Lionel Landwerlin
00f95905b2 anv: fix utrace compute walker timestamp captures
The output of the POSTSYNC_DATA has to be 32-byte aligned.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 521c216efc ("anv: use COMPUTE_WALKER post sync field to track compute work")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29438>
(cherry picked from commit 1511b25b0fae372f446185ebbd515e52a924c2cc)
2024-05-31 15:27:07 +02:00
Kevin Chuang
026c70ef16 anv: Properly fetch partial results in vkGetQueryPoolResults
Currently for an "unavailable" query, if VK_QUERY_RESULT_PARTIAL_BIT is
set, anv will return (slot.end - slot.begin). This can cause underflow
because slot.end might still be at the initial value of 0.

This commit fixes the issue by returning 0 in that situation.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29447>
(cherry picked from commit f8ccf70c99bc921e50306cd48c62c9a47a8beb70)
2024-05-31 15:27:04 +02:00
Eric Engestrom
786aefca89 freedreno/a6xx: fix kernel -> compute handling
9b2780dcaf folds the kernel path into the compute path, and then adds
a `compute -> compute` conversion that was very likely meant to be
`kernel -> compute`, so fix that.

Fixes: 9b2780dcaf ("freedreno/a6xx: Re-work fd6_emit_shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29458>
(cherry picked from commit b8f1e95cbe2b18e814252472a4e1407d7cb076af)
2024-05-31 15:27:02 +02:00
Samuel Pitoiset
794ef6632d radv: fix flushing DB meta cache on GFX11.5
Only GFX11 is affected by this hw bug.
Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29424>
(cherry picked from commit 07a826ba938ff40a07d19c31e75892bdfe2c68a1)
2024-05-31 15:24:53 +02:00
Iván Briano
464cab2e36 anv: check cmd_buffer is on a transfer queue more properly
The queueFlags of the associated queue may have more flags than just the
type of queue it is, based on what that queue supports, like sparse or
protected content. Check that the queue is a blitter engine instead.

Fixes a bunch of dEQP-VK.api.copy_and_blit.core.*_transfer on MTL with
ANV_SPARSE=0

Fixes: 17b8b2cffd ("anv: Add support for a transfer queue on Alchemist")

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29336>
(cherry picked from commit 8d098ecfea0fca662ece82f8162ea43991a4636d)
2024-05-31 15:22:27 +02:00
Eric R. Smith
7c74d46567 panfrost: fix some omissions in valhall flow control
The code for checking flow control did not realize that
`LD_TEX` and `LD_TEX_IMM` were memory accesses, and hence was
not inserting waits where these were necessary. This showed up
as flakes in KHR-GLES31.core.shader_image_load_store.basic-glsl-misc-fs

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29363>
(cherry picked from commit 272dcaff012caf9d61f51a9d37a43cd03b1d6b42)
2024-05-31 15:22:26 +02:00
Jose Maria Casanova Crespo
49e025a284 v3dv: Emit stencil draw clear if needed for GFXH-1461
Fixes: 1e81bb05ae (v3dv: implement workaround for GFXH-1461)
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29427>
(cherry picked from commit 4835dc0e7f303696a11ef37dde2ea72e89211bbe)
2024-05-31 15:22:24 +02:00
Iago Toral Quiroga
30d3f38af5 v3dv: fix incorrect index buffer size
When programming the size, we should take into account the
offset from the start of the index buffer address.

cc: mesa-stable

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29425>
(cherry picked from commit 70aa470bdbfbafb6a2baa8f601296eb5a544637c)
2024-05-31 15:21:55 +02:00
Tapani Pälli
0f175ffb04 anv/android: enable emulated astc for applications
This layer was blocking Android emulated ASTC support as it did not
take "emu_astc_ldr" in to account.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29415>
(cherry picked from commit 6836118cd28bf81021991e2356c6b8d455e7d726)
2024-05-31 15:21:52 +02:00
Yusuf Khan
8ab377326b zink/query: begin time elapsed queries even if we arent in a rp
If we arent in a renderpass, but still wanna start the time elapsed
query(eg. to figure out how long some random operation will take) then
this seems to fix that case.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29411>
(cherry picked from commit 42ee8d80d97b79e69c51582af3ae1ace2e49e0ce)
2024-05-31 15:21:23 +02:00
Rhys Perry
2863fb2bd6 radv: malloc graphics pipeline stages
This uses a lot of stack, which is apparently a problem for musl libc.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29379>
(cherry picked from commit c9f5152ddd5cee3c160cc52a4c748da1dd42883d)
2024-05-31 15:20:52 +02:00
David Rosca
55d807d3ec frontends/va: Fix leak when destroying VAEncCodedBufferType
Fixes: be4287c3aa ("pipe: Extend get_feedback with additional metadata")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29217>
(cherry picked from commit cc03f2ea5a414d5153a9d89ed017b79d3970e4e4)
2024-05-31 15:20:44 +02:00
Eric R. Smith
6b55807c40 glsl: test both inputs when sorting varyings for xfb
In the sort functions used to sort varyings in gl_nir_link_varyings,
we were only checking the first input for whether or not it is xfb.
Check both inputs, and also provide a definite order for the xfb vs.
non-xfb varyings (the xfb come last, as the initial sort established).

This fixes a problem encountered on panfrost, where qsort could
mix xfb and non-xfb varyings which started out separate.

Note that the sort is still not stable. We probably should make it
stable, but that is a more extensive change that's handled in a later
commit.

Cc: mesa-stable
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29178>
(cherry picked from commit 5102a922e76284c18e33cf4d6e9fc7952b4b2e02)
2024-05-31 15:20:42 +02:00
Lionel Landwerlin
7bbf05c1fe intel/brw: ensure find_live_channel don't access arch register without sync
Another architecture register that requires some care before reading.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 49ee3ae9e8 ("intel/compiler: Lower FIND_[LAST_]LIVE_CHANNEL in IR on Gfx8+")
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29319>
(cherry picked from commit 2c65d90bc8500bb8ad0b9204798905e4d79fb283)
2024-05-31 15:19:01 +02:00
Iago Toral Quiroga
163c91eb99 broadcom/compiler: apply payload conflict to spill setup before RA
We can emit spill setup before RA if we use scratch. In that case
we have the same situation as during spilling, with the caveat that
we have already emitted the instructions so we need to find them
(they should be the only instructions ones before the instructions
accessing payload registers) and flag them as such.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29343>
(cherry picked from commit 865e682ad7ffcc97b931feb05f0541ac8a0f54fd)
2024-05-31 15:09:02 +02:00
Iago Toral Quiroga
00584da40d broadcom/compiler: don't assign payload registers to spilling setup temps
We read our payload registers first in the shader so we generally don't have
to care about temps being allocated to them and stomping their value before
we can read them. Hoewer, spilling setup instructions are an exception since
these will be inserted first when there is any spilling in the program.
To fix this, we flag RA nodes involved with these instructions so we can
then try to avoid assiging these registers to them.

Fixes CTS failures with V3D_DEBUG=opt_compile_time, particularly:
dEQP-VK.binding_model.buffer_device_address.set0.depth2.basessbo.convertcheckuv2.nostore.single.std140.comp_offset_nonzero

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29343>
(cherry picked from commit cb83f25b39173db92d8ccaeac3a9b640f46f7651)
2024-05-31 15:09:01 +02:00
Iago Toral Quiroga
f5b0a01d7c broadcom/compiler: make add_node return the node index
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29343>
(cherry picked from commit 901c4859970989a85c72bac9d71c5fd43b6deaff)
2024-05-31 15:09:00 +02:00
David Heidelberg
9e4edf6ac8 ci/nouveau: move disabled jobs back from include into main gitlab-ci.yml
Fixes: 9442571664 ("ci: separate hiden jobs to -inc.yml files")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26758>
(cherry picked from commit 6bc660a5429d0cae6ea3135c1262be5edbe94b25)
2024-05-31 15:08:59 +02:00
Lionel Landwerlin
9f561814b1 anv: fix shader identifier handling
When compilation is required, we should return
VK_PIPELINE_COMPILE_REQUIRED. The spec prevents the application from
passing a module or SPIR-V code so we have nothing to compile if the
cache lookup fails :

VUID-VkPipelineShaderStageCreateInfo-stage-06844:
   If a shader module identifier is specified for this stage, a
   VkShaderModuleCreateInfo structure must not be present in the pNext
   chain

VUID-VkPipelineShaderStageCreateInfo-stage-06848:
   If a shader module identifier is specified for this stage, module
   must be VK_NULL_HANDLE

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11208
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29340>
(cherry picked from commit 5f2288095b86b70db8a9ed3bf0d06b960cf1b132)
2024-05-31 15:08:58 +02:00
Eric R. Smith
4076cf1df0 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>
(cherry picked from commit 4d298673da9b05d826b960eece2e715a6b187330)
2024-05-31 15:08:56 +02:00