Commit graph

73277 commits

Author SHA1 Message Date
Aleksi Sapon
712a4e5691 llvmpipe: fix overflow in rasterizer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39498>
2026-04-16 19:36:28 +00:00
Aleksi Sapon
0326051618 llvmpipe: remove unused SSE rasterization code
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39498>
2026-04-16 19:36:28 +00:00
Michel Dänzer
5cc3264b53 winsys/amdgpu: Use render node only as fallback
If ac_drm_device_initialize returns -EACCES for the fd passed in.

A render node file description can't have DRM master status, which means
AMDGPU_CTX_PRIORITY_HIGH can't work without CAP_SYS_NICE (which
generally only the root user has).

Fixes: 8f30e90fc1 ("winsys/amdgpu: Prefer render node FD for ac_drm_device_initialize")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40974>
2026-04-16 08:26:35 +00:00
Juan A. Suarez Romero
69708ff3f5 v3d: mark mapped BO as initialized for valgrind
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When we unsychronized map a BO, we tell Valgrind that the content is not
initialized yet.

But we forgot to mark it as defined when the map finishes, which leads to
several conditional jump or move depends on uninitialised value(s)
warnings when using Valgrind.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40964>
2026-04-16 07:55:39 +00:00
Connor Abbott
280c64d720 ir3: Don't reset immediate count to 0 after lowering
We need to know the immediate count even after lowering, to compute the
overall const size. Previously we were using the capacity field, but
that's unreliable and won't be available once we switch to a real
dynamic array container instead of (poorly) reinventing one.

Fixes: 86f3c0c4c2 ("ir3: simplify constlen calculation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40961>
2026-04-16 05:40:14 +00:00
Christian Gmeiner
5d8b900369 mesa/st: Extend st_context_invalidate_state with meta-op flags
Add ST_INVALIDATE_* flags for all states that meta-operations
(bitmap, clear, drawpixels, etc.) modify behind the state tracker's
back. This enables meta-ops to use st_context_invalidate_state()
instead of CSO save/restore for state re-derivation.

The atoms already know how to re-derive Gallium state from GL context,
so marking states dirty via st_context_invalidate_state() is
sufficient - st_validate_state() will call the atoms before the next
draw.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40592>
2026-04-15 21:08:44 +00:00
Marek Olšák
c4bd6bd590 radeonsi: just get si_shader_info::num_inputs from NIR
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
f249c297b2 radeonsi: set num_vs_inputs from nir->num_inputs and use it more
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
46c77ed745 radeonsi: don't call nir_recompute_io_bases for FS
the bases are unused now

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
a1f4d3e49b radeonsi: remove si_shader_info::input_semantic[]
it's unused now

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
3d356a99a7 radeonsi: compute si_shader_info::inputs_read without input_semantic[]
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
49888328a6 radeonsi: compute si_shader_info::color_attr_index without input_semantic[]
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:11 +00:00
Marek Olšák
a96c854234 ac,radv,radeonsi: don't use nir_intrinsic_base for FS inputs
This all is needed to switch to the new helper.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:11 +00:00
Marek Olšák
dfe5fbc1d7 radeonsi: update shader info in si_nir_lower_color_flatshade_twoside
needed to get rid of IO bases

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:11 +00:00
Marek Olšák
195eea461c ac/llvm: correctly load 16-bit TCS inputs from VGPRs and simplify
The conversions to integer and bitcasts are unnecessary because everything
is already integer.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:10 +00:00
Marek Olšák
a48ffce4bd ac,radeonsi: stop using nir_intrinsic_base for TCS inputs passed via VGPRs
This also removes one use of input_semantic[].

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:10 +00:00
Marek Olšák
c8ce9d4b48 radeonsi: remove si_shader_info::num_outputs
Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:09 +00:00
Marek Olšák
a4396f2da6 radeonsi: remove si_shader_info::output_semantic[]
It does nothing now.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:09 +00:00
Marek Olšák
d4538b90a7 radeonsi: stop using output_semantic[] for LS outputs passed via VGPRs
this is also required to make mediump work

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:09 +00:00
Marek Olšák
ef229b8c3e radeonsi: stop using si_shader_info::output_semantic for passthrough TCS
This will allow removing output_semantic.

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:08 +00:00
Marek Olšák
debedefbeb radeonsi: stop setting si_shader_info::output_semantic for FS
FS doesn't use it anymore.

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:08 +00:00
Marek Olšák
b60acfc5fb radeonsi: don't recompute IO bases for FS outputs
They are unused now.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:07 +00:00
Marek Olšák
ef44d8e9c8 ac,radeonsi: don't use nir_intrinsic_base for FS outputs
It was only used by the PS epilog in radeonsi.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:07 +00:00
Lorenzo Rossi
43ba475d4c panfrost,panvk: Move lower_texture_early inside preproc
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40844>
2026-04-15 10:32:19 +00:00
Lorenzo Rossi
e24228e327 panfrost,panvk: Move lower_texture_late inside postproc
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40844>
2026-04-15 10:32:19 +00:00
Lorenzo Rossi
d096a8e962 panfrost: Move lower_res_indices before postproc
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40844>
2026-04-15 10:32:18 +00:00
Lorenzo Rossi
eafc822dbd panfrost,panvk: Move postprocess near shader_compile
Ideally there should be only sysval lowering in the middle.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40844>
2026-04-15 10:32:18 +00:00
Vinson Lee
5982deb48b zink: remove unused variable in zink_instance.py
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
src/gallium/drivers/zink/zink_instance.c:34:9: warning: variable 'have_moltenvk_layer' set but not used [-Wunused-but-set-variable]

Fixes: 2b4fcf0a06 ("zink: generate instance creation code with a python script")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40910>
2026-04-14 23:44:45 +00:00
Paulo Zanoni
8c10ad844f intel/genxml: move the GPGPU_DISPATCHDIM* registers to genxml
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We need to use these registers on another file and I don't want to add
another copy of their definition to our code base.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40937>
2026-04-14 18:26:09 +00:00
Pierre-Eric Pelloux-Prayer
a26ba344a3 ac/info: remove has_bo_metadata
It's unused.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40656>
2026-04-14 12:06:16 +00:00
Pierre-Eric Pelloux-Prayer
79ebbf587e ac: remove ac_null_device
Prefer AMDGPU shim.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40656>
2026-04-14 12:06:12 +00:00
Pierre-Eric Pelloux-Prayer
42d4ec080c winsys/amdgpu: remove assert
This was useful to validate native context fence code, but
now it has less value and triggers when drm-shim is used.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40656>
2026-04-14 12:06:10 +00:00
Lars-Ivar Hesselberg Simonsen
a23cebcd60 panfrost: Add support for 64 bit gpu_id
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Update the gallium driver's use of gpu_id to support 64 bit gpu_ids.

Reviewed-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40921>
2026-04-14 10:12:25 +02:00
Lars-Ivar Hesselberg Simonsen
fd3aafabe9 pan/model: Expose prod_id and rev functions
Some code in gallium was making assumptions of how the gpu_id is laid
out, which will not work for 64 bit gpu_ids.

Expose pan_prod_id and pan_rev from the model to collect this logic in a
single place.

Reviewed-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40921>
2026-04-14 10:12:00 +02:00
Pohsiang (John) Hsu
0f56fd0120 mediafoundation: remove published codecapi
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40895>
2026-04-13 21:58:43 +00:00
Pohsiang (John) Hsu
2af4938328 mediafoundation: add support for GPU priority setting via IMFDXGIScheduler
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40895>
2026-04-13 21:58:43 +00:00
Job Noorman
4e456ebde4 ir3/collect_info: remove max_const calculation
constlen is now directly calculated from the const allocations; no need
to infer it from const reg usage anymore.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40929>
2026-04-13 19:15:59 +00:00
Mike Blumenkrantz
ab6cdd64c1 lavapipe: VK_EXT_primitive_restart_index
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40783>
2026-04-13 10:40:17 -04:00
Mike Blumenkrantz
88fd02daae lavapipe: update prim restart index on index buffer bind
this makes more sense functionally, as the restart index only changes
when the index size changes (and is harmless to update even if restart
isn't enabled)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40783>
2026-04-13 10:39:46 -04:00
Jesse Natalie
2c99dc8a18 d3d12: Don't allow CPU storage for huge buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40896>
2026-04-13 12:33:20 +00:00
Jose Maria Casanova Crespo
35efce437e v3d: use shared v3d_tile_alloc_sizes() and 128B initial blocks
Replace the inline tile_alloc/TSDA sizing in alloc_tile_state() with a
call to the new v3d_tile_alloc_sizes() helper. This switches from 64B
to 128B initial tile alloc blocks (avoiding overflow for simple draws)
and from a flat 512KB headroom to a draw-proportional formula.

Set tile_allocation_initial_block_size and tile_allocation_block_size
in all TILE_BINNING_MODE_CFG emissions and update the
TILE_LIST_INITIAL_BLOCK_SIZE packet to match.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40554>
2026-04-13 10:31:20 +00:00
David Rosca
c9a8dcd63c radeonsi/vcn: Don't force balance encode preset with sao on VCN5
This is only needed for VCN4 and older.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40766>
2026-04-13 09:45:54 +00:00
David Rosca
e8bce7ec47 radeonsi/vcn: Remove encode op_preset overrides
The only difference is HIGH_QUALITY on VCN4+ and forcing BALANCE
with sao on VCN2+.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40766>
2026-04-13 09:45:54 +00:00
Eric Guo
c415134454 panfrost: disable round_to_nearest_even for NEAREST samplers
When round_to_nearest_even is enabled with NEAREST filtering, texture
coordinates near texel boundaries (e.g. 0.9999999404) can be incorrectly
rounded up to the next texel instead of being floor()'d.

According to OpenCL spec section 8.2, for CLK_FILTER_NEAREST:
  i = address_mode((int)floor(u))

Backport-to: *
Signed-off-by: Eric Guo <eric.guo@nxp.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40912>
2026-04-13 08:38:55 +00:00
Yogesh Mohan Marimuthu
21047e61a5 winsys/amdgpu: call userq wait ioctl only once
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Allocate to hold 256 wait fences. Since there is only one queue per
per ip per process, the idea is that there won't be app or windowing system
that would have large number of job dependencies / wait fences.

If there is an app that has wait fences greater than 256, there won't
be corruption issues since kernel will wait for the extra fences.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40698>
2026-04-13 05:15:43 +00:00
Yogesh Mohan Marimuthu
5df6fc5481 winsys/amdgpu: pointers to be NULL if num 0 for kernel ioctl
From https://docs.kernel.org/process/botching-up-ioctls.html, Kernel
ioctl expects pointers are NULL if number of pointers variable is 0.

Kernel ioctl can have checks for these and return failure causing
the driver to fail.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40698>
2026-04-13 05:15:43 +00:00
Karol Herbst
58d45725c7 rusticl/device: Fix reporting of global memory on mixed memory devices
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
AMD APUs are hitting this case where they have very small discrete VRAM,
but a lot of staging memory, which can be used additionally.

Fixes: 7487ac2046 ("rusticl/device: support query_memory_info to retrieve available memory")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30123>
2026-04-12 21:58:40 +00:00
Karol Herbst
97a137ac88 rusticl/kernel: implement CL_KERNEL_GLOBAL_WORK_SIZE for custom devices
Apparently we are supposed to support this on custom devices.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30123>
2026-04-12 21:58:40 +00:00
Karol Herbst
97ca375f51 radeonsi: properly report unified memory on APUs
This helps rusticl to properly advertise available global memory on APUs.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30123>
2026-04-12 21:58:40 +00:00
Pavel Ondračka
64b0b83c9a r300/ci: update expectations
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/40906>
2026-04-12 18:49:23 +00:00