Commit graph

222230 commits

Author SHA1 Message Date
Adam Jackson
badd52c7d5 i915: fix incorrect texcoord optimization in TGSI compiler
i915_fpc_optimize_mov_before_tex replaces a MOV+TEX pair with a
direct TEX from the input register when the MOV copies from the
input with identity swizzle. But it only checked the source swizzle,
not the MOV's writemask. When the MOV wrote a subset of the channels
the TEX reads (e.g., MOV TEMP.y, IN.y before a 2D TEX that reads
XY), the optimization replaced the TEX source with IN, losing the X
channel that was set by a different MOV.

This caused incorrect texture sampling coordinates in shaders with
multi-MOV texcoord construction (blur filters, shadow maps, etc.).

Fix: verify the MOV's dest writemask covers all channels the TEX
instruction reads before applying the optimization.

Assisted-by: Claude
2026-05-07 16:09:50 -04:00
Adam Jackson
b1e709384b i915: emit passthrough for empty TGSI fragment shaders
The TGSI compiler rejected empty fragment shaders (num_instructions
== 1, just TGSI_END) as errors. Instead, emit a passthrough program.

Assisted-by: Claude
2026-05-07 16:09:22 -04:00
Adam Jackson
5e1ada315c i915: improve shader-db stats reporting
Report actual instruction counts (alu+tex) instead of program dwords/3,
add a separate "alu" field for the 64-instruction bottleneck metric, and
fix "temps" to use the actual temp register count instead of
util_last_bit (highest register number).

Before: "69 inst, 2 tex, 3 tex_indirect, 4 temps, 5 const"
After:  "21 instructions, 19 alu, 2 tex, 2 tex_indirect, 16 temps, 3 const"

Assisted-by: Claude
2026-05-07 16:09:18 -04:00
Adam Jackson
2f5686e212 i915: pass NIR to draw instead of pre-converted TGSI
draw_vs.c already handles the non-native-integer NIR→TGSI conversion
internally, so i915 doesn't need to do it. keep nir_lower_point_size
(i915-specific lowering) and pass the result to draw as NIR.

Assisted-by: Claude
2026-05-07 16:09:07 -04:00
Samuel Pitoiset
470897f946 radv: allow DGC+multiview by default
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's now allowed in Vulkan.

Fixes: e47d584fed ("radv: re-introduce DGC+multiview support and enable it for vkd3d-proton only")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41395>
2026-05-07 17:08:22 +00:00
Skyth
ce4e54f7a0 spirv2dxil: Replace UAV_FENCE_THREAD_GROUP usage with UAV_FENCE_GLOBAL.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41425>
2026-05-07 16:51:25 +00:00
Tapani Pälli
c540405ca3 anv: use INTEL_NEEDS_WA_14025112257 define for workaround
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41281>
2026-05-07 16:20:29 +00:00
Tapani Pälli
c6f503bed6 iris: use INTEL_NEEDS_WA_14025112257 define for workaround
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41281>
2026-05-07 16:20:29 +00:00
Tapani Pälli
c381b4fdd4 intel/dev: update mesa_defs.json from workaround database
This removes 18042479026 as we don't utilize BRW_AOP_MOV in compiler
and adds missing xe2 entries for 14025112257.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41281>
2026-05-07 16:20:29 +00:00
Lionel Landwerlin
62b890046f anv: remove old entrypoints
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40387>
2026-05-07 15:49:20 +00:00
Lionel Landwerlin
f123030dcd anv: implement VK_KHR_device_address_commands
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40387>
2026-05-07 15:49:20 +00:00
Lionel Landwerlin
7adece7ce0 anv: fixup null address check
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40387>
2026-05-07 15:49:19 +00:00
Lionel Landwerlin
3ffca66b3c vulkan/runtime: fix invalid address flags value for CmdCopyBufferToImage2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a8e49be9d9 ("vulkan/runtime: add implementation of older entrypoints using KHR_DAC")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40387>
2026-05-07 15:49:19 +00:00
Icenowy Zheng
5d2cc50247 pvr: add dri options used by common WSI code
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The common Mesa Vulkan WSI code checks some DRI options.

Add them to the option list of the PVR driver.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41197>
2026-05-07 15:33:01 +00:00
Icenowy Zheng
41ed38615b pvr: prohibit clang-format from touching the dri options list
The DRI options list is formatted specically and clang-format cannot
handle it properly.

Disable clang-format for this snippet.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41197>
2026-05-07 15:33:01 +00:00
hmtheboy154
88f5e5986b pvr: add support for driconf for the Vulkan driver
Bringing force_vk_vendor as the first option, force_vk_devicename
will be added later

Signed-off-by: hmtheboy154 <buingoc67@gmail.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
[Icenowy: rebased on top of main]

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41197>
2026-05-07 15:33:01 +00:00
Christoph Pillmayer
109af1b077 pan/kmod: Fix uninitialized timestamp info
The kernel looks at drm_panthor_timestamp_info::flags, so it can't be
uninitialized.

Fixes: 302127fe ("pan/kmod: Add timestamp uapi support")
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/41418>
2026-05-07 13:37:25 +00:00
Faith Ekstrand
4714395eb8 pan/bi: Drop lower_index_to_offset from preprocess
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
dd2d30656d panfrost: Handle pre-Valhall images and texel buffers in lower_res_indices
There's no point in having these as separate passes that live in the
compiler.  We already have lower_res_indices(), which is panfrost's
equivalent to panvk's descriptor lowering.  We can just do it there.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
d0bdd18212 panfrost: Prefix valhall bits of lower_res_indices
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
4412f3bad7 panfrost: Take texture/sampler_index into account in lower_res_indices
We currently rely on nir_lower_tex_options::lower_index_to_offset but
there's really no reason for this.  Our pan_nir_res_handle() helper can
already take both an immediate and a dynamic index.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
0a69efb22b panvk: Add MAX_VS_ATTRIBS to image indices in panvk_nir_lower_descriptors
It's only a couple lines of code since we're already doing this for
UBOs.  It doesn't need to be a separate pass.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
c73d4e14f9 pan/nir/tex: Support full index+offset
Previously, we only supported one of the index or the offset source and
relied on lower_index_to_offset to ensure we only had one or the other.
However, now that we're doing things in NIR, it's trivial to support the
full index+offset form.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Pierre-Eric Pelloux-Prayer
61acf0e781 radeonsi: add tests subfolder and move AMD_TEST code inside
And move the exit(0) code to the si_tests function.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:21 +02:00
Pierre-Eric Pelloux-Prayer
61ae8f60d1 radeonsi/gfx: move static inline helpers to si_gfx.h
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:19 +02:00
Pierre-Eric Pelloux-Prayer
b833aeb9de radeonsi/gfx: remove unnecessary u_stub usage
Everything inside the gfx folder isn't built when HAVE_GFX_COMPUTE
isn't present so we don't need to stub these methods.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:17 +02:00
Pierre-Eric Pelloux-Prayer
4c080ae32e radeonsi: move function prototypes from si_pipe.h to si_gfx.h
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:15 +02:00
Pierre-Eric Pelloux-Prayer
714d3eb0b4 radeonsi: move more code to gfx subfolder
Anything related to shaders, compute, mesh, nir should be inside
this folder.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:09 +02:00
Pierre-Eric Pelloux-Prayer
79b09571bb radeonsi: move all multimedia files to mm
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:08 +02:00
Pierre-Eric Pelloux-Prayer
e4def8a61c radeonsi: add si_context.c
And move out most si_context code to the new file.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:06 +02:00
Pierre-Eric Pelloux-Prayer
b2db3e1ddc radeonsi: add si_gfx_context.c and move code from si_pipe.c
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:04 +02:00
Pierre-Eric Pelloux-Prayer
a335f4be7a radeonsi/gfx: move code from si_get to si_gfx_screen
These functions can be moved to the gfx subfolder and made static.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:02 +02:00
Pierre-Eric Pelloux-Prayer
d1c57f742e radeonsi/gfx: add si_gfx_screen.c
And move code specific to gfx/compute from radeonsi_screen_create_impl there.

ac_init_llvm_once has to stay in si_pipe.c because it has to be called very
early to avoid conflicts with u_queue initialisation.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:59 +02:00
Pierre-Eric Pelloux-Prayer
5f56a0e057 radeonsi: add si_resource_copy_buffer
Same as si_resource_copy_resource except it only supports buffers.

Also make sure that si_compute_clear_copy_buffer doesn't do
anything when has_gfx_compute is false.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:56 +02:00
Pierre-Eric Pelloux-Prayer
838ce62f3a radeonsi: extract si_init_gfx_caps from si_init_screen_caps
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:54 +02:00
Pierre-Eric Pelloux-Prayer
a325be9548 radeonsi: move shader cache code to new file
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:53 +02:00
Pierre-Eric Pelloux-Prayer
68a383531d radeonsi: add gfx subfolder
Same idea as for mm.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:47 +02:00
Pierre-Eric Pelloux-Prayer
4c08b87fe1 radeonsi: add si_init_screen_nir_options
Extract code from si_init_screen_get_functions to new helper.
The code assigning nir_options[] is moved out to help future
changes.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:45 +02:00
Pierre-Eric Pelloux-Prayer
e8cdd8ccb1 radeonsi: create a mm subfolder for multimedia code
Start moving code that's only for radeonsi multimedia support in this
folder to declutter si_pipe.c and si_get.c.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:42 +02:00
Pierre-Eric Pelloux-Prayer
b819ad62c2 radeonsi/vce: deal with has_gfx_compute being false
In this case the workaround can't be implemented so we must
report a failure.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:40 +02:00
Pierre-Eric Pelloux-Prayer
6e2d8c04be radeonsi: don't use staging texture when we can't blit
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:38 +02:00
Pierre-Eric Pelloux-Prayer
3a1c466084 radeonsi: add has_gfx_compute property to si_screen
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:36 +02:00
Pierre-Eric Pelloux-Prayer
931fc57f2a radeonsi: delay aux context initialization to first use
This avoids creating unneeded contexts.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:33 +02:00
Pierre-Eric Pelloux-Prayer
01c7a82760 gallium/vl: only release created sampler views
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:31 +02:00
Pierre-Eric Pelloux-Prayer
d4c23daffc radeonsi: handle NULL return value from amdgpu_cs
The next commits will make it possible that sctx->gfx_cs isn't
initialized so we can't assume anymore that amdgpu_cs() always
return a valid cs.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:27 +02:00
Christian Gmeiner
4dbdd4c0ee panvk: Advertise VK_EXT_extended_dynamic_state3
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: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40882>
2026-05-07 10:56:49 +00:00
Christian Gmeiner
fd2d3992ce panvk: Apply sample mask in single-sample mode
Per Vulkan spec, the pipeline sample mask applies to all rasterization
sample counts, including single-sample. Drop the msaa-conditional clamp
that forced the sample mask to UINT16_MAX when rasterizationSamples == 1
and just use vk_dynamic_graphics_state's value directly. The default
when no static pSampleMask is provided is already all-ones, so existing
behaviour is preserved for pipelines that don't set the mask.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40882>
2026-05-07 10:56:49 +00:00
Icenowy Zheng
3afc792dc8 pvr: setup viewindex if the shader wants it even when multiview disabled
It's possible to use a shader that has ViewIndex input when multiview
isn't enabled. According to the Vulkan specification, when multiview
isn't enabled in a renderpass, the value of the ViewIndex input should
be 0.

However currently the driver does not emit execution of the PDS code
setting up view index, which leads to stale value to remain in
ViewIndex.

Setup the PDS code for setting view index and emit the command stream
for executing that PDS code when the shader wants ViewIndex, even if
multiview isn't enabled.

Fixes: 9d48088428 ("pvr: add view index support for vertex shaders")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Nick Hamilton <nick.hamilton@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40972>
2026-05-07 10:41:37 +00:00
Julia Zhang
d4b2e53ef3 radv: advertise VK_EXT_pipeline_protected_access
Advertise VK_EXT_pipeline_protected_access when TMZ is supported by the
physical device.

Signed-off-by: Julia Zhang <Julia.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41224>
2026-05-07 10:00:30 +00:00
Eric Engestrom
665ebce297 docs: fix unescaped *
Fixes: 10f2c308c1 ("docs: add release notes for 26.1.0")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41406>
2026-05-07 09:49:34 +00:00