Commit graph

211085 commits

Author SHA1 Message Date
Samuel Pitoiset
c32facfb3e radv: add radv_cmd_set_rasterization_samples()
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:25 +00:00
Samuel Pitoiset
af2197ea99 radv: add radv_cmd_set_sample_mask()
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:25 +00:00
Samuel Pitoiset
77d5074263 radv: add radv_cmd_set_alpha_to_one_enable()
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:24 +00:00
Samuel Pitoiset
1de1f7980e radv: add radv_cmd_set_alpha_to_coverage_enable()
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:24 +00:00
Samuel Pitoiset
fe6f97c9dc radv: add radv_cmd_set_line_rasterization_mode()
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:23 +00:00
Samuel Pitoiset
7810422fc7 radv: add radv_cmd_set_depth_clamp_enable()
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:23 +00:00
Samuel Pitoiset
072a6d27bc radv: add radv_cmd_set_provoking_vertex_mode()
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:22 +00:00
Samuel Pitoiset
38df84be41 radv: add radv_cmd_set_conservative_rasterization_mode()
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:22 +00:00
Samuel Pitoiset
5d3110a4bf radv: add radv_cmd_set_depth_clip_enable()
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:21 +00:00
Samuel Pitoiset
228c091f5e radv: add radv_cmd_set_line_stipple_enable()
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:21 +00:00
Samuel Pitoiset
1d1cb876c9 radv: add radv_cmd_set_polygon_mode()
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:21 +00:00
Samuel Pitoiset
e6b2f03fb9 radv: add radv_cmd_set_rasterizer_discard_enable()
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:20 +00:00
Samuel Pitoiset
54e0d5a753 radv: add radv_cmd_set_depth_bias_enable()
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:20 +00:00
Samuel Pitoiset
b51d648cea radv: add radv_cmd_set_front_face()
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:19 +00:00
Samuel Pitoiset
8e03f7a8b8 radv: add radv_cmd_set_cull_mode()
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:18 +00:00
Samuel Pitoiset
4663628258 radv: add radv_cmd_set_line_stipple()
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:18 +00:00
Samuel Pitoiset
7cef87c57b radv: add radv_cmd_set_depth_bias()
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:17 +00:00
Samuel Pitoiset
b6105f3b5d radv: add radv_cmd_set_primitive_restart_enable()
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:17 +00:00
Samuel Pitoiset
8296373e78 radv: add radv_cmd_set_depth_clip_negative_one_to_one()
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:17 +00:00
Samuel Pitoiset
2ed84bbe35 radv: add radv_cmd_set_depth_clamp_range()
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
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
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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
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