Commit graph

223423 commits

Author SHA1 Message Date
Karmjit Mahil
f01837c8bb v3d: Add heap_memory_percent driconf support
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41242>
2026-06-01 17:32:50 +00:00
Karmjit Mahil
72736c621a v3dv: Add heap_memory_percent driconf support
This also introduces a new tier since the common helper exposes
25% of memory as heap on devices with <=1GiB memory. Previously
50% was being used.

This also fixes `device->heap_used` not using atomic read.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41242>
2026-06-01 17:32:50 +00:00
Karmjit Mahil
926dad811e asahi: Add heap_memory_percent driconf support
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41242>
2026-06-01 17:32:50 +00:00
Karmjit Mahil
cda640d439 hk: Add heap_memory_percent driconf support
The budget calculation has changes slightly as the budget scaling
is applied prior to adding the used up heap memory.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41242>
2026-06-01 17:32:50 +00:00
Karmjit Mahil
0ce832347a vulkan: Add heap budget helper function
Some drivers scale the available memory proportionally to the
advertised heap memory. The `heap_memory_percent` driconf option
allows tweaking the percentage of system memory exposed as heap
memory, so drivers supporting this also need to scale their
budgets accordingly. So add `vk_gpu_heap_budget_from_system()`.

Some drivers just clamp the available memory to the heap size. This
is accounted for by having the `scale_with_heap` parameter.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41242>
2026-06-01 17:32:50 +00:00
Karmjit Mahil
1287fee6f7 util: Add heap_memory_percent driconf option
Also adds helper function to be used by drivers.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41242>
2026-06-01 17:32:50 +00:00
Serdar Kocdemir
475d1ea274 gfxstream: use VK_DRIVER_ID_MESA_GFXSTREAM as driver id
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41932>
2026-06-01 17:16:32 +00:00
Pohsiang (John) Hsu
85c12604b9 d3d12: add av1 handling to d3d12_video_encoder_get_encode_headers and d3d12_video_encoder_update_current_encoder_config_state_av1
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41834>
2026-06-01 16:32:02 +00:00
Pohsiang (John) Hsu
7d8b051c06 meson: Make with_gfx_compute depend on video encode support (mediafoundation)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41834>
2026-06-01 16:32:02 +00:00
Caio Oliveira
74d38a6271 intel/gen: Change validation test code to use the parser
Assisted-by: Pi coding agent (GPT-5.5)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41918>
2026-06-01 16:02:41 +00:00
Karmjit Mahil
cc02826f4e docs: Fix struct redefinition errors
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41933>
2026-06-01 15:57:35 +00:00
Sid Pranjale
020a6bc282 vulkan: implement VK_EXT_debug_marker
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32722>
2026-06-01 15:31:38 +00:00
Icenowy Zheng
d55418dae7 zink: check Z/S aspect before creating Z/S image view
When moving the code of creating image views to the init_sampler_view()
function, the check for Z/S aspect bits was forgotten to be added
(because it was a big if gating a lot of code originally).

When the driver doesn't have needs_zs_shader_swizzle set, this is not
problematic, because the condition for creating Z/S view is to have only
Z aspect; however the needs_zs_shader_swizzle case now fails because Z/S
views are now created for color images.

Fix the issue by re-adding the Z/S aspect check before checking
needs_zs_shader_swizzle flag.

Fixes: cafa22142b ("zink: create views for samplers lazily")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41923>
2026-06-01 15:10:35 +00:00
Erik Faye-Lund
4b8ba6e27f pan/ci: add a couple of flakes
These are flakes.

The one that is moved from fails passes veeeery rarely, but it does
happen. Here's an example:

https://gitlab.freedesktop.org/mesa/mesa/-/jobs/100611464

The other one is almost consistently failig. Example:

https://gitlab.freedesktop.org/mesa/mesa/-/jobs/101218732

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41921>
2026-06-01 14:41:41 +00:00
Karol Herbst
05a6b192a5 asahi: fix fdiv lowering
Fixes: d3adef3164 ("agx: defer nir_opt_idiv_const")

Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by Janne Grunau <j@jannau.net>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41386>
2026-06-01 13:43:01 +00:00
Karol Herbst
f509d9ab01 asahi: move batch flushing into agx_launch_internal
The CL CTS basic arraycopy test actually runs out of space there.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by Janne Grunau <j@jannau.net>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41386>
2026-06-01 13:43:01 +00:00
Karol Herbst
bd7081747f asahi: fix compute blitter for float16 image copies
Fixes OpenCL CTS clCopyImage tests with CL_HALF_FLOAT

Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by Janne Grunau <j@jannau.net>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41386>
2026-06-01 13:43:01 +00:00
Karol Herbst
8ac7e883cf asahi: fix dst range in buffer copy region
agx_batch_writes_range takes the offset within the buffer, not the address

Fixes: 4a3b905bb8 ("agx: move texture lowering into lib")

Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by Janne Grunau <j@jannau.net>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41386>
2026-06-01 13:43:01 +00:00
Karol Herbst
d25e7e330f nir/lower_alu: fix lower_fminmax_signed_zero for denorms
When both inputs are denorms, the bcsel picks the integer min/max result,
which does not flush denorms and therefore might return the wrong result.

Fixes OpenCL fmin/fmax on asahi.

Fixes: d238d766c6 ("nir: add lower_fminmax_signed_zero")

Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by Janne Grunau <j@jannau.net>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41386>
2026-06-01 13:43:01 +00:00
Ken Xue
641d9f35ae radv: remove checking on the gralloc handle->numFds
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
numFds could be no less than 1 based on the number of plane(s) and
metadata(optional) fd in a gralloc buf handle. and amdgpu backend
of gralloc should make sure all plane bufs within same dma_buf fd
but different offset.

handle->data[0] already indicates dma_buf fd of plane(s) well.

Signed-off-by: Ken Xue <Ken.Xue@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41879>
2026-06-01 11:33:53 +00:00
Patrick Lerda
fa5ce01ea3 r600: update muladd support configuration
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This change updates the configuration to fix some
regressions with the fpu64 emulation.

Note: The r600 has a single precision fma op code which
breaks the fpu64 emulation if used as nir_op_ffma (It
likely returns a double).

This change was tested on palm and barts.
Fixes: aeea2e7c1f ("nir: add fmad_or_ffma helpers and use it in lower_double_ops")

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41781>
2026-06-01 11:08:55 +00:00
Icenowy Zheng
19d786ae6a pipe-loader: use zink for powervr device nodes
The Mesa PowerVR driver is Vulkan only, and Zink is used solely for
APIs implemented by Gallium.

Change the driver name to "zink" if the device node's driver is
"powervr".

Backport-to: 26.1
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41737>
2026-06-01 09:32:08 +00:00
Icenowy Zheng
da11aac770 Revert "pipe-loader: fallback to zink instead of kmsro for render nodes"
This reverts commit adf18abb40.

Some setups rely on matching kmsro for render nodes (e.g. clients to
wlroot-based compositors).

Backport-to: 26.1
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41737>
2026-06-01 09:32:08 +00:00
Collabora's Gfx CI Team
e569df0145 Uprev VVL to 315d28985ebd1ff9a2e4380e34ed2d8ebe487531
36187ee9f2...315d28985e

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41792>
2026-06-01 08:57:49 +00:00
Kenneth Graunke
405c99d0a6 jay: Add URB load support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:25 +00:00
Kenneth Graunke
9c8f7c481f brw: Fold constants after nir_lower_io for VS/GS/TES outputs
brw_nir_lower_deferred_urb_writes assumes that constant offsets will be
properly folded.  In brw itself we call the big optimization loop which
takes care of this, but jay doesn't do that in-between.

At any rate, nir_lower_io generates a lot of address math that really
ought to get cleaned up, so it seems like a good point to call it here.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:25 +00:00
Kenneth Graunke
fb99a109e4 brw: Fix mistake in brw_nir_lower_deferred_urb_writes
I meant to add these together, not put a random semicolon in the middle
of the expression which meant the offset got tossed on the floor.

Fixes: 6fbe201a12 ("brw: Convert VS/TES/GS outputs to URB intrinsics.")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:25 +00:00
Kenneth Graunke
c798a9df1c brw: Refactor urb_read_length setting for TES
We now calculate it when emitting push input loads at the NIR level,
rather than in the backend.

v2: Fix missing interaction with legacy tesslevel remapping

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:24 +00:00
Kenneth Graunke
4dfa11a9d6 brw: Ensure entire input load fits in push data
We were seeing if the start of the load was within the push range,
rather than the entire load.  (We could also split loads, but that
seems needlessly complex.)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:24 +00:00
Kenneth Graunke
f4260b15cf brw: Fix URB read length for tessellation evaluation shaders
Calculate the end of our read as a byte offset and divide by the 32B
unit of URB reads.  We were calculating 1 byte beyond the start offset
and dividing by 8 (the number of 4 byte DWords in 1 unit of URB read).

Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:24 +00:00
Kenneth Graunke
887c04239f anv: Drop TES dispatch mode asserts
SIMD4x2 mode is only supported by elk which anv doesn't use.  iris
doesn't check this.  Eventually we should probably just demote the
dispatch_mode field to the stages that still need it.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41821>
2026-06-01 08:30:23 +00:00
David Rosca
88577c5e54 ac/parse_ib: Add VCN timestamp command
Also remove OP_ prefix from other common commands.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41861>
2026-06-01 07:34:11 +00:00
David Rosca
2aec2e8dba ac/parse_ib: Add VCN decode queue parsing
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41861>
2026-06-01 07:34:11 +00:00
Samuel Pitoiset
e32d518819 radv: cleanup conditional header includes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41865>
2026-06-01 06:35:31 +00:00
Faith Ekstrand
fd9c2ce73d compiler/rust/nir: Add helpers for getting ALU input/output types
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/41896>
2026-06-01 03:24:17 +00:00
Faith Ekstrand
52e2439973 compiler/rust/nir: Add structured block iterators
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:17 +00:00
Faith Ekstrand
4d129b10ac compiler/rust: Add a nir_shader::to_string()
Annoyingly, this has to take a &mut nir_shader because printing
re-indexes SSA value.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:16 +00:00
Faith Ekstrand
5922db15bf compiler/rust: Add a nir_shader::get_entrypoint() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:16 +00:00
Faith Ekstrand
8b71407672 compiler/rust/bindings: Add util_dyarray
NIR uses dynarray for predecessors now so we should include it in the
bindings to keep other users from pulling in a duplicate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:16 +00:00
Faith Ekstrand
0d8ca7cc6c meson: Suffix compiler/rust bindings with _compiler_rs_extern
This prevents symbol collisions with other crates in Mesa.

Fixes: b60694b91e ("compiler/rust: Add a float16 wrapper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
2026-06-01 03:24:16 +00:00
Daivik Bhatia
993d4f5233 pan/nir: fix GNU compilation error with clang
Swapping `{}` for `{0}` to fix a GNU empty initializer
error when building with Clang.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41864>
2026-06-01 02:59:38 +00:00
Benjamin Otte
364ae96477 Revert "lavapipe: Don't advertise support for multiplane drm formats"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These formats are supported now, so we should not bail anymore.

This reverts commit 0941af995a.

Fixes: 77c630b0b01eaf1f078338296d02d952277c4e33
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41776>
2026-05-31 18:53:28 +02:00
Konstantin Seurer
40087f9be2 lavapipe: Perform shader object compatibility check early
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
To avoid allocating (and leaking) a lvp_shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39496>
2026-05-31 12:36:29 +00:00
Konstantin Seurer
9f11d59f9a llvmpipe: Fix memory leak when allocating sample functions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39496>
2026-05-31 12:36:29 +00:00
Mike Blumenkrantz
e41ad705a9 lavapipe: Implement VK_EXT_descriptor_heap
Co-authored-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39496>
2026-05-31 12:36:29 +00:00
Konstantin Seurer
a12e7c85f5 lavapipe: Add lvp_nir_lower_push_constants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39496>
2026-05-31 12:36:29 +00:00
Konstantin
a4bdc0ba0d lavapipe: Fix push_constant_size for shader objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39496>
2026-05-31 12:36:28 +00:00
Konstantin
327093a306 lavapipe: Re-emit push constants if the size changed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39496>
2026-05-31 12:36:28 +00:00
Mike Blumenkrantz
644041cf0b lavapipe: stop using pipeline layouts in some places
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39496>
2026-05-31 12:36:28 +00:00
Konstantin Seurer
5b050154ed lavapipe: Implement VK_KHR_shader_untyped_pointers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39496>
2026-05-31 12:36:28 +00:00