Commit graph

212972 commits

Author SHA1 Message Date
Samuel Pitoiset
c122d70dfd radv: set radv_gfx12_hiz_wa=partial for some games to mitigate performance loss
The full workaround can hurt performance and there is no other known
solution. The only one is to select which HiZ WA works the best by
trial and error.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36174>
2025-09-11 15:21:50 +00:00
Samuel Pitoiset
b00b8c763b radv: disable radv_disable_hiz_his_gfx12 for Mafia Definition Edition
This should be properly fixed now. Also remove this drirc option which
should no longer be needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36174>
2025-09-11 15:21:50 +00:00
Samuel Pitoiset
ec09ac1501 radv: switch to the full HiZ workaround by default on GFX12
The full HiZ workaround is the only one that fixes the issue reliably.

Sadly, the performance results are mixed and sometimes it hurts. To
maintain performance, RADV will opt-in by selecting which workarounds
to apply from drirc.

As we can't know the full list of games that will be affected by a
potential performance regression, users are encouraged to try with
RADV_GFX12_HIZ_WA (see Mesa documentation for more explanations).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36174>
2025-09-11 15:21:50 +00:00
Samuel Pitoiset
5f8f4686bf radv: replace RADV_GFX12_HIZ_WA by a drirc option
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36174>
2025-09-11 15:21:50 +00:00
Samuel Pitoiset
0a2ef363a8 radv: report an message when RADV_GFX12_HIZ_WA value is invalid
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36174>
2025-09-11 15:21:50 +00:00
Erik Faye-Lund
fc0418a69f aux/pp: fixup sampler-view release
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Without this, the prost-processing mechanism crashes badly, whoops.

Fixes: 73da0dcddc ("gallium: eliminate frontend refcounting from samplerviews")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37290>
2025-09-11 13:44:55 +00:00
Karol Herbst
b584b47d01 rusticl/mem: fix Image::read for 1Darray images
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Some drivers do not return identical strides when mapping 1Darray images
leading to data being written in the wrong place.

Cc: mesa-stable
Tested-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37284>
2025-09-11 09:26:30 +00:00
Samuel Pitoiset
ec87f1338f radv: emit more push shader registers on GFX12
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
They are supposed to be slightly faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37256>
2025-09-11 06:47:40 +00:00
Samuel Pitoiset
9039f33a8d Revert "radv: handle fbfetch output after binding graphics shaders"
This is actually wrong because if radv_handle_fbfetch_output() triggers
a decompression pass and graphics shaders (ESO) are saved/restored
they won't be updated because radv_bind_graphics_shaders() was called
before.

This fixes a very recent regression that I noticed while implementing
a new extension.

This reverts commit 9b912f00c7.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37194>
2025-09-11 06:22:20 +00:00
Samuel Pitoiset
b69b953973 radv: add RADV_DEBUG=bo_history
This dumps the BO history to /tmp/radv_bo_history.log after each BO
operations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37062>
2025-09-11 06:03:15 +00:00
Rob Clark
0fe652971e freedreno/a6xx: Add missing format
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: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37279>
2025-09-11 03:08:54 +00:00
Rob Clark
6ab682e5f2 freedreno/blitter: Don't ignore blit swizzle
Noticed by inspection.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37279>
2025-09-11 03:08:54 +00:00
Rob Clark
250dba1dce freedreno/a6xx: Fallback to original blit in the snorm_copy path
Unlike z/s blits, where we want the fallback to use the re-written blit,
we don't want this in the handle_snorm_copy_blit() path.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37279>
2025-09-11 03:08:54 +00:00
Caio Oliveira
03e9c01f0c brw: Add and use more brw_validate.cpp macros
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add and use more comparison variants (which provide more detailed print
out of the values), remove old references to "fsv" and "scalar", use
assertion names more similar to GoogleTest that we already use
elsewhere.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37267>
2025-09-10 17:44:38 -07:00
Mel Henning
a9ea4630d4 nak: Make BindlessSSA store [SSAValue; 2]
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reduces the size of ir::Src from 40 bytes down to 32 bytes. This
makes the size of ir::Op fall from 272 bytes down to 232 bytes, meaning
we save 40 bytes per instruction.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37130>
2025-09-10 22:25:13 +00:00
Mel Henning
8ac9b077b1 nak/assign_regs: Make src_ssa_ref return a slice
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37130>
2025-09-10 22:25:13 +00:00
Mel Henning
d21a4d9e50 nak: impl HasRegFile for SSARef and &[SSAValue]
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37130>
2025-09-10 22:25:13 +00:00
Mel Henning
603d7f9413 nak: Remove Option<> from SSARef::file() return
Nothing actually wants to mix register files in a SSARef so in practice
no callers really handled the None return case. Panic on that case
instead.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37130>
2025-09-10 22:25:12 +00:00
Dylan Baker
08a3497223 anv: add assertion that tes and tcs data is non-null
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It doesn't make any sense ot have TCS but not TES (or vice versa), but
coverity doesn't realize that. Add an assertion that they are both
non-null before we start reading them.

Fixes: 50fd669294 ("anv: prep work for separate tessellation shaders")
CID: 1665360
CID: 1665327
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37266>
2025-09-10 18:18:42 +00:00
Dylan Baker
ecfce9f9ad blorp: Fix potential read of uninitaized elk fields in debug paths
The intel_vue_map is only partially initialized before being used. All
used fields are initialized, but in debug paths the unitialzed fields
will also be read. To fix this initialize the struct to 0. In the brw
path this struct is part of the prog_data, and is rzalloc'd.

CID: 1665308
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37261>
2025-09-10 17:51:34 +00:00
Dylan Baker
6fe4b7344d isl: prevent potential overflow before widen
Fixes: 73608eb8b7 ("isl: Add support for creating layered surfaces for video encode/decode")
CID: 1665354
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37260>
2025-09-10 17:01:40 +00:00
Dylan Baker
f18aca8689 intel/brw: Fix implementaiton of |= operator for enum
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The current implementation does nothing, since it has no side effects,
only a return value. By passing `x` as a reference we can mutate the
value before returning.

Fixes: df37c7ca74 ("brw: fix analysis dirtying with pulled constants")
CID: 1665293
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37263>
2025-09-10 16:30:19 +00:00
Dylan Baker
70ebc14de9 anv: avoid potential integer overflow in video address calculation
Coverity caught one instance of this, by visual inspection I found
another case.

Fixes: 3fb25cc78a ("anv: Add support for creating layered surfaces for video encode/decode")
CID: 1665326
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37262>
2025-09-10 16:06:37 +00:00
Anna Maniscalco
011ba1842e freedreno/registers: add CP_ALWAYS_ON_CONTEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37237>
2025-09-10 15:10:14 +00:00
Samuel Pitoiset
1da270fb35 radv/amdgpu: add more helpers for managing virtual BOs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All these new helpers will make the SMEM PRT workaround better
organized.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37193>
2025-09-10 14:50:25 +00:00
Samuel Pitoiset
3c4168a3cc radv/amdgpu: return OOM device when BO mapping fails
It's more appropriate than VK_ERROR_UNKNOWN.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37193>
2025-09-10 14:50:24 +00:00
Valentine Burley
fd6d285417 zink/ci: Add a new Minecraft restricted trace
From @zmike, it exposes a very niche corner case bug in zink.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37270>
2025-09-10 14:35:23 +00:00
David Rosca
9d9fc1fe72 radeonsi/vcn: Get rid of PIPE_ALIGN_IN_BLOCK_SIZE
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37143>
2025-09-10 13:27:54 +00:00
David Rosca
8eb84f8854 radeonsi/vcn: Fix calculating QP map region dimensions
It needs to be aligned to block size otherwise it would skip last
row/column on resolutions like 1080p.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37143>
2025-09-10 13:27:54 +00:00
Mike Blumenkrantz
5fefb9e795 zink: flag vertex element state for rebind after vstate draws
vstate draws bind their own elements unrelated to the bound
gallium elements, so any draw occurring after a vstate draw must
rebind to ensure the correct ones are bound

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

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37274>
2025-09-10 13:06:07 +00:00
David Rosca
a03a79aa9d pipe: Remove PIPE_VIDEO_CAP_PREFERS/SUPPORTS_INTERLACED
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632>
2025-09-10 12:33:57 +00:00
David Rosca
6954460899 radeonsi/video: Remove support for interlaced buffers
This is not used anymore with VDPAU removed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632>
2025-09-10 12:33:57 +00:00
David Rosca
223d3ec433 gallium/vl: Remove now unused filters
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632>
2025-09-10 12:33:57 +00:00
David Rosca
4b54277d2e Remove VDPAU
VDPAU only supports X11 and GL interop. There is no Wayland or Vulkan
interop support. The API has limitations that makes it impossible to
correctly decode certain streams.
Application support is also very limited, and VAAPI is always a better
choice over VDPAU.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632>
2025-09-10 12:33:57 +00:00
David Rosca
e7ea1233b1 mesa: Remove NV_vdpau_interop
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632>
2025-09-10 12:33:57 +00:00
David Rosca
272bde24a3 ci: Stop building VDPAU driver
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632>
2025-09-10 12:33:57 +00:00
Mary Guillemard
497005dc18 panvk: Enable SNORM rendering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Blending should work properly those days.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/37271>
2025-09-10 12:15:06 +00:00
Mary Guillemard
f707f093ec panvk: Do not clamp blend constants in command buffer
This is wrong for SNORM and this is handled by nir_lower_blend.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/37271>
2025-09-10 12:15:06 +00:00
Lionel Landwerlin
1646e7d311 anv: run nir_opt_acquire_release_barriers
In the middle of writing all this new shader object compile code, this
pass got added and I missed adding it to the shader object path.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d39e443ef8 ("anv: add infrastructure for common vk_pipeline")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37269>
2025-09-10 11:47:05 +00:00
Konstantin Seurer
7c9e945460 radv,vulkan: Avoid a useless barrier in radv_update_bind_pipeline
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/36982>
2025-09-10 08:35:50 +00:00
Konstantin Seurer
a35dfab281 radv: Use vk_barrier_compute_w_to_compute_r more
vk_barrier_compute_w_to_compute_r shows up in rgp captures and is less
code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36982>
2025-09-10 08:35:50 +00:00
Konstantin Seurer
850f339b89 vulkan: Add more detail to encode debug markers
Useful for radv because radv has quite a few different configurations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36982>
2025-09-10 08:35:50 +00:00
Konstantin Seurer
5c94e20abe vulkan: Use a struct for debug markers
Improves u_trace integation with anv.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36982>
2025-09-10 08:35:50 +00:00
Ella Stanforth
01c7c97ef7 util/tests: Add list iterator tests
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37061>
2025-09-10 07:38:25 +00:00
Ella Stanforth
d943a91b71 util/list: Add iterator debug to more routines.
Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37061>
2025-09-10 07:38:24 +00:00
Ella Stanforth
6863223033 util/list: Fix next instruction removal usecase for non safe iterators
Introducing this iterator debug information breaks the usecase of removing
elements in the list other than the current element.

Fixes: 372e83b95f

Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37061>
2025-09-10 07:38:24 +00:00
Samuel Pitoiset
c739d836f7 radv: exclude dynamic vertex input stride for the late scissor workaround
RADV_DYNAMIC_VERTEX_INPUT_BINDING_STRIDE doesn't emit any context
registers, so it can be excluded for the late scissor workaround to
avoid re-emitting scissors all the time it's dirty.

This fixes a performance regression noticed with Cyberpunk on Vega10,
but other games are likely affected too. The late scissor workaround is
only applied on Raven/Vega10.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13828
Fixes: d7f401c2bb ("radv: bind the vertex binding strides like a normal dynamic state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37252>
2025-09-10 07:09:48 +00:00
abdelhadi
3a41644165 aco, radv: remove line duplicate
Signed-off-by: abdelhadi <abdelhadims@icloud.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37243>
2025-09-10 06:34:43 +00:00
Lionel Landwerlin
33d2c31d7a brw: don't use brw_null_reg() for unused SEND sources
Just avoiding the validation assert.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 47fe9d28e7 ("brw: Enumerate SHADER_OPCODE_SEND sources and standardize how many")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13777
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37112>
2025-09-10 09:08:27 +03:00
Timothy Arceri
11a434f3df glsl: remove now unused NumUniformRemapTable
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36997>
2025-09-10 05:11:47 +00:00