Commit graph

222433 commits

Author SHA1 Message Date
Alyssa Rosenzweig
c2a423b5b5 jay/lower_scoreboard: rename gpr_range -> key
for clarity since UGPRs are here too.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
d549fb9c04 jay/lower_scoreboard: compact inst_exec_pipe
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
adaae3baf1 jay/lower_scoreboard: control flow is int pipe
according to IGC output.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
039b76d07c jay/lower_scoreboard: factor regdist logic out
no change, just hoisting the loop & reindenting.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
a7b8395c15 jay/lower_scoreboard: run RegDist globally
poking around, it seems branches stall the pipelines so we don't need to do any
dataflow analysis, but we do need to fall through for correctness. just keep
going across block boundaries. this isn't optimal yet but it reduces a
pile of A@1's already.

Totals from 1389 (52.47% of 2647) affected shaders:
CodeSize: 56385376 -> 56325776 (-0.11%); split: -0.13%, +0.03%

--

this also fixes issues where the first instruction of a block is a SEND that has
an unmet register dependency, since the old code was fundamentally broken. oops.
lol. fixes
dEQP-VK.compute.pipeline.workgroup_memory_explicit_layout.zero.uint8_t_array_to_uint_array_1
among many others.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
52224bb597 jay/lower_scoreboard: refactor
no functional change, just reshuffling code for next commit.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
3a7baf2cde jay/lower_scoreboard: fix trivial scheduling
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00
Alyssa Rosenzweig
7ba6e9810a jay: clarify development model
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00
Alyssa Rosenzweig
45d63539a6 jay: have proper UNDEF
matches NIR's broken semantics but allows more opts later. just a rename here.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00
Alyssa Rosenzweig
c2911dd688 jay: fix comment
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00
Alyssa Rosenzweig
3d94ba1d20 jay: make indirect push data blow up more obviously
fail to crash:

dEQP-VK.spirv_assembly.instruction.compute.untyped_pointers.glsl_memory_model.basic_usecase.load.push_constant.int32

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:31 +00:00
Alyssa Rosenzweig
b10c0d95a8 jay: optimize pack_32_2x16_split(#0, x)
Kinda pointless but whatever.

Totals from 10 (0.38% of 2647) affected shaders:
Instrs: 6846 -> 6830 (-0.23%)
CodeSize: 95728 -> 95520 (-0.22%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:31 +00:00
Alyssa Rosenzweig
5ebf0c9161 jay: elide atomic dests
simd16 results. kinda noisy but obviously the right thing to do.

Totals from 45 (1.70% of 2647) affected shaders:
Instrs: 59182 -> 59194 (+0.02%); split: -0.11%, +0.14%
CodeSize: 905200 -> 904752 (-0.05%); split: -0.17%, +0.12%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:31 +00:00
Alyssa Rosenzweig
b3fe01e2c1 jay: fix bfn with 0xffff constant
awkward.

Totals from 128 (4.84% of 2647) affected shaders:
Instrs: 258121 -> 257970 (-0.06%); split: -0.07%, +0.01%
CodeSize: 3662400 -> 3661792 (-0.02%); split: -0.14%, +0.12%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:30 +00:00
Alyssa Rosenzweig
c5cee5d973 jay: add JAY_DEBUG=noacc option
can help when debugging RA.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:30 +00:00
Alyssa Rosenzweig
9dbaaecb74 jay: swap predication/acc pass order
Lets us use more accumulators, I think this is well motivated. Saw this in a
test shader.

Totals from 242 (9.14% of 2647) affected shaders:
Instrs: 1365060 -> 1365035 (-0.00%); split: -0.00%, +0.00%
CodeSize: 20678592 -> 20680096 (+0.01%); split: -0.01%, +0.02%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:30 +00:00
Mike Blumenkrantz
afa9ab41b9 meson: fix renderdoc integration define
this should be an integer

Fixes: 93390d4b73 ("vk/runtime,zink: only integrate renderdoc on supported platforms")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41519>
2026-05-12 22:11:27 +00:00
Pavel Ondračka
6cb04bb791 r300/ci: run EGL deqp tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41517>
2026-05-12 21:52:34 +00:00
squidbus
2f63d09270 kk: Support shaderCullDistance
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Uses an approach based on HoneyKrisp. In the vertex shader, an
extra output writes 1 if the cull distance is >= 0, otherwise it
writes 0. In the fragment shader, if the extra outputs from the
vertex shader interpolate zero, all cull distances are < 0, so
the primitive is culled by discarding fragments.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41463>
2026-05-12 20:38:24 +00:00
Mel Henning
e81a292165 nvk: Disable compression on Turing
We've had multiple reports that this is broken on Turing right now.
Disable it until someone figures out what's wrong.

See also: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15358

Fixes: b524bf368e ("nvk: Reenable compression support with nouveau 1.4.2")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41332>
2026-05-12 19:19:54 +00:00
Eric Engestrom
1f5a54a289 zink+nvk/ci: update expected fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41515>
2026-05-12 19:01:58 +00:00
Mel Henning
1e114e2dce nvk: Add a wfi for blackwell in CmdDispatchIndirect
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes CTS flakes in several tests, for example:
dEQP-VK.synchronization.signal_order.shared_binary_semaphore.write_copy_buffer_read_ssbo_compute_indirect.buffer_262144_opaque_fd

Fixes: 1c77a6f049 ("nvk: Don't emit MME FIFO config on Blackwell+")
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41010>
2026-05-12 18:43:17 +00:00
Georg Lehmann
ee64cb2763 aco: add tests for cube txd to tex opt
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41489>
2026-05-12 18:17:22 +00:00
Georg Lehmann
d256c1f49e ac/nir/lower_tex_coords: fix optimizing cube txd to tex
We need to remove ddx/ddy before doing the cube lowering,
otherwise we insert instructions that break dominance.

Affects Sable.

Fixes: 7d552d71e9 ("ac/nir: optimize txd(coord, ddx/ddy(coord))")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41489>
2026-05-12 18:17:22 +00:00
Samuel Pitoiset
6b3223895f radv: invalidate command buffer state after executing secondaries
This is more robust than trying to keep track of the states between
command buffers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41260>
2026-05-12 17:17:55 +00:00
Samuel Pitoiset
70a3d2c082 radv: remove a TODO about layeredShadingRateAttachments
This will never be supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41427>
2026-05-12 16:55:23 +00:00
Samuel Pitoiset
da0ee50c3b radv: fix another case of VRS with mipmaps on GFX10.3
When a VRS view is used with a depth/stencil view, the driver is
expected to copy the VRS rates to the HTILE buffer of the depth/stencil
view. Though if the image uses mipmaps and the base level can't support
HTILE there is no way to copy the rates. The workaround is to force VRS
to be 1x1 which is valid in Vulkan.

This fixes old VKCTS failures on RAPHAEL just because it supports
fragmentShadingRateWithShaderDepthStencilWrites compared to other GPUs
in CI (NAVI21/VANGOGH).

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41427>
2026-05-12 16:55:23 +00:00
Samuel Pitoiset
83d350dc1c radv: advertise VK_KHR_maintenance11
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41316>
2026-05-12 16:28:43 +00:00
Samuel Pitoiset
d10e732aac radv: adjust minImageTransferGranularity for transfer queue
It's required with VK_KHR_maintenance11. This allows way more transfer
queue related CTS tests to run and all issues I found should already
be fixed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41316>
2026-05-12 16:28:43 +00:00
Samuel Pitoiset
c44ec2fc69 radv: add support for VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41316>
2026-05-12 16:28:42 +00:00
Jesse Natalie
7931dd09ba va: Wrap assert-only code in NDEBUG
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41445>
2026-05-12 15:44:25 +00:00
Jesse Natalie
23f8e75f8c nir_lower_non_uniform_access: Add ASSERTED for assert-only var
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41445>
2026-05-12 15:44:25 +00:00
Mary Guillemard
6e5bfc678d nvk: Store available and timestamps packed together
This changes timestamps so they are written with their available part
directly.

This allows to save a bit of memory and just write timestamp with only
one operation.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:54 +00:00
Mary Guillemard
057568f0fb nvk: Handle zero queries in CmdCopyQueryPoolResults and CmdResetQueryPool
Nothing disallow it by spec, let's avoid doing anything in that case.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:54 +00:00
Mary Guillemard
179b532851 nvk: Move report offset to reports_start for nvk_CmdCopyQueryPoolResults
That remove the need of a special case for timestamp and will allow some
simplification for MME copies.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:54 +00:00
Mary Guillemard
891c786cf5 nvk: Conditionally enable counters when needed
We only need some counters when the user request to track certain
queries, let's not keep them enabled all the time.

Following the proprietary driver here, unsure if that will have any
impact.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:54 +00:00
Mary Guillemard
42ffc61d29 nvk: Remove delta handling from query pool
Now that we reset counters, we do not need to handle delta for anything.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:53 +00:00
Mary Guillemard
dc6516713c nvk: Clear counters at the begin of a query
Like the proprietary driver, let's clear counters at the beginning of a
query.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:53 +00:00
Mary Guillemard
1f114b832a nvk: Move nv_push closer to their uses in nvk_cmd_begin_end_query
It was a nightmare to track, let's simplify this.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:53 +00:00
Mary Guillemard
ad1e2909bb nvk: use MME shadow RAM in nvk_meta begin/end
We are going to conditionally change SET_ZPASS_PIXEL_COUNT and
SET_STATISTICS_COUNTER in queries handling.

To prepare for that we now use the MME shadow RAM to restore the
previous state.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:53 +00:00
Karol Herbst
478735e515 nvk: Use nvk_cmd_fill_memory in CmdResetQueryPool when possible
This avoid relying on semaphore releases when we have multiple queries
being reset.

NVIDIA proprietary driver is performing the same however it do fill the
full report instead (as it also contain the available part packed with
it)

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:53 +00:00
Mary Guillemard
751cff86e0 nvk: Use SET_REFERENCE in nvk_CmdResetQueryPool
Instead of trying to wait for each available values to be zeroed, we now
use NV906F_SET_REFERENCE.

NV906F_SET_REFERENCE behaves like a FE WFI+MEMBAR on the command
processor itself, ensuring ordering.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41507>
2026-05-12 15:26:52 +00:00
Marek Olšák
f4f3326fa2 radeonsi: handle any size of shader args in the LLVM PS prolog
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this will be needed for perspective-correct interpolation at offset/sample

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
b0df142b93 radeonsi: stop using TGSI definitions for interpolation
define our own

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
2fe4c47a21 radeonsi: simplify get_interp_info_from_input_load
it's only used for color inputs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
38cea8334e radeonsi: declare prolog LINEAR_SAMPLE/CENTER VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

4 input VGPRs removed in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
cfc9038a3d radeonsi: declare prolog LINE_STIPPLE_TEX_ENA VGPR only if needed
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

1 input VGPR removed from the PS prolog in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
e6db0492f6 radeonsi: declare prolog ANCILLARY & SAMPLE_COVERAGE VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

2 input VGPRs removed from the PS prolog in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
280f8e6ab5 aco,radeonsi: declare prolog CENTROID VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

4 input VGPRs removed in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
5126258f55 aco,radeonsi: don't forward LINE_STIPPLE_TEX_ENA VGPR from the PS prolog
It's unused. This frees 1 VGPR in the prolog for temps.

This only affects radeonsi.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00