Commit graph

191213 commits

Author SHA1 Message Date
Faith Ekstrand
e814fc16ff nvk: Use an nvk_mem_stream for nvk_queue_push()
Importantly, this makes nvk_queue_push() no longer stall waiting on the
GPU so we can use it more freely.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Faith Ekstrand
3470cd7568 nvk/queue: Rename submit_simple() to push()
Also, make it take an nv_push for ease of use.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Faith Ekstrand
fdec18dfa5 nvk/upload_queue: Use an nvk_mem_stream internally
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Faith Ekstrand
e206962409 nvk: Add an nvk_mem_stream struct
This is based on nvk_upload_heap but with a different interface and
minor changes to deal with those differences.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Marek Olšák
a35a12dd38 radeonsi: fix AMD_DEBUG=usellvm
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It did nothing for streamout and blits.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
906b2b36ee radeonsi: don't refer to removed GTF CTS tests
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
3d504ee844 radeonsi: remove a non-trivial optimization that doesn't do much
It only caused some optimized shader variants to not be compiled in very
rare cases. I think it doesn't happen in practice, but if it does, it's
not a big deal.

The case when this was useful was when a shader wrote (0,0,0,0) or
(0,0,0,1) or (1,1,1,0, or (1,1,1,1) to a shader output before PS,
but PS didn't use the output.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
edd2fc3c7f radeonsi: use AC_EXP_PARAM_UNDEFINED for clarity
The code was slightly confusing.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
de9eee7700 radeonsi: support 8 instead of 6 clip planes with gl_ClipVertex
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
8ea7d32570 radeonsi: restructure si_emit_clip_regs
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
447d744833 ac/llvm: allocate LLVM PS output variables on demand
This stops relying on si_shader_info, allowing further cleanup of
si_shader_info.

radv_load_output was unused.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Faith Ekstrand
6b2331d5f7 nvk: Use an nvk_arena for nvk_descriptor_table
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This gives descriptors a consistent base address and lets us stop doing
the memory reference counting dance for queue state management.  We
still need to track sizes so that the GPU doesn't read outside the arena
but that's a lot simpler.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35327>
2025-06-09 23:08:06 +00:00
Faith Ekstrand
ec148e9cdc nvk/descriptor_table: Add a couple new helpers
This cleans up the code a bit, de-duplicates, and makes locking easier
to understand.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35327>
2025-06-09 23:08:06 +00:00
Faith Ekstrand
9e52e296f7 nvk/heap: Use an nvk_mem_arena
The only material change here is that we're now allocating slightly less
memory every time in the non-contiguous case.  Instead of allocating a
power of two plus the over-allocation so our total usable space is a
power of two, we now allocate a power of two and just let the over-
allocation burn space.

This also reworks the internal vma_heap to use actual addresses instead
of the index+offset packed things.  This costs us a tiny bit more
looking up the map in alloc() but we save it again on free so there's no
real loss here.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35327>
2025-06-09 23:08:05 +00:00
Faith Ekstrand
417e85f617 nvk: Add a new arena data structure
This is about 80% of what nvk_heap does today but with the explicit goal
of just pulling out the growable memory arena part out and separating
all of the heap logic.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35327>
2025-06-09 23:08:05 +00:00
Paulo Zanoni
12192f6489 brw: properly decode TGL_PIPE_SCALAR
Source: BSpec "Instruction Fields" page (56701), SWSB field.

Credits to Caio Oliveira here, since he was helping me while we found
this issue together.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35395>
2025-06-09 22:21:13 +00:00
Mel Henning
42ba492b88 compiler/rust/bitset: BitSetStream takes Key type
This was an oversight when BitSet was parameterized on a key type.
BitSetStream needs to also take a key type to prevent users from mixing
different key types in binary operators. Constraining this makes BitSet
usage more type safe.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35328>
2025-06-09 21:49:29 +00:00
Dave Airlie
b8ac2d47e7 radv/video: add KHR_video_decode_vp9 support.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This adds the VP9 decoding support.

This was initially developed by me,

Stéphane Cerveau from Igalia did a bunch of fixes and testing,
Benjamin Cheng from AMD also helped with a few fixes and how
to program the firmware better.

This passes the current VK-GL-CTS tests.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35398>
2025-06-09 20:46:04 +00:00
Dave Airlie
4399e43ffd ac/vcn: add new firmware flag to pass uncompresed header offset.
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35398>
2025-06-09 20:46:04 +00:00
Dave Airlie
3fe375eca5 vulkan/video: add vp9 decode
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35398>
2025-06-09 20:46:03 +00:00
Dave Airlie
a0f4cbe6f7 amd: move vp9 probs table to common code.
This will be reused by radv eventually, so let's move it all
over to common code. It might have other users eventually,
but we can worry about that later.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35398>
2025-06-09 20:46:03 +00:00
Mike Blumenkrantz
622612f67e zink: hook up global GENERAL image layouts
on some hardware/drivers, image layouts other than WSI are discarded,
which means a bunch of layout-specific synchronization can be omitted

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:03 +00:00
Mike Blumenkrantz
35ee74181e zink: rename a sync function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:03 +00:00
Mike Blumenkrantz
b84f98288c zink: add UIM feedback loop info for dynamic rendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:02 +00:00
Mike Blumenkrantz
5ef18a10ea zink: add a local screen variable in begin_rendering
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:02 +00:00
Mike Blumenkrantz
8af0a2b0ca zink: hook up VK_KHR_unified_image_layouts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:01 +00:00
Mike Blumenkrantz
f079cad644 zink: support vulkan 1.4
this just makes features/properties available

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:01 +00:00
Dave Airlie
e8914c62ac nak: add support for cbuf2 format to non uniform lowering.
This adds the hopper/blackwell support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35409>
2025-06-09 20:00:12 +00:00
Dave Airlie
fada333435 nvk: bindless cbufs on hopper/blackwell are different.
These are now 51/13 vs 45/19 in previous.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35409>
2025-06-09 20:00:12 +00:00
Lorenzo Rossi
759e83204e nak: Remove unreachable code in sm50.rs
This was probably retained from a refactor

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34327>
2025-06-09 19:46:07 +00:00
Lorenzo Rossi
e53e430dde nak: Add tests for imnmx and dsetp
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34327>
2025-06-09 19:46:07 +00:00
Faith Ekstrand
6c052d87b7 nak/qmd: Add QMD version 5.0 for Blackwell+
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/35418>
2025-06-09 18:54:59 +00:00
Dave Airlie
ac699637c0 nak/qmd: Move slm size to a separate macro
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35418>
2025-06-09 18:54:59 +00:00
Faith Ekstrand
6f8245472d nak/qmd: Allow program addresses to be shifted
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35418>
2025-06-09 18:54:59 +00:00
Faith Ekstrand
53dc4117b1 nak/sm70: Fix r2ur for Blackwell+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35418>
2025-06-09 18:54:59 +00:00
Nanley Chery
b2ad1333d0 anv: Use genX(set_fast_clear_state)() in transition_depth_buffer()
Simplify transition_depth_buffer() by reusing a function to update the
fast-clear value instead of open-coding that logic.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
e0bce5650c anv: Move the gfx9 sRGB sampling clear color code
Simplify set_image_clear_color() by restricting the gfx9-specific code
to the gfx9 #ifdef.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
d21e7e5a9f anv: Query sampler offset in set_image_clear_color()
Enables set_image_clear_color() to be used in transition_depth_buffer()
in a future commit.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
1820db80d6 anv: Fix an assert for ISL_FORMAT_RAW clear color update
We meant to count the number of bits, not bytes.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
a0bb9cb6d8 iris: Update clear color initializations for FCV
There were a couple issues in iris_resource_prepare_render():

* It previously assumed that the sampler would always look at the raw
  dwords for 32bpc formats. However, the sampler only does this on
  gfx12.0 for R32 formats (not RG32 formats for example). Update the
  comments to reflect this.

* It only initialized the clear color if the render_format was
  non-32bpc. However, initialization is still needed outside of this
  case because a subsequent sampling operation may use a view format
  which looks at the sampler field. Check for the FCV aux-usage instead
  of the render format's number of bits-per-channel to fix this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
a5bc71dc56 iris: Update check for sampler field changes
Use isl_get_sampler_clear_field_offset() to more accurately determine
when the sampler will change the field it reads from on gfx11-12. This
avoids partial resolving in a number of cases.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
69d91ae975 intel/blorp: Use get_copy_format_for_bpb more for gfx12.5
Use get_copy_format_for_bpb() instead of
get_ccs_compatible_uint_format() when performing blorp_copy(). This
matches the code path taken on gfx20 and increases the testing of cases
which would impact gfx12.0 in isl_get_sampler_clear_field_offset().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:20 +00:00
Nanley Chery
27a5d84632 intel/isl: Fix isl_get_sampler_clear_field_offset()
Through testing, I've found that the sampler will fetch the clear color
pixel from the converted clear color field in more cases. So, stop
reporting the raw dword offset for them:

* On gfx12.5, for 32-bpc color images.
* On gfx11-12.0, for 64-bpp color images.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:20 +00:00
Yiwei Zhang
d4cedcd362 venus: force sw wsi path on nv proprietary
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We have to force it here, otherwise, if we'd like to preserve the
modifier path, it'd be too late when it falls back to prime blit with
unsupported compositors/envs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35372>
2025-06-09 17:17:08 +00:00
Yiwei Zhang
d1c191a8c8 venus: do not force prime blit on nv
...since the hw path doesn't work either

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35372>
2025-06-09 17:17:08 +00:00
Natalie Vock
a28515f096 aco/opt: Rename loop header phis
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fossil stats on top of !35269:
Totals from 133 (0.16% of 81077) affected shaders:

Instrs: 4328456 -> 4327891 (-0.01%)
CodeSize: 22890004 -> 22887732 (-0.01%); split: -0.01%, +0.00%
Latency: 28406452 -> 28404732 (-0.01%)
InvThroughput: 5361458 -> 5361153 (-0.01%)
Copies: 376788 -> 376222 (-0.15%)
VALU: 2429210 -> 2428645 (-0.02%)
VOPD: 57 -> 56 (-1.75%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35270>
2025-06-09 14:36:44 +00:00
Rhys Perry
00dd0d0dd1 aco: update VALUReadSGPRHazard comment
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: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35387>
2025-06-09 10:12:25 +00:00
Rhys Perry
a714a19e16 aco/gfx12: fix VALUReadSGPRHazard with carry-out
fossil-db (gfx1201):
Totals from 370 (0.46% of 79653) affected shaders:
Instrs: 3933639 -> 3935914 (+0.06%)
CodeSize: 20743448 -> 20752068 (+0.04%); split: -0.00%, +0.04%
Latency: 26261246 -> 26261921 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 5363675 -> 5363760 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 65f95ae74e ("aco/insert_NOPs: implement VALU -> VALU case for VALUReadSGPRHazard on GFX12")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35387>
2025-06-09 10:12:25 +00:00
Olivia Lee
19e494a461 panfrost/ci: smoke test AFBC-P in CI
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The AFBC path is behind a driconf option, and so was not tested by any
existing CI jobs. We had a regression with this that went unnoticed for
several months. To avoid similar situations in the future, add AFBC
smoke tests to CI, similar to the existing spilling smoke tests..

Some tests on g52 fail instead of crashing when AFBC is enabled, but
otherwise the CI expectations are identical.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35193>
2025-06-09 06:33:49 +00:00
Dave Airlie
870b8717b2 Revert "hasvk/elk: stop turning load_push_constants into load_uniform"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit b036d2ded2.

This seems to break gtk4 and other stuff.

Cc: mesa-stable
(taking ack from Lionel saying we should revert)

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35407>
2025-06-09 09:20:19 +10:00