Samuel Pitoiset
cd91d2f4ab
radv: add radv_cmd_set_patch_control_points()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:16 +00:00
Samuel Pitoiset
97597f65bf
radv: add radv_cmd_set_tessellation_domain_origin()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:15 +00:00
Samuel Pitoiset
091f8d53cb
radv: add radv_cmd_set_line_width()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:15 +00:00
Georg Lehmann
e270a7480b
nir/lower_io: fix boolean output stores
...
Stores don't have a definition, we have to check the bit size of the source.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13762
Fixes: c217ee8d35 ("nir: Insert b2b1s around booleans in nir_lower_to")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Mary Guillemard <mary@mary.zone >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36966 >
2025-08-27 08:46:34 +00:00
Georg Lehmann
13a9f27432
ac/nir: do not assume mesh cull flag is 1bit
...
It will no longer be 1bit after a nir/lower_io bug is fixed.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36966 >
2025-08-27 08:46:33 +00:00
Georg Lehmann
8a5178755e
radv: reorder cmat properties according to performance
...
On GFX12, int8 is twice as fast as fp16/bf16.
On GFX11, they have the same throughput, but int8 at least still uses
less registers.
Also reorder 16bit accumulators before 32bit, because they use less
registers on GFX12.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37002 >
2025-08-27 08:20:47 +00:00
Georg Lehmann
5a10142a9f
radv/nir/lower_cmat: split up larger nested switches
...
This has been annoying me for quite some while, the level of indention
makes reviewing code changes in Gitlab harder.
I think now is a good time to change this before more cmat lowering is added.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37002 >
2025-08-27 08:20:47 +00:00
Georg Lehmann
047b95a8c3
nir/shrink_vec_array_vars: detect zero init shared memory using constant initializer
...
More consistent.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36956 >
2025-08-27 06:37:41 +00:00
Georg Lehmann
edc5bea61e
nir/shrink_vec_array_vars: update constant initializer after shrinking
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13751
Fixes: c7df3b4f64 ("nir/shrink_vec_array_vars: allow nir_var_mem_shared")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36956 >
2025-08-27 06:37:41 +00:00
Samuel Pitoiset
47cca88f3c
radv: check flush_bits before calling radv_emit_cache_flush() in the draw path
...
This is also 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
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
...
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
...
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
...
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
Guilherme Gallo
70a2eec2ab
ci/baremetal: Use curl-with-retry in build scripts
...
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36946 >
2025-08-26 21:58:02 +00:00
Guilherme Gallo
5e745f653f
ci/android: Use curl-with-retry in build scripts
...
Let's standardize llvm android build script, by calling the
`curl-with-retry` instead of a specific curl arg set.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36946 >
2025-08-26 21:58:02 +00:00
Guilherme Gallo
a51b12bbf6
ci/android: Use find_s3_project_artifact in build script
...
So we can reuse artifact finding functionality and also can make the
`gallo/mesa` workaround to work.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36946 >
2025-08-26 21:58:02 +00:00
Guilherme Gallo
de5f96b4de
ci/baremetal: Use find_s3_project_artifact on baremetal_build.sh
...
So we can reuse artifact finding functionality and also can make the
`gallo/mesa` workaround to work.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36946 >
2025-08-26 21:58:02 +00:00
Faith Ekstrand
50f5ade796
nak: Assert that QMDs are big enough
...
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