Commit graph

209785 commits

Author SHA1 Message Date
Marek Olšák
b769d5dcde nir: don't use variables as ralloc parents, use the shader instead
so that we can switch variables to gc_ctx

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538>
2025-08-05 22:55:13 +00:00
Marek Olšák
dadd4e4555 nir/clone: don't call ralloc_strdup with a NULL pointer for intrinsic names
No impact, but it was affecting my ralloc_strdup stats for
nir_intrinsic_instr names.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538>
2025-08-05 22:55:13 +00:00
Marek Olšák
3c4a64e807 nir: eliminate most ralloc/malloc for nir_variable names
Store small names in a fixed-sized string in nir_variable.
GLSL IR does the same thing.

When compiling my shader-db with the gallium noop driver, it improves GLSL
compile times by 0.7% (much lower than anticipated).

For Unigine Heaven shaders:
- it eliminates 95.6% ralloc calls for nir_variable names
- the total number of ralloc calls is reduced by 11%

It also adds only 16B to nir_variable, while just the ralloc header
for the name would occupy 40B.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538>
2025-08-05 22:55:12 +00:00
Marek Olšák
96ffc24e4e nir: add nir_variable_{set,append,steal}_name{f}() to modify nir_variable names
Setting variable names currently always uses ralloc, but the new
nir_variable_* helpers will mostly eliminate ralloc/malloc in a later
commit.

This just updates all places that touch nir_variable names to use the new
helpers.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538>
2025-08-05 22:55:12 +00:00
Marek Olšák
05749922b0 nir: don't allocate nir_constant::elements if there are none
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36538>
2025-08-05 22:55:11 +00:00
Dave Airlie
b1242e6b30 spirv: move cmat store barrier after the store.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36583>
2025-08-05 22:28:03 +00:00
Lorenzo Rossi
6383050826 nak: Fix pre-volta iadd3 panic during compilation
Commit 431a9508a0 added an optimization that inserts a NIR iadd3
instruction, this is not supported in GPUs before volta, thus
when translating NIR into NAK IR the builder would panic.

This commits adds a simple check that disables the optimizations on
pre-volta GPUs.

Fixes: 431a9508a0 ("nak: copy late_algebraic iadd3 rules without the constant restriction")
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36588>
2025-08-05 22:11:52 +00:00
Ernst Persson
fc8a734849 amd/vulkan: Use str.removesuffix() from Python 3.9
Signed-off-by: Ernst Persson <ernstp@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36398>
2025-08-05 21:39:58 +00:00
Ernst Persson
2bdbc72d27 vulkan/util: Use str.removeprefix() from Python 3.9
Signed-off-by: Ernst Persson <ernstp@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36398>
2025-08-05 21:39:58 +00:00
Ernst Persson
7d7591b37c meson: Raise minimum Python version to 3.9
Gives access to str.removeprefix and str.removesuffix among other
things.

Signed-off-by: Ernst Persson <ernstp@gmail.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36398>
2025-08-05 21:39:58 +00:00
Mike Blumenkrantz
84fb88e5e7 tc: don't clobber CSO info when renderpass has ended
if a renderpass has ended, the info is signaled and cannot be modified
for anything but resolves and invalidates. when a CSO is then bound
before the next fb state change, there is no way to increment rp info in
a way which keeps it in lockstep with the consumer thread, so storing the
new states until a new rp info is incremented ensures that everything works
as expected

Fixes: 4989a40e89 ("tc: explicitly terminate renderpasses on fb access")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36576>
2025-08-05 20:49:17 +00:00
Mike Blumenkrantz
c50ac33cd2 zink: fix assert for unsynchronized non-GENERAL image barriers
if this is already unsync then everything is fine

Fixes: 213874d42b ("zink: use unsynchronized cmdbuf for unsynchronized image GENERAL barriers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36576>
2025-08-05 20:49:17 +00:00
Mike Blumenkrantz
b717240ffa zink: add ZINK_DEBUG=rploads to mimic tiler behavior
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36576>
2025-08-05 20:49:17 +00:00
Yiwei Zhang
6775873e9e venus/android: clean up leftovers from common AHB helpers adoption
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is a follow up for:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36388.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36581>
2025-08-05 19:22:20 +00:00
Valentine Burley
c66d4a329b radeonsi/ci: Increase Fluster job concurrency
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fluster appears to scale well with additional threads, so bump the
concurrency, which allows reducing the `parallel`.

This is achieved by making the `radeonsi-raven-vaapi-fluster` job
not extend the `radeonsi-raven-va` job, which was setting
`FDO_CI_CONCURRENT: 1`

Also drop the timeout, as it shouldn't be set for LAVA jobs here,
and move the rules definition next to the other rules.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36369>
2025-08-05 17:59:56 +00:00
Marek Olšák
692206d58c dri: fail creating DRI images that exceed hw limits
otherwise random stuff happens

it probably resolves https://gitlab.freedesktop.org/mesa/mesa/-/issues/13652

Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36566>
2025-08-05 17:37:34 +00:00
Job Noorman
ae66bd1c00 nir/opt_uniform_subgroup: use ballot_bit_count
Using bit_count on the result of ballot doesn't work for targets where
ballot's num_components > 1.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Fixes: d2e1e4442a ("ir3: enable nir_opt_uniform_subgroup")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35669>
2025-08-05 17:09:27 +00:00
Samuel Pitoiset
2091d199db ci: uprev VKCTS main to 9dd9a72b28218f1ca12777d9b73c2a85c5c60231
RADV is the only driver using main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36546>
2025-08-05 16:12:19 +00:00
Valentine Burley
1ed6b03750 zink/ci: Add an ASan job on CML
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: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36348>
2025-08-05 15:07:40 +00:00
Valentine Burley
7f52cbd19e intel/ci: Fix acer-chromebox-cxi4-puff concurrency
This is a 2-core 2-thread beast with 4GB of RAM.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36348>
2025-08-05 15:07:40 +00:00
Valentine Burley
fbb42abb9b radv/ci: Add an ASan RADV job on Cezanne
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36348>
2025-08-05 15:07:40 +00:00
Valentine Burley
b3aa602cd5 radv/ci: Use same deqp-runner suite for all RADV jobs
The only difference was the renderer check, which only needs to confirm
"RADV".

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36348>
2025-08-05 15:07:40 +00:00
Valentine Burley
81181c27df ci: Build more drivers in debian-x86_64-asan
These will be used in upcoming jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36348>
2025-08-05 15:07:39 +00:00
Valentine Burley
492487cd93 ci/lava: Add x86_64 ASan job templates
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36348>
2025-08-05 15:07:39 +00:00
Eric Engestrom
8156b83942 ci: drop xorg + weston workaround now that no user is left
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/36559>
2025-08-05 10:17:32 +00:00
Eric Engestrom
89b1066a96 intel/ci: run iris-{apl,glk,amly}-egl jobs on xwayland instead of xorg
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36559>
2025-08-05 10:17:32 +00:00
Eric Engestrom
fbfdba0f8d freedreno/ci: run a618-gl job on xwayland instead of xorg
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36559>
2025-08-05 10:17:32 +00:00
Hyunjun Ko
aad6613714 anv/video: implement GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR
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: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36152>
2025-08-05 09:16:56 +00:00
Hyunjun Ko
0268f2163b anv/video: Fix to set high profile to PPS if high profile provided
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36152>
2025-08-05 09:16:56 +00:00
Hyunjun Ko
b59552628e vulkan/video: fix to set ref_pic_list_modification_flag_l1 correctly
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36152>
2025-08-05 09:16:56 +00:00
Hyunjun Ko
62b07c01d1 vulkan/video: fix to write a h264 slice header for CAVLC mode
In CAVLC mode, slice header doesn't need to be aligned. Instead
encoder needs exact bits written in the slice header in order to
set the offset correctly.

This fixes encoding with entropy_coding_mode_flag false.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36152>
2025-08-05 09:16:56 +00:00
David Rosca
94619a0f4b wsi/display: Add RGBA16, RGBA16F and A2RGB10(SRGB) formats
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461>
2025-08-05 08:50:07 +00:00
David Rosca
d977951d64 wsi/display: Report supported formats based on plane formats
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461>
2025-08-05 08:50:05 +00:00
Joshua Ashton
13137393f6 wsi/display: Expose HDR10 colorspace based on EDID
Uses libdisplay-info to parse the edid, grab the metadata and see
if HDR10 is supported by the display.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461>
2025-08-05 08:50:05 +00:00
Joshua Ashton
2c870bbe20 build: Add dependency on libdisplay-info
Add a dependency on https://gitlab.freedesktop.org/emersion/libdisplay-info/
to be used for parsing EDIDs for KHR_display HDR support.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461>
2025-08-05 08:50:05 +00:00
Joshua Ashton
1ed78dd7ec wsi/display: Clean up DRM hdr/color state on swapchain destruction
Reset our color outcome to defaults, and update the state.
We need to clean up after our mess, for any other compositors,
etc that come after us that may not be aware of properties
we have set.
We can do this by just setting ourselves back to sRGB and therefore
SDR and updating like normal.
We only need to do this if we have a color outcome serial that isn't
0, the default.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461>
2025-08-05 08:50:05 +00:00
Joshua Ashton
b4176393a0 wsi/display: Implement VK_EXT_hdr_metadata on KHR_display swapchain
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461>
2025-08-05 08:50:05 +00:00
Joshua Ashton
b465d144ca wsi/common: Track VkColorSpaceKHR with wsi swapchain
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461>
2025-08-05 08:50:05 +00:00
Emma Anholt
52cdbd78ec i915: Avoid calling drm_intel_get_aperture_sizes().
It brings up and tears down libpci in order to return value we don't use,
which is a problem if anything else in the stack is using libpci.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13413
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36424>
2025-08-05 08:33:16 +00:00
Samuel Pitoiset
e33d6acca3 docs: add missing VK_KHR_present_id/2 to features.txt
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36547>
2025-08-05 08:06:43 +00:00
Samuel Pitoiset
07fe297a3e vulkan: fix missing presentId2/presentWait2 enable features
Fixes recent VKCTS changes for dEQP-VK.info.device_mandatory_features.

Fixes: 07881b085e ("vulkan: Enable PresentWait2 on many physical devices")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36547>
2025-08-05 08:06:43 +00:00
Samuel Pitoiset
72cf81df54 radv: fix fbfetch output with compresed FMASK on <= GFX9
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
GFX9 might not have DCC but compressed FMASK. In this case, it needs
to be decompressed to handle feedback loops.

Fixes new VKCTS coverage dEQP-VK.dynamic_rendering.*_ms.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36550>
2025-08-05 07:49:31 +00:00
Pavel Asyutchenko
f4cd962434 radv: report full sparse address space size
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13588
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36423>
2025-08-05 07:23:56 +00:00
Valentine Burley
cf510901ac zink/ci: Drop duplicate full ANV deqp-runner suites
The full TGL and ADL suites were identical.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36107>
2025-08-05 07:06:19 +00:00
Valentine Burley
6793e48a41 zink/ci: Add pre-merge EGL coverage on ANV
Promote EGL testing to pre-merge, as we remain under the 10-minute time
limit specified in the docs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36107>
2025-08-05 07:06:18 +00:00
Valentine Burley
1dfe5bbd09 vulkan/wsi/wayland: Enable 4444 formats
Expose 4444 formats when they are available.

Fixes dEQP-EGL.functional.*rgba4444* with zink on ANV.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36111>
2025-08-05 06:04:28 +00:00
Antonio Ospite
5649a0aa06 libcl: avoid calling UNREACHABLE(str) macro without arguments
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In commit 9ced3148ca ("util: avoid calling UNREACHABLE(str) macro
without arguments", 2025-07-30) the argument type check in the
UNREACHABLE(str) macro in src/util/macros.h was improved to also avoid
calling it without arguments, but the definition in
src/compiler/libcl/libcl.h was not updated.

Apply a similar change to src/compiler/libcl/libcl.h to keep the C and
CL macros in sync.

Fixes: 9ced3148ca ("util: avoid calling UNREACHABLE(str) macro without arguments", 2025-07-30)

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> on gfx8 (Polaris 20)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36508>
2025-08-04 23:15:18 +02:00
Eric Engestrom
2b6436f971 ci: drop unnecessary rename of *.log into *.log.txt
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
GitLab added *.log to the allow list back in 11.4 (October 2018 [1]),
but also both GitLab's code and this workaround have been broken anyway
for a very long time now (they just serve everything as `content-type:
application/octet-stream`), so let's just drop it.

[1]: 129a60e79d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36556>
2025-08-04 20:15:22 +00:00
Georg Lehmann
1d885fab9c nir/opt_algebraic: optimize pack_half_rtz of b2f
Foz-DB Navi21:
Totals from 13 (0.02% of 80255) affected shaders:
Instrs: 2313 -> 2306 (-0.30%); split: -0.35%, +0.04%
CodeSize: 13452 -> 13480 (+0.21%)
Latency: 12066 -> 12013 (-0.44%); split: -0.45%, +0.01%
InvThroughput: 2172 -> 2163 (-0.41%)
Copies: 112 -> 114 (+1.79%)
VALU: 1480 -> 1472 (-0.54%)
SALU: 154 -> 155 (+0.65%)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36535>
2025-08-04 19:42:22 +00:00
Georg Lehmann
bc3b09c5dd nir/opt_algebraic: optimize pack_half_rtz of bcsel with constant
Foz-DB Navi21:
Totals from 448 (0.56% of 80255) affected shaders:
Instrs: 345474 -> 344791 (-0.20%); split: -0.20%, +0.00%
CodeSize: 1917784 -> 1913324 (-0.23%); split: -0.25%, +0.02%
VGPRs: 22344 -> 22416 (+0.32%)
Latency: 2320847 -> 2318161 (-0.12%); split: -0.13%, +0.01%
InvThroughput: 543008 -> 541722 (-0.24%)
SClause: 11450 -> 11459 (+0.08%)
Copies: 19991 -> 19949 (-0.21%); split: -0.23%, +0.02%
PreSGPRs: 19129 -> 19114 (-0.08%)
PreVGPRs: 19695 -> 19696 (+0.01%); split: -0.01%, +0.01%
VALU: 257627 -> 256948 (-0.26%)
SALU: 30432 -> 30422 (-0.03%)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36535>
2025-08-04 19:42:22 +00:00