Commit graph

206485 commits

Author SHA1 Message Date
Lionel Landwerlin
978933c015 nir/opt_algebraic: extend lowering for (i|u)bitfield_extract
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35334>
2025-06-04 16:28:39 +00:00
Antonio Ospite
9f65081e02 ci/android: use curl -O to avoid having to specify the same filename again
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
dc1502af2e ci/android: use newer cuttlefish images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
088a4b0e23 ci/android: configure both hard limits and soft limits
The soft limits cannot go above the hard limits values, so the hard
limits should be configured too, just in case default limits values set
by the kernel or the init process are too small.

E.g. when booting with `init=/bin/sh` we have:

$ cat /proc/1/limits
Limit                     Soft Limit           Hard Limit           Units
...
Max open files            1024                 4096                 files
...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
859e903004 ci/android: skip org.skia.skqp.SkQPRunner#UnitTest_SurfaceResolveTest
Skip `org.skia.skqp.SkQPRunner#UnitTest_SurfaceResolveTest` when running
the `android-angle-android-cts` job, as it fails sporadically.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
0a8fec6c6d ci/android: skip org.skia.skqp.SkQPRunner#UnitTest_BulkTextureRectTest
Skip `org.skia.skqp.SkQPRunner#UnitTest_BulkTextureRectTest` when running
the `android-angle-android-cts` job, as it sometimes fails with memory
related issues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Guilherme Gallo
cf6f97a224 ci/android: reduce launch_cvd memory limit to 4GB by default
We only have 8GB on the Brya Chromebook used for venus testing, and the
job is unstable because using all the available RAM causes OOM kills.

So reduce launch_cvd memory limit to 4GB by default, still allowing to
change the default by setting the CUTTLEFISH_MEMORY variable in jobs
that might want a different value.

This change has been inspired by CROSVM_MEMORY, but a new variable is
used because technically cuttlefish can also use qemu in some setups,
not only crosvm.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:41 +00:00
Guilherme Gallo
769a4aa34e ci/android: disable errexit in trap function
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:41 +00:00
Guilherme Gallo
16754dbd13 ci/android: Add gitlab section for logs uploads
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Guilherme Gallo
bfca9fbbb3 ci/lava: SSH tweaks
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Antonio Ospite
b16ed16d75 ci: set up XDG_RUNTIME_DIR to be under /tmp which is tmpfs
Set up XDG_RUNTIME_DIR path to be under /tmp.

This might improve speed as /tmp is under tmpfs while the older path
might have been under NFS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Ashley Smith
c5500cd12f mesa: Add support for GL_EXT_shader_realtime_clock
This is similar to ARB_shader_clock

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34345>
2025-06-04 14:49:00 +00:00
Antonio Ospite
47619ef538 ci/android: silence mesa error about //.cache
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Pass XDG_CACHE_HOME=/data/local/tmp to binaries that load mesa
libraries to avoid the following message on the stderr:

  Failed to create //.cache for shader cache (Read-only file system)---disabling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:21 +00:00
Antonio Ospite
bdcdfe8b33 ci/android: show also the device name when printing GLES and VK info
This can give an indication in the logs about what driver is being
picked up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:21 +00:00
Antonio Ospite
76a73ba263 ci/android: get only the first device from eglinfo and vulkaninfo
It is possible that `eglinfo` and `vulkaninfo` provide info on multiple
devices.

Consider only the first device, which is going to be the default one
used by other components, when checking the versions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:20 +00:00
Antonio Ospite
e12aa9a49e ci/android: fix printing the original GLES and Vulkan versions
New mechanisms to retrieve the GLES and Vulkan driver versions have been
introduced in

  - 3029fdde65 (ci/android: Switch to using eglinfo to check GLES implementation, 2025-05-28)
  - 3ba9038648 (ci/android: Check Vulkan driver using vulkaninfo, 2025-05-28)

These mechanisms are more robust than the previous one but they do
change the behavior in that the version is not retrieved by an already
running process (e.g. SurfaceFlinger), but by creating new processes
that load the libraries available on the filesystem.

Because of this change of behavior the original version should be
printed **before** pushing the new libraries to the Android guest, so
that developers are able to compare the old and new versions in the logs.

Moreover, the runtime checks do not answer the original question anymore:

  "what GLES/VK libraries is surfaceflinger currently using?"

but rather new question:

  "what GLES/VK libraries are services going to use when they load?"

So the shell start/stop can very well performed after the version check,
accompanied by a new check on the PID of SurfaceFlinger to be sure that
it has reloaded consequently picking up the new libraries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:20 +00:00
Erik Faye-Lund
57b04e8dfd mesa/main: fix enum errors
This enum shouldn't be allowed in GLES before version 3.1

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:18 +00:00
Erik Faye-Lund
bba7f7d586 mesa/main: fix error-handling for gles1/2
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
89d5447ea6 mesa/main: fix multisample enum checks
These needs proper extension checks on GLES.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
5a5ce75a63 mesa/main: correct error-checks for GL_TEXTURE_2D_MULTISAMPLE_ARRAY
This enum is only valid on GLES when OES_texture_storage_multisample_2d_array
is supported.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
8d97f5d77e mesa/main: add _mesa_has_texture_multisample-helper
This reduces the number of places we need to keep track of what
extensions enables this functionality.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:16 +00:00
Erik Faye-Lund
214fd4e40d mesa/main: fix texture view enum checks
These were a bit of a mixed bag; we had some open-coded cases, and a few
overly permissive code-paths. Anyway, let's stricten this up a bit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:16 +00:00
Erik Faye-Lund
f87f6d9cd4 mesa/main: do not allow desktop enums on gles
These enums aren't allowed on GLES, but we would happily allow them.
Let's fix that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:14 +00:00
Erik Faye-Lund
fcf26c951b mesa/main: clean up invalid pname-check
The logic is a bit easier to follow if we list the cases where this is
supported, rather than the cases where it isn't.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
937e1d55b3 mesa/main: fix ARB_texture_float quirk
While ARB_texture_float is indeed supposed to disable clamping, it
should only do so on the APIs where the extension is supported.
Otherwise, we end up disabling clamping also when using GLES 1.x,
which isn't quite what we want.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
25830434c2 mesa/main: do not allow non-gles1 enums in gles1
These enums are not allowed in GLES1, but would be incorrectly accepted
if running on hardware capable of the functionality even in GLES1. So
let's use the helper that also considers the API, which should fix the
problem.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
879ef152db mesa/main: use _mesa_has_Foo-helpers
These helpers already keep track of what API each extension is available
in. This makes the code easier to read and maintain. Let's use them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:12 +00:00
Erik Faye-Lund
1e4f12d7ac mesa/main: use _mesa_is_desktop_gl_compat-helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:11 +00:00
Erik Faye-Lund
87dda2988b mesa/main: fixup bad indent
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:11 +00:00
Iago Toral Quiroga
c059c721fb broadcom/compiler: handle moving last ubo load in the block correctly
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Before we move a UBO load to a previous location in the block we take a
reference to the instruction after it so we can continue the loop from
there, however, if the load we just moved was already the last instruction
in the block we just want to break the loop right there.

Fixes crashes with shaders from http://flightradar24.com

Fixes: 8998666de7 ("broadcom/compiler: sort constant UBO loads by index and offset")
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35333>
2025-06-04 11:50:30 +00:00
David Rosca
e579b982b0 radv/video: Set all pic params for H264 encode refs
Fixes encoding B-frames with I-frame as L1 reference.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35283>
2025-06-04 11:33:02 +00:00
David Rosca
92e99e6169 radv/video: Add radv_enc_h264/5_pic_type
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35283>
2025-06-04 11:33:02 +00:00
Jose Maria Casanova Crespo
e7de2bd086 v3d: Remove struct v3d_surface and create/destroy surface functions
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
5e4b66e226 v3d: Stop calling deprecated util_framebuffer_init
We remove all v3d usages of create_surface hooks.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/13262

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
680b6d0e9b v3d: Remove separate_stencil from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
46ef49ab55 v3d: Remove internal_type and internal_bpp from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
735cf1cb78 v3d: Remove padded_height_of_output_image_in_uif_blocks from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:31 +00:00
Jose Maria Casanova Crespo
1fe0327255 v3d: Remove tiling from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:31 +00:00
Jose Maria Casanova Crespo
b3228e0648 v3d: Remove never used offset from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:30 +00:00
Jose Maria Casanova Crespo
c13135f7c3 v3d: Remove rt_format from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:30 +00:00
Jose Maria Casanova Crespo
46b96e0079 v3d: Remove swap_rb logic from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:29 +00:00
Georg Lehmann
1c4070f3e9 nir/opt_if: limit rewrite_uniform_uses iand recursion
https://github.com/doitsujin/dxvk/issues/4970 has a shader
where unrolled loops caused large iand chains and if we don't
limit this  we won't finish compiling in reasonable time.

Cc: mesa-stable

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35312>
2025-06-04 10:49:05 +00:00
Georg Lehmann
eaeaf9554d nir/opt_if: don't replace constant uses with other uniform values
If constant folding wasn't run, this could replace constant uses with different
constants.

Additional, it could also create worse code for "if (subgroupXor(1) == 1)".

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13281

Cc: mesa-stable

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35312>
2025-06-04 10:49:05 +00:00
Jose Maria Casanova Crespo
27279b2cbe vc4: Remove struct vc4_surface and create/destroy surface functions
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
ba950f9556 vc4: Stop calling deprecated util_framebuffer_init
We remove all vc4 usages of create_surface hooks.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/13262

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
40f3dac716 vc4: Remove tiling from vc4_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
51bc2e607f vc4: Remove offset from vc4_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
2025-06-04 10:31:49 +00:00
Lionel Landwerlin
79498a0849 brw: fix brw_nir_fs_needs_null_rt helper
In 9b42215e0d ("iris: ensure null render target for specific cases") I
wrongly assumed that writing gl_SampleMask would only happen in
multisampled cases.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9b42215e0d ("iris: ensure null render target for specific cases")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13292
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35313>
2025-06-04 10:10:38 +00:00
Samuel Pitoiset
226b0e28db nir: generalize bitfield insert/extract sizes
Original patch from Alyssa Rosenzweig

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35209>
2025-06-04 09:37:53 +00:00
Samuel Pitoiset
2474118a06 spirv: disable mediump for bitfield insert/extract
This prevents a regression with the next change that generalizes
bitfield insert/extract sizes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35209>
2025-06-04 09:37:53 +00:00