Commit graph

208668 commits

Author SHA1 Message Date
David Rosca
50eaa0c19f radv/video: Set correct H264/5 decode minCodedExtent
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35997>
2025-07-15 17:44:15 +00:00
David Rosca
42a25b2493 radeonsi/video: Set correct minimum size for VP9 decode
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35997>
2025-07-15 17:44:14 +00:00
Faith Ekstrand
cf654be16b vulkan/wsi/x11: Refuse to connect to thread-unsafe Displays
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We heavily rely on threading in Vulkan WSI.  There's no way this is safe
if XInitThreads() hasn't been called.  Fortunately, this should never be
the case since 2022 or so.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13530
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36120>
2025-07-15 17:13:46 +00:00
Marek Olšák
6286c1c66f nir/opt_vectorize_io: optionally vectorize loads with holes
e.g. load X; load W; ==> load XYZW. Verified with a shader test.

This will be used by AMD drivers. See the code comments.

Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36098>
2025-07-15 16:29:30 +00:00
Romaric Jodin
b4977a1605 nir/lower_bit_size: Avoid round-trip conversion when possible
When we detect that the source is a conversion generated by the pass,
try to get the real source instead of doing a round-trip conversion.

Make sure that the nir_alu_type and the bit_size is the same between what
we need and what's before the detected conversion.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35744>
2025-07-15 15:32:58 +00:00
Valentine Burley
f34ddff0bd freedreno/ci: Update expectations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Update the expectations from the latest nightly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36132>
2025-07-15 14:11:18 +00:00
Valentine Burley
13d9570ec9 panfrost/ci: Update expectations
Update the expectations from the latest nightly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36132>
2025-07-15 14:11:18 +00:00
Marek Olšák
37ae4df3e4 glsl: remove most IO optimizations that are replaced by nir_opt_varyings
The only last users of nir_link_opt_varyings are Vulkan drivers.

One linker error thrown by the optimizations is reimplemented
at the call site.

No interesting shader-db changes (other than random noise).

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36091>
2025-07-15 13:38:30 +00:00
Marek Olšák
0fdd6de65f nir/lower_io: validate locations more accurately
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36091>
2025-07-15 13:38:29 +00:00
Marek Olšák
b0494f9485 nir/opt_varyings: optimize the consumer after constant propagation and dedupli.
A TF2 shader propagates 0 to the consumer, which eliminates 1 input
if we run algebraic opts and DCE before compaction.

This is a prerequisite for removing all IO var optimizations from the GLSL
linker that are redundant with nir_opt_varyings.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36091>
2025-07-15 13:38:29 +00:00
Marek Olšák
9607852c30 nir/opt_varyings: use nir_scalar
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36091>
2025-07-15 13:38:29 +00:00
Rob Clark
2e06da1597 gbm: Add more formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add additional formats to allow allocation via gbm.  Rather than define
new GBM_FORMAT_x, just use the drm_fourcc.h format (they are the same,
and the distiction will be going away in the future).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:10 +00:00
Rob Clark
6d3f266406 dri: Add additional 16/32b float/int formats
Add additional 16 and 32b float formats, and the missing BGR161616.

For the dri2_format_table, just use the pipe formats twice, rather than
introducing new __DRI_IMAGE_FORMAT_x in this day and age (they are the
same thing).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:10 +00:00
Daniel Stone
0fcb0ac1c5 dri: Expand pipe_format <-> FourCC lookup table
This pulls in every known mapping from the core DRI frontend, as well as
from GBM and Wayland. We can then start using it to de-duplicate the
lookups all throughout the tree.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:10 +00:00
Daniel Stone
d6e639816f dri: Convert pipe_format <-> FourCC lookup to a table
Saves typing it out twice.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:10 +00:00
Daniel Stone
b6332eb43b dri: Convert DRI_IMAGE_FORMAT to pipe_format
No functional change.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:09 +00:00
Rob Clark
3fcf63f364 dri2: Allow allocating suboptimal for sampling
Fixes allocations via gbm, which doesn't necessarily need to be
renderable.

Fixes: ba7454a155 ("dri2+gallium: Support to import suboptimal formats")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:08 +00:00
Rob Clark
a1cd9f917f mesa/main: Add MESA_FORMAT_RGB_UNORM16
Needed for importing DRM_FORMAT_BGR161616.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:08 +00:00
Rob Clark
3931d5ad18 drm-uapi: update drm_fourcc.h
Bring in new f16/f32 formats, etc.

Taken from the following commit in the drm tree, from the drm-next
branch:

commit 203dcde881561f1a4ee1084e2ee438fb4522c94a
Merge: 69d09a26096c 8290d37ad2b0
Author: Simona Vetter <simona.vetter@ffwll.ch>

    Merge tag 'drm-msm-next-2025-07-05' of https://gitlab.freedesktop.org/drm/msm into drm-next

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:08 +00:00
Eric Engestrom
aade8a919d ci: uprev apitrace
A new major version (13.0) was just released, a good excuse to uprev :)

New release notes:
https://github.com/apitrace/apitrace/releases/tag/13.0

Difference in this uprev:
b6102d1096...45a005875d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35816>
2025-07-15 11:56:39 +00:00
Jose Maria Casanova Crespo
7d51a10cda v3d: Fix depth resource invalidation with separate_stencil
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If there is a separate stencil in use, the resource invalidation
flag was not being removed for the depth buffer as rsc was assigned
to the separate stencil.

Fixes: 6ff509593c ("v3d: Only apply TLB load invalidation on first job after FB state update")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36030>
2025-07-15 10:23:10 +00:00
Samuel Pitoiset
b59895140d radv: add a way to disable the HIZ/HiS events based workaround on GFX12
This workaround doesn't mitigate the issue reliably/completely. An
alternative (but complex) solution also exists.

This introduces a small option that allows to disable the current
workaround as preliminary work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36110>
2025-07-15 10:01:54 +00:00
Pavel Gribov
24cb745460 radv: small fix for sam check
for exact PCIe 3.0 x8 case there will be
pcie_bandwidth_mbps >= bandwidth_mbps_threshold => (8069 >= 8069,12) == false

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36109>
2025-07-15 09:37:32 +00:00
Samuel Pitoiset
763ff92ad9 zink/ci: enable RADV_PERFTEST=hic for GFX10+ jobs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:17 +00:00
Samuel Pitoiset
d510f95f67 radv/ci: enable RADV_PERFTEST=hic for GFX10+ jobs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:16 +00:00
Samuel Pitoiset
fbea486854 radv: advertise VK_EXT_host_image_copy on GFX10+ behind RADV_PERFTEST=hic
This exposes an experimental implementation of HIC with
RADV_PERFTEST=hic. It's passing 100% of VKCTS but it requires some
benchmarks first to verify if performance is acceptable or not.

No addrlib support for GFX6-9.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:16 +00:00
Samuel Pitoiset
ea4ad51eb1 radv: implement vkTransitionImageLayout()
It's a no-op.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:16 +00:00
Samuel Pitoiset
b2e338a9c7 radv: implement vkCopyImageToImageEXT()
Because there is no surface<->surface helper in addrlib, this allocates
a temporary buffer on the CPU to do image->buffer->image. It's a naive
implementation which is probably not the best for performance, but it
works at least.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:16 +00:00
Samuel Pitoiset
c9ea920da0 radv: implement vkCopyMemoryToImageEXT()/vkCopyImageToMemoryEXT()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:16 +00:00
Samuel Pitoiset
4a5370819c radv: do not use MRT counters for host-transfer images
Otherwise, the tile swizzle changes and addrlib is confused.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:15 +00:00
Samuel Pitoiset
8d38b25cb3 radv: add support for querying HIC memcpy size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:15 +00:00
Samuel Pitoiset
031843ebb1 radv: add support for querying HIC performance info
On GFX12, everything is compressed with DCC and it's completely
transparent to the userspace driver, so that should be optimal.

On older gens, using HIC disables compression which isn't optimal
for device access.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:15 +00:00
Samuel Pitoiset
d89b11011f radv: add support for formats with host-transfer
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:15 +00:00
Samuel Pitoiset
545d5a0675 radv: set RADEON_SURF_HOST_TRANSFER for host-transfer images
To forbid some swizzles on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:14 +00:00
Samuel Pitoiset
37f3997edf radv: disable compression for host-transfer images
HIC isn't supposed to have compression.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:14 +00:00
Samuel Pitoiset
afa7509207 radv: map images with host-transfer at bind time
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:13 +00:00
Samuel Pitoiset
d85b7b6c62 radv: only expose host visible memory types for images with host-transfer
Because the memory must be mapped on the CPU.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:13 +00:00
Samuel Pitoiset
a75bd251df ac/surface: add a flag to forbid some swizzles for surface<->memory copies
256KiB (also block variables) aren't supported on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:13 +00:00
Samuel Pitoiset
f5f2392cf7 ac/surface: add support for surface<->memory copy using addrlib
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:13 +00:00
Samuel Pitoiset
16be376cc5 ac/surface: constify bpe_to_format()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35974>
2025-07-15 09:12:12 +00:00
Calder Young
3c7a834ebc anv: Add support for AV1 video decoding on Gfx125 and Xe2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36015>
2025-07-15 01:21:53 +00:00
Calder Young
3456a65619 intel/genxml: Update AVP instructions for Gfx125 and Xe2
Acked-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36015>
2025-07-15 01:21:53 +00:00
Mel Henning
d43552d365 nouveau/headers: Re-enable rustfmt
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This time we run it on each output file individually.

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36121>
2025-07-14 22:02:42 +00:00
Mel Henning
5e2eea81b9 nouveau/headers: Factor out write_template
This code was copied across each of the scripts.

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36121>
2025-07-14 22:02:42 +00:00
Mel Henning
ad7a5ddfb0 nouveau/headers: Move use statements into template
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36121>
2025-07-14 22:02:42 +00:00
Mel Henning
9b275cdbcc nouveau/headers: Stop running rustfmt
rustfmt would change not only lib.rs, which is output by this script,
but also all of the other files in the library. The problem is, those
other files are inputs to lib_rs_gen so the script was changing its own
inputs which meant ninja needed to be run twice before we reached a
fixed point. Remove rustfmt for now to prevent this issue.

Fixes: 591b5da4 ("nouveau/headers: Run rustfmt on generated files")
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36121>
2025-07-14 22:02:42 +00:00
Olivia Lee
cd9c9a83d6 docs: document GL_EXT_shader_clock in new_features.txt
This was missed when the feature was implemented.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 2ce201707e ("mesa: Add support for GL_EXT_shader_clock")
Reviewed-by: Chris Healy <cphealy@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36103>
2025-07-14 20:56:46 +00:00
Olivia Lee
71ea87fc2d panvk: document vulkan 1.3 in new_features.txt
This was missed when we documented vulkan 1.3 support in features.txt.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 1145cac490 ("docs/features: mark vk 1.3 as complete on panvk/v10+")
Reviewed-by: Chris Healy <cphealy@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36103>
2025-07-14 20:56:46 +00:00
Caio Oliveira
f8db53ccae brw: Fix comparison with unordered_mode when making baked dependency
The unordered mode stored in dependencies might be a bitmask and not
only a single mode.  In practice, only the "stronger" mode will stick.
Make sure that the code testing for the mode uses "&" instead of "==",
to avoid prevent some valid combinations to happen, e.g.

```
   // ...
   add(16)         g104<1>F        g94<1,1,0>F     g34<1,1,0>F     { align1 1H @7 $7.dst compacted };
```

which without the fix ends up as

```
   // ...
   sync nop(1)                     null<0,1,0>UB                   { align1 WE_all 1N F@7 };
   add(16)         g104<1>F        g94<1,1,0>F     g34<1,1,0>F     { align1 1H $7.dst compacted };
```

Enables two tests for the scoreboard pass that illustrate this case.

For measuring the effect, re-enabled the sync.nop accounting on total of
instructions and got the following results.

```
   Totals:
   Instrs: 322041261 -> 321748285 (-0.09%)
   Cycle count: 22864587567 -> 22863073741 (-0.01%)
   Max dispatch width: 7989040 -> 7989024 (-0.00%); split: +0.00%, -0.00%

   Totals from 88212 (9.78% of 902056) affected shaders:
   Instrs: 102282050 -> 101989074 (-0.29%)
   Cycle count: 12787629859 -> 12786116033 (-0.01%)
   Max dispatch width: 525336 -> 525320 (-0.00%); split: +0.01%, -0.01%
```

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36096>
2025-07-14 20:28:54 +00:00
Caio Oliveira
1e18a2d1a8 brw: Add scoreboard test for edge case involving baked dependency
This is disable because it is adding a `sync.nop` instead of baking
together both "@3 $0.dst".

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36096>
2025-07-14 20:28:54 +00:00