Commit graph

206583 commits

Author SHA1 Message Date
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
Sergi Blanch-Torne
047a90d683 ci: Re-enable the Collabora farm
This reverts commit acebfc7a38.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35410>
2025-06-09 18:02:25 +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
Sergi Blanch Torne
e19e8012e4 docs: crnm: document token usage
Judging by comments in the chat, it seems the usage of the tokens in crnm is
only natural when you've been using it for a while. New users would appreciate
reading it in the documentation, beyond the help in the tool.

Also, mentioning how to create a token and what's the minimal scope of the
token to be used with the tool can help new users.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34860>
2025-06-09 06:06:11 +00:00
Sergi Blanch-Torne
acebfc7a38 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-06-09 07:00 UTC
* End: 2025-06-09 13:00 UTC

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35304>
2025-06-09 07:18:34 +02: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
Christian Gmeiner
ac042d1178 lima: Convert to use nir_shader_intrinsics_pass
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35130>
2025-06-08 22:17:39 +00:00
Rob Clark
52d028e06c freedreno: Enable the X1-45
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Enable the GPU in the X1P41200 chipset.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35404>
2025-06-08 20:18:42 +00:00
Rob Clark
1eef2a65c7 freedreno: Fold X1-85 back into existing dev table entry
Commit 453ecaddb5 ("freedreno: Remove compute_constlen_quirk") removed
the only UMD visible difference from a740 but did not re-merge the
device table entries.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35404>
2025-06-08 20:18:42 +00:00
Marek Olšák
bd7efb8805 egl: export GL-CL interop functions from libEGL_mesa.so
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Non-GLVND EGL already exports them.

The PUBLIC un-definition was unnecessary since we use symbols lists.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35386>
2025-06-08 13:20:47 -04:00
Vinson Lee
8c8496e2f6 freedreno: Sort MRTs so output is stable
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7095
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35402>
2025-06-08 14:07:50 +00:00
Pavel Ondračka
2859fd34f3 r300: minor fix for backend writer/reader detection
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Consider the following snippet from a Trine shader

 20: RCP temp[40].z, temp[39].__w_;
 21: MOV temp[40].xy, temp[34].-x-y__;
 22: DP3 temp[41].x, temp[40].xyz_, temp[29].xyz_;
...
 33: DP3 temp[52].x, temp[40].xyz_, temp[51].xyz_;
 34: MAX temp[53].x, temp[52].x___, none.0___;
 35: MUL temp[54].xy, temp[40].xy__, const[8].ww__;
 36: MUL temp[55].xy, temp[54].xy__, temp[41].xx__;
 37: MUL temp[56].x, temp[40].z___, const[8].w___;

When we search for writers for temp[40] so that we can check if we can
convert the MUL to omod, the corresponding variable actually contains
the RCP temp[40].z first and the MOV temp[40].xy is marked as friend.
However the current logic only checks the first instruction of variable,
so we fail to find the writer. Just search recursivelly also the
variable friends.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34462>
2025-06-08 06:29:49 +00:00
Marek Olšák
d279d019d4 ac/nir/tess: remove parameter from and simplify hs_per_patch_output_vmem_offset
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
5734a916d6 ac: move tcs_offchip_layout into ac_shader_args
It's the same variable between radv and radeonsi, but the implementation of
the load intrinsics is very different.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
5994e08f8b ac: set LDS limit for TCS to 32K for all chips
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
fa5e07d5f7 ac/nir/tess: write TCS patch outputs to memory as vec4 stores at the end
This moves per-patch output VMEM stores to the end of the shader where they
execute only once. They are skipped if the whole workgroup discards
all patches.

If tcs_vertices_out == 1, per-patch output VMEM stores use the same lanes
as per-vertex output VMEM stores, which are aligned to 4 or 8 lanes to get
cached bandwidth for the stores.

Previously, per-patch outputs were stored to memory for every store_output
intrinsic in TCS.

Additionally, LDS is no longer allocated for per-patch outputs that are only
written and read by invocation 0, or they are written by all invocations
but not read, and don't have indirect indexing. This reduces LDS usage and
LDS traffic.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
c732306c5a ac/nir/tess: unify computing LDS output patch size, minimize LDS bank conflicts
This unifies the duplicated LDS output patch size computation between
hs_output_lds_offset and ac_nir_compute_tess_wg_info.

"+ 4" to the output patch stride minimizes LDS bank conflicts by making
the beginning of each patch start on a different LDS bank.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
37dc376395 ac/nir/tess: use if-ladder to determine valid tess level components for the vote
Checking whether every compoment is valid in tess_level_has_effect() when
prim_mode is unknown generated too many SALU. Do this instead:

    if (triangles) ...
        subgroup vote for triangles
    else if (quads) ..
        subgroup vote for quads
    else // isoline
        subgroup vote for isolines

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00