Commit graph

223299 commits

Author SHA1 Message Date
Jhanani Thiagarajan
2a60e9e769 intel/mda: Change the default output directory
Directories are named using the process name and PID to avoid overwriting dumps from
subsequent runs of the same application.

v2 (Caio): Use util_get_process_name().  Change to be default behavior.
           Old behavior still accessible via MDA_OUTPUT_DIR="." env var.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39125>
2026-05-29 17:30:38 +00:00
Peyton Lee
04dfd3fe3f radeonsi/vpe: adjust message
Adjust debug message to display the correct format name

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41876>
2026-05-29 17:02:06 +00:00
Peyton Lee
5a088b1810 ac/gpu_info: add VPE_2_2 support
enable VPE_2_2 support

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41876>
2026-05-29 17:02:05 +00:00
Peyton Lee
99c4cd205e amd/vpelib: support vpe 2.2
Update vpelib to support vpe 2.2.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41876>
2026-05-29 17:02:05 +00:00
Michel Dänzer
2b2dbcc13a egl/gbm: Eliminate max_age local variable
Use oldest_buffer->age instead.

Cleanup, no functional change intended.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41845>
2026-05-29 16:38:01 +00:00
Michel Dänzer
485919779d egl/gbm: Use local variable for better readability
No functional change intended.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41845>
2026-05-29 16:38:01 +00:00
Michel Dänzer
3999b5d680 egl/gbm: Do not destroy BO of current front buffer
It's not always locked. If it's not, and we destroy its BO,
lock_front_buffer will set dri2_surf->current->locked = true but then
return NULL, so release_buffer will never be called, preventing the
buffer from being used again.

Fixes: dd7ae41091 ("egl/gbm: Destroy excess BOs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41845>
2026-05-29 16:38:01 +00:00
Eric Engestrom
9be2f6ea57 Revert "drirc: move 00-$drv-defaults.conf to each driver's folder"
This reverts commit 97391328a3.

This broke devenv because DRIRC_CONFIGDIR doesn't point the folder that
contains everything anymore.

DRIRC_CONFIGDIR will be modified to take the standard `:`-separated list
of paths, but until then, revert this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41890>
2026-05-29 16:01:06 +00:00
Samuel Pitoiset
9dfc83079c radv: enable radv_force_64_byte_sampled_image for Crimson Desert
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Seems the same issue as FH6 after all.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15563
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41851>
2026-05-29 15:36:52 +00:00
Georg Lehmann
0f542c7049 radv: enable fp64 float controls on gfx6-7
There is no reason why these should be disabled.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:20 +00:00
Georg Lehmann
45532ad306 aco/gfx6: always use rtne adds for fround_even lowering
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:20 +00:00
Georg Lehmann
a3b4cf9f1f aco/gfx6: fix fround_even(-0.0)
We need to account for the sign bit after the add/sub trick,
otherwise -0.0 gets turned into +0.0.

Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:20 +00:00
Georg Lehmann
ed5ab76879 aco/gfx6: always use rtne for floor/ceil lowering
This fixes floor(-DBL_MIN) and ceil(DBL_MIN) with rtz.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:20 +00:00
Georg Lehmann
cbf3f4220c aco: add rtne pseudo opcodes for fp64 add and fract
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:19 +00:00
Georg Lehmann
e0ccd24fb6 aco/gfx6: use shorter lowering for ftrunc
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:19 +00:00
Georg Lehmann
843219010f aco/gfx6: fix fceil lowering
The old one wasn't signed zero correct.

Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:19 +00:00
Georg Lehmann
76a68032cb radv: don't lower dfloor in NIR
The aco lowering was fixed in the previous commit.

If v_fract_f64 had precision issues, we would be in bigger trouble.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:19 +00:00
Georg Lehmann
bc639abb04 aco/gfx6: fix fp64 floor lowering
The v_min_f64 was broken, because we needs to allow 1.0 as fract result.

Otherwise floor(-DBL_MIN) will not return -1.0.

NaN also doesn't need any special handling, because fadd(NaN, b) is NaN.

Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:18 +00:00
Caio Oliveira
159dbc40e0 jay: Use TGL_PIPE_NONE when RegDist is zero
Avoids simulator complaining about invalid dependency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41880>
2026-05-29 14:36:45 +00:00
Romaric Jodin
bb15c00343 anv: Declare 00-mesa-defaults.conf as an input to anv_dricrc_gen.py
The `libanv_drirc` custom target passes `00-mesa-defaults.conf` to the
generator script via the `--validate` flag, but it was hardcoded as a
path rather than being declared as an input dependency.

When translating the build to a hermetic build system, this missing
dependency causes the build to fail because the undeclared file is not
provisioned in the sandboxed build environment.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41886>
2026-05-29 14:05:30 +00:00
Konstantin Seurer
bef2148ab7 llvmpipe: Fix sparse binding large areas
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The size needs to be taken into account when tracking residency.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41327>
2026-05-29 13:32:23 +00:00
Konstantin Seurer
ac27f93e54 llvmpipe: Implement sparse residency feedback for buffers
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41327>
2026-05-29 13:32:23 +00:00
Konstantin Seurer
6b999c4cab llvmpipe: Use i1 for sparce residency and expand as needed
Avoids potential size mismatch.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41327>
2026-05-29 13:32:23 +00:00
Christian Gmeiner
010678968b lavapipe: Enable extendedDynamicState3ColorBlendAdvanced
Advanced blend with dynamic state is now lowered correctly at draw time, so
advertise the feature. It is required because lavapipe supports VK_EXT_shader_object.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15564
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41885>
2026-05-29 11:58:34 +00:00
Christian Gmeiner
d80bf97e5e lavapipe: Lower advanced blend at draw time when its state is dynamic
With VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT the advanced blend op and its
parameters are only known at draw time. The static color_blend_op still
carries the pipeline's blend equation op, so lowering advanced blend in the
fragment shader already at pipeline creation used a stale op and, together with
the draw-time lowering, blended the result twice.

Fixes: 0444b5877f ("lavapipe: Implement VK_EXT_blend_operation_advanced")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41885>
2026-05-29 11:58:34 +00:00
Christian Gmeiner
94299202f9 lavapipe: Skip advanced blend lowering when blending is disabled
When color blending is disabled for an attachment the fragment shader output
is written unmodified, so an advanced blend op on that attachment must have no
effect. lavapipe decided whether to lower advanced blend from the blend op
alone and ignored the blend enable, so the output got blended instead of being
left untouched.

Fixes: 0444b5877f ("lavapipe: Implement VK_EXT_blend_operation_advanced")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41885>
2026-05-29 11:58:33 +00:00
squidbus
5484e83f4b kk: Handle index robustness for fully bound buffers manually
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
While Apple GPUs do seem to handle robustness for cases where index count
exceeds the actual `MTLBuffer` size, Metal validation complains about it.

In the interest of valid API usage we can handle this case ourselves for
now, and later Metal 4 encoders will do away with the need to handle index
robustness altogether.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41873>
2026-05-29 04:28:27 -07:00
squidbus
80091d4c2e kk: Do not use image-to-image copies for 1D compressed textures
Metal validation fails if an image-to-image copy is performed with
dimensions that are not a multiple of the block size, which we hit
for 1D compressed images. According to documentation, it should be
fine to clamp the extent to the edge of the image, but it triggers
anyway, so route these to the buffer path to pass validation.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41873>
2026-05-29 04:28:24 -07:00
squidbus
7c8de173d2 kk: Sanitize image copy through buffer extents
Use `util_format_get_nblocks(x/y/z)` for safer extent division, and
make sure 1D/2D extensions have extent y/z set to 1 as appropriate.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41873>
2026-05-29 04:28:20 -07:00
squidbus
aeecafff95 kk: Fix precomp data buffer alignment
Metal wants the buffer to be aligned to 8

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41873>
2026-05-29 04:28:17 -07:00
Konstantin Seurer
2fe85f966e radv: Add and use helpers for managing internal allocations
This is code that is duplicated in a whole bunch of cases.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41044>
2026-05-29 10:59:39 +00:00
Konstantin Seurer
6913c9440e radv: Move radv_find_memory_index to radv_debug.c
It's only used for tooling.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41044>
2026-05-29 10:59:39 +00:00
Konstantin Seurer
0b141ba774 radv/tools: Rename radv_debug to radv_debug_hang
It's only for hang debugging.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41044>
2026-05-29 10:59:38 +00:00
Konstantin Seurer
c9b60cfa4f radv: Move a whole bunch of debug/profiling related into a subdir
For slightly better separation of debug and driver code.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41044>
2026-05-29 10:59:38 +00:00
Konstantin Seurer
23677605f2 radv: Move debug options to radv_instance.h
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41044>
2026-05-29 10:59:38 +00:00
Frank Binns
c501f3b4c9 pvr: re-enable {EXT,KHR}_index_type_uint8
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This was originally disabled by a22ad99bdd ("pvr: set device
features/props/extensions to Vulkan 1.0 minimums (unless implemented)") in order
to concentrate efforts on passing "base" Vulkan conformance before layering on
additional functionality. The driver is now Vulkan 1.2 conformant.

As the functionality is already implemented, simply enable the extension.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Ella Stanforth <ella@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41859>
2026-05-29 09:56:28 +01:00
Samuel Pitoiset
76fdc606c8 ac/nir,radv: lower task payload to zeroes when the mesh shader has no task
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The Vulkan spec allows this to be used in a mesh shader as long as
it's not accessed, so it can be eliminated.

This fixes dEQP-VK.mesh_shader.ext.misc.payload_not_accessed.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41828>
2026-05-29 07:44:40 +02:00
Faith Ekstrand
932ee0f806 etnaviv: Remove f32_to_f16_fallback() in favor of float16::F16
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41375>
2026-05-29 05:13:24 +00:00
Faith Ekstrand
b60694b91e compiler/rust: Add a float16 wrapper
This adds an F16 struct which provides a 16-bit float type using Mesa's
existing half-precision support internally.  Right now, it only contains
the basics but it could be expanded if needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41375>
2026-05-29 05:13:24 +00:00
Faith Ekstrand
7e2f41bd8f nouveau: Don't build NAK tests on Android
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41375>
2026-05-29 05:13:24 +00:00
Caio Oliveira
d6ce874220 anv: Use empty_vs_input for default VERTEX_ELEMENT_STATE
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41790>
2026-05-29 04:48:20 +00:00
Caio Oliveira
c9dceab876 anv: Fill VERTEX_ELEMENT_STATE before further emissions
genX(batch_emit_vertex_input) reserves 3DSTATE_VERTEX_ELEMENTS and then
writes into that reserved memory.  Any later anv_batch_emit() may
allocate a new batch and finalize the previous one, running the valgrind
defined-memory check over it.

Fill the draw-parameter and dynamic VERTEX_ELEMENT_STATE entries before
emitting 3DSTATE_VF_INSTANCING.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41790>
2026-05-29 04:48:20 +00:00
Timothy Arceri
26280cbc23 mesa: flush bitmap cache when scissor box changes
The glBitmap calls will flush the cache when scissors are enabled
or disabled but doesn't handle a change in the scissor box itself.

Fixes: 33ca53ac79 ("st/mesa: fix the glBitmap cache wrt FS, scissor, and clamp color changes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15505

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41825>
2026-05-29 03:38:55 +00:00
Gurchetan Singh
eb17e7b102 util: rust: minor fixups
* Use little-endian since all hardware is basically little-endian
* Fix dead_code warning on non-Linux platforms

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41754>
2026-05-29 03:07:52 +00:00
Gurchetan Singh
5be5cca792 util: rust: sync error handling fixes from downstream
Useful for parse ints and using the ? operator.

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41754>
2026-05-29 03:07:52 +00:00
Val Packett
10620bdf21 util: rust: Add a way to create a Tube from an existing OwnedFd
Signed-off-by: Val Packett <val@invisiblethingslab.com>
Signed-off-by: Gurchetan Singh <gurchetan.singh.foss@gmail.com>
Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41754>
2026-05-29 03:07:52 +00:00
Val Packett
4f13941e44 util: rust: Support detecting socket file descriptors
Useful for Pipewire passthrough.

Signed-off-by: Val Packett <val@invisiblethingslab.com>
Signed-off-by: Gurchetan Singh <gurchetan.singh.foss@gmail.com>
Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41754>
2026-05-29 03:07:52 +00:00
Val Packett
118e48402c util: rust: align API with real eventfd capabilities
Linux eventfds contain a 64-bit value which can be increased by arbitrary
numbers, and waiting returns a numeric value that consumers might need
to actually read.

Also, reading/waiting does mutate kernel state, so make it &mut self
like reading on std::fs::File is.

Signed-off-by: Val Packett <val@invisiblethingslab.com>
Signed-off-by: Gurchetan Singh <gurchetan.singh.foss@gmail.com>
Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41754>
2026-05-29 03:07:51 +00:00
Mike Blumenkrantz
1f866164d7 zink: be more conservative about query pool sizing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
500 can be pretty big if lots of queries are in flight, especially
if all the queries are TIMESTAMP. instead, start smaller and scale
dynamically up to the previous threshold

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41874>
2026-05-29 02:46:35 +00:00
Danylo Piliaiev
c5fb1c3265 freedreno/a7xx: Don't force enable IJ_LINEAR_PIXEL for FragFace/FragCoord
Apparently GRAS_CL_INTERP_CNTL has two fields FACENESS and CENTERRHW
which allows us to not enable IJ_LINEAR_PIXEL input, which can
improve performance in trivial cases by ~50%.

Mirrors Turnip change.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41848>
2026-05-29 01:15:47 +00:00