Commit graph

195349 commits

Author SHA1 Message Date
Samuel Pitoiset
5aba130eab radv: check if SQTT is enabled before calling radv_describe_draw()
This is faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37005>
2025-08-27 06:19:14 +00:00
Samuel Pitoiset
a3f9d85270 radv: add a new state for forced VRS rates
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37005>
2025-08-27 06:19:14 +00:00
Samuel Pitoiset
6d1e7c2ddf radv: clear descriptors state dirty bit outside of the caller
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37005>
2025-08-27 06:19:13 +00:00
Samuel Pitoiset
9b912f00c7 radv: handle fbfetch output after binding graphics shaders
uses_fbfetch_output might be updated when a fragment shader is bound.
This would only affect ESO and I'm not sure it's possible though.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37005>
2025-08-27 06:19:13 +00:00
Samuel Pitoiset
664c9697aa radv: clear RADV_CMD_DIRTY_xxx bits outside of the caller in more cases
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37005>
2025-08-27 06:19:13 +00:00
Julia Zhang
20b809f1f0 pps: init driver in OnSetup
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Initialization of driver has been moved to register_data_source() from
OnSetup() by: a739889789 ("pps: Report available counters when
gpu.counters* data source is registered")

With above change, pps will destroy driver when collecting data stops
(pps may keep running) then the driver will become nullptr when user try
to collect data again. This will cause segmentation fault in OnSetup().

So this remove driver = nullptr in OnStop() and init driver in OnSetup()
to make sure driver exists when pps-producer run more than once.

Fixes: a739889789 ("pps: Report available counters when gpu.counters*
data source is registered")

Signed-off-by: Julia Zhang <Julia.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36548>
2025-08-27 02:27:03 +00:00
Faith Ekstrand
a1d5e8bfdb compiler/rust: Fix the DFS loop detection algorithm
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The previous algorithm just looked at the dominator's loop header.
However, if you have multiple consecutive loops like:

    function_impl {
        loop {
            // Stuff
        }
        loop {
            // Other stuff
        }
    }

then it will look like the second loop is contained in the first loop
because the first loop's header dominates the second loop.  This isn't
actually what we want.  Instead, we want a node N to be considered part
of a loop with header H if H dominates N and H is reachable from N.

Fixes: 741f7067f1 ("nak: Add loop detection to the CFG")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36524>
2025-08-27 01:20:05 +00:00
Faith Ekstrand
ab97fea323 nak: Increase Imma latencies on Blackwell by 4
We already do +8 on HMMA.  This gives us a +4 on IMMA which seems to fix
the test failures I'm seeing.  This fixes the IMMA CTS tests on my RTX
5090 with NAK_DEBUG=spill.

Fixes: 477533ee00 ("nvk: add sm120 latencies via csv files.")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36524>
2025-08-27 01:20:05 +00:00
Mel Henning
606fa193af nvk: Reduce subc switches in cmd_invalidate_deps
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37018>
2025-08-27 01:04:51 +00:00
Mel Henning
cb22409d72 nvK: Add nvk_cmd_buffer_last_subchannel
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37018>
2025-08-27 01:04:51 +00:00
Mel Henning
abd374628b nvk: Split out NVC0_FIFO_SUBC_FROM_PKHDR helper
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37018>
2025-08-27 01:04:50 +00:00
Mohamed Ahmed
7692d3c0e1 nvk: Advertise VK_KHR_maintenance9
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35804>
2025-08-27 00:50:27 +00:00
Mohamed Ahmed
b7be6e73c9 nvk: Add support for VK_QUERY_POOL_CREATE_RESET_BIT_KHR
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35804>
2025-08-27 00:50:27 +00:00
Mohamed Ahmed
bfc6ec0981 nvk: Skip creating a nvkmd device if we don't have to
KHR_maintenance9 allows for the creation of VkDevices with no queues for the
purpose of offline compilation and other similar usages. Notably, devices with
0 queues aren't allowed to allocate memory, create command buffers, or create
fences/semaphores; this allows us to completely skip creating a nvkmd device
and going through the kernel for these objects.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35804>
2025-08-27 00:50:27 +00:00
Mohamed Ahmed
969e639344 nvk: Ensure we have nvkmd before sampler descriptor upload
We need to be able to create samplers without necessarily having to have to
upload them. This is to allow us later to create a VkDevice without having to
touch the kernel for VkDevice objects without VkQueues used for things like
shader compilation.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35804>
2025-08-27 00:50:27 +00:00
Mohamed Ahmed
5945d42d3b nvk: Ensure we have nvkmd before shader upload
This is to allow us later to create a VkDevice without having to touch the
kernel for VkDevice objects without VkQueues used for things like shader
compilation.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35804>
2025-08-27 00:50:27 +00:00
Mohamed Ahmed
49db51e5ff nak: Enable lowering for bitfield manipulation at <32bit sizes
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35804>
2025-08-27 00:50:27 +00:00
Mohamed Ahmed
16f3b9d984 nak: Fix 64-bit bit_count, ufind_msb, ifind_msb, find_lsb
Previously, these were going through nir_lower_bit_size, which handles
upscaling from lower bit sizes to 32-bit only and is incorrect for higher sizes.
This change uses nir_lower_int64 instead, which handles them properly and
correctly.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35804>
2025-08-27 00:50:27 +00:00
Ritesh Raj Sarraf
3dc9f2f70f ci: Uprev kernel to pick up virtio fix and use it for venus
The regressed changes have been reverted for Linux 6.16 in commit 9d85a32f0e6bf6878676a9ec7ce3c8032c500c7c

This should now allow us to use Linux 6.16 for the rest of the testing

Signed-off-by: Ritesh Raj Sarraf <ritesh.sarraf@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36909>
2025-08-27 00:15:57 +00:00
Faith Ekstrand
0a14ce7f50 nak: NAK_MAX_QMD_SIZE_B should be 384
Also add a static assert so we don't miss this again.

Fixes: 00a845a698 ("nak/qmd: QMD versions 4.0 and 5.0 are both 384B")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37015>
2025-08-27 00:00:54 +00:00
Mel Henning
265afd9bfd loader: Don't fall back to nouveau GL without zink
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Long term, we don't want to support nouveau gl on new cards. Remove
the fallback so users without zink will get software rendering
instead of nouveau gl.

For now, NOUVEAU_USE_ZINK will still select nouveau gl on cards where
that is possible, but that isn't really supported and will likely be
removed for a lot of cards in the future.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36971>
2025-08-26 23:36:46 +00:00
Autumn Ashton
8e1734d2f2 radv: Allow MUTABLE_FORMAT and EXTENDED_USAGE for qp_map images
Signed-off-by: Autumn Ashton <misyl@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36943>
2025-08-26 23:19:58 +00:00
Autumn Ashton
f4597930ef radv: Support VK_IMAGE_TILING_OPTIMAL for quantization maps
Saw this when implementing something else, that I could just add the handling here to radv_choose_tiling in order to expose OPTIMAL.

Signed-off-by: Autumn Ashton <misyl@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36943>
2025-08-26 23:19:58 +00:00
Faith Ekstrand
50f5ade796 nak: Assert that QMDs are big enough
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:20 +00:00
Faith Ekstrand
0c71f5f1bd nouveau/headers: Add a MAX_BIT for structs
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:20 +00:00
Faith Ekstrand
00a845a698 nak/qmd: QMD versions 4.0 and 5.0 are both 384B
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Backport-to: 25.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:20 +00:00
Faith Ekstrand
0e268dad00 nvk: Allow for larger QMDs
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Backport-to: 25.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:20 +00:00
Faith Ekstrand
238534e069 nak/hw_runner: Allow for variable sized QMDs
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Backport-to: 25.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:19 +00:00
Faith Ekstrand
02ef6a5158 nak: Add a nak_qmd_size_B() query
Also add a #define NAK_QMD_ALIGN_B for alignments.  The alignment is
always 256B and there's no evidence of that changing.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Backport-to: 25.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:19 +00:00
Faith Ekstrand
8e93a763a3 nouveau/push: Handle more recent versions of 6F
This also requires us to rework SET_OBJECT handling a bit.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:19 +00:00
Faith Ekstrand
38108b2c4b nvk,nvkmd: Move push dumping to NVKMD
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:19 +00:00
Faith Ekstrand
7a50d7004b nvk/nvkmd: Track all memory objects by default
A single lock on allocate/free is nothing compared to the ioctls we're
already taking.  This ensures that we always have all our memory
objects.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:19 +00:00
Faith Ekstrand
7f95c07080 nvk/nvkmd: Stop setting WAIT_FOR_SUBMIT for sync
We add the syncobj and exec right before the wait so we know it's been
submitted. WAIT_FOR_SUBMIT does nothing except fail to catch potential
errors.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:18 +00:00
Faith Ekstrand
63263baeca nak: Lower away ldcx when NAK_DEBUG=no_ugpr is set
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36995>
2025-08-26 21:42:18 +00:00
Mary Guillemard
becccebd21 nvk: Use MEM_LOCAL for nvk_cmd_mem_create
It is safe to allocate command buffer memory as MEM_LOCAL (VRAM or GART)
when we can map GPU memory (we trust NVKMD to force GART).

This reduces latency on pyrowave for compute dispatch (~1.90ms -> ~1.48ms),
likely as QMD and the root tables should not have been in GART in the first place.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36970>
2025-08-26 21:25:08 +00:00
Mary Guillemard
5d77057ff6 nvk: Force GART for command buffers
We are already always allocating on GART at the moment, let's force it
for now as we are going to change the default.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36970>
2025-08-26 21:25:08 +00:00
Alexandros Frantzis
67f9aac728 egl/wayland: Support pbuffer surfaces
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13454
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36064>
2025-08-26 20:03:23 +00:00
Tapani Pälli
ad2ef16198 iris/anv: toggle on CACHE_MODE_0::MsaaFastClearEnabled on BMG G31
This increases rate of depth fast clear rate on BMG G31
per HSD 22020044224.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35966>
2025-08-26 19:35:34 +00:00
Tapani Pälli
c65f5cd36d intel/dev: provide a helper to detect bmg g31 device
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35966>
2025-08-26 19:35:33 +00:00
Tapani Pälli
2c9bc313a0 intel/genxml: update CACHE_MODE_0 register for gfx200
Field that we currently utilize does not change place, however
there are some new fields so let's update contents to match spec.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35966>
2025-08-26 19:35:33 +00:00
Eric R. Smith
9b4eb81162 panvk: revised occlusion query pointer fix
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It turns out that the `occlusion_query.syncobj` is used to set
state that later code relies on, and setting it to NULL causes
some Vulkan CTS tests to fail. Instead, we should explicitly check
for the mode being `MALI_OCCLUSION_MODE_DISABLED` to avoid using
an invalid `ptr` field.

Fixes: 24c692c981 ("panvk: fix a NULL pointer dereference in occlusion queries")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36794>
2025-08-26 18:42:27 +00:00
Robert Mader
461e3848b9 panfrost: Add lowerings for the NV61, NV24 and NV42 pixel formats
For now only add the fallback variants with multiple sampler views in
order to keep things simple.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36890>
2025-08-26 18:08:37 +00:00
Robert Mader
6c83ae95a2 mesa: Add support for NV61, NV24 and NV42 pixel formats
Which are essentially variants of NV12. All of them have been tested
with the Weston client-buffer test with llvmpipe and radeonsi.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36890>
2025-08-26 18:08:37 +00:00
Ahmed Hesham
61fd24c552 rusticl: Fix negative CTS device tests
`clRetainDevice` and `clReleaseDevice` ignore the device argument, it
should be checked for validity and return `CL_INVALID_DEVICE` if it
fails.

`check_cl_device_type` fails if entrypoint is passed `0` as the device
type. Zero as an input for a bitwise and operation will always result
in a zero, so the utility function fails to return
`CL_INVALID_DEVICE_TYPE`.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37008>
2025-08-26 17:52:40 +00:00
Yiwei Zhang
c4e5661f29 vulkan/android: improve stage masks for semaphore ops
Strictly speaking, for an empty batch, there is no inherit/defined
ordering between the wait and signal operations within the batch. We
are relying on MESA impl defined behavior to transfer payloads of the
wait sempahores to the signal sempahore here.

Ideally we need a MESA internal hint to ensure transitivity, but since
this is on the legacy fallback path, it's not worth the effort. So here
we follow common wsi to use TRANSFER_BIT which avoids most unnecessary
stalls on the queue (an improvement over the previous ALL_COMMANDS_BIT).

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36855>
2025-08-26 17:24:09 +00:00
Yiwei Zhang
d72d0e8580 vulkan/android: skip queue submit with copy_sync_payloads
Follows common wsi side for the same reason as explained in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827

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/36855>
2025-08-26 17:24:08 +00:00
Yiwei Zhang
9ce92584ed vulkan/runtime: silence a -Wsometimes-uninitialized warning
../src/vulkan/runtime/vk_device.c:746:28: warning: variable
'was_signaled' is used uninitialized whenever 'for' loop exits
because its condition is false [-Wsometimes-uninitialized]

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/36855>
2025-08-26 17:24:08 +00:00
Yiwei Zhang
5372fe7cc4 vulkan/android: switch to vkQueueSubmit2
This follows common wsi side as suggested, and simplifies the later
adoption of vk_device_copy_semaphore_payloads.

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/36855>
2025-08-26 17:24:07 +00:00
Yiwei Zhang
3a5514febf vulkan/android: add an early return when there's no wait semaphores
..and no need to give result a default.

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/36855>
2025-08-26 17:24:07 +00:00
Yiwei Zhang
3bf63a7e36 nvk: refactor nvk_CreateImage error path
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
...and fixes some tabs to spaces.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36996>
2025-08-26 17:09:20 +00:00