Commit graph

216348 commits

Author SHA1 Message Date
Eric Engestrom
91e60e210a compiler/rust: allow CFG & BitSetStreamTrait to have a len() without also having an is_empty()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
e825eac272 compiler/rust: remove unnecessary lifetimes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
cb57b77239 compiler/rust: rewrite match into a simpler if let
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
1def70585b compiler/rust: replace !first.is_none() with first.is_some()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
49b2597854 nak: replace !foo.is_{none,some}() with their positive counterpart
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
ca319ba707 nak: drop unnecessary mutable reference
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
97a7592557 nak: drop redundant closure
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
8a35fc9500 nak: remove unused lifetime
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
23ae567ae6 nak: add all identical values in one step
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
ce04b8a578 nak: use foo &= bar instead of foo = foo & bar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
6d881284c3 nak: use assert_eq!(a, b) instead of assert!(a == b)
Tells you what's different when it fails.

Suggested-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Mel Henning
f48fcfe552 nak: impl fmt::Debug for SSAValue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
9f830f622f nak: drop unnecessary reference on both sides of ==
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
e0c5b40561 nak: rewrite repeat().take() into repeat_n()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
f571428274 nak: remove "reference which is immediately dereferenced by the compiler"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
10396d8db6 nak: remove conversion into the same type
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
f7a31b7d48 nak: drop empty string from eprintln!()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
91496f6d68 nak: remove unnecessary use of format!()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
0a529a908f nak: silence clippy warning about x * 0
It is useful to keep here to show that there is an offset, even though
it's zero on these two first lines.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
85b7386158 nak: avoid errors when generated code is empty
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
dbd528ea3d nak: use matches!() instead of open-coding it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
28ff39fbb4 nak: use filter() instead of open-coding it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
314144ba51 nak: set nir_shader_compiler_options one one step
Instead of setting it to default() and then overwriting, which clippy
doesn't like.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
f81d0cab83 nil: drop duplicate lib in "liblibnil.a"
It's a static lib so it doesn't matter much, but we might as well drop the dupe.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
236b8f081c etnaviv: allow ISA struct to be spelled all uppercase
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
f70d1bcdbf rusticl: rewrite blocks using if/else for clarity
Applying clippy's code suggestions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Karol Herbst
5dbfa7f85d rusticl/mesa: convert pointer to ref without transmute in PipeScreen::from_raw
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Karol Herbst
7cae6d997d rusticl/mesa: remove unnecessary lifetimes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Karol Herbst
301afbc313 rusticl: remove unecessary transmutes around uuids
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
3a203b7019 rusticl/meson: deny all clippy lints before allowing global ones
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
e7142c74e2 meson/rust: allow explicit if x.is_none { return None } instead of x?
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
31bd297fc2 meson/rust: allow "needless lifetimes"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
af781dc7c8 meson/rust: allow else { if {} }
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
47ebdbab81 meson: add rust_global_args for flags for all the rust compilations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
675fe92e78 ci: read the MSRV from clippy.toml to avoid having too many copies to keep in sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
9a681f20ef rust: configure clippy to only report issues relevant to our MSRV
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:18 +01:00
Georg Lehmann
71f0c0d6a6 nir/opt_uniform_subgroup: optimize add/xor reduce of bcsel(div, con, con)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Foz-DB Navi48:
Totals from 12 (0.01% of 97623) affected shaders:
Instrs: 9207 -> 8973 (-2.54%)
CodeSize: 54192 -> 52832 (-2.51%)
VGPRs: 768 -> 480 (-37.50%)
Latency: 39516 -> 38507 (-2.55%)
InvThroughput: 10155 -> 9859 (-2.91%)
PreSGPRs: 329 -> 332 (+0.91%)
PreVGPRs: 268 -> 263 (-1.87%)
VALU: 4393 -> 4257 (-3.10%)
SALU: 1037 -> 1019 (-1.74%)
VOPD: 602 -> 599 (-0.50%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38974>
2025-12-19 20:23:23 +00:00
Georg Lehmann
0e5e1cb9b0 nir/opt_uniform_subgroup: optimize min/max/and/or reduce of bcsel(div, con, con)
Foz-DB Navi48:
Totals from 1 (0.00% of 97397) affected shaders:
Instrs: 1848 -> 1834 (-0.76%)
CodeSize: 9996 -> 9908 (-0.88%)
VGPRs: 96 -> 72 (-25.00%)
Latency: 17371 -> 17358 (-0.07%)
Copies: 190 -> 191 (+0.53%)
PreVGPRs: 43 -> 41 (-4.65%)
VALU: 657 -> 648 (-1.37%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38974>
2025-12-19 20:23:23 +00:00
Georg Lehmann
4d8cc7d82e nir/divergence: add nir_def_is_divergent_at_use_block helper
For cases where the block we are interested in is not the immediate block
of the nir_src.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38974>
2025-12-19 20:23:23 +00:00
Mel Henning
a49c5c07e9 nvk: Expose transfer-only queues
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36617>
2025-12-19 20:08:40 +00:00
Mel Henning
3ce4504da7 nouveau/winsys: Set channel_alloc.tt_ctxdma_handle
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36617>
2025-12-19 20:08:40 +00:00
Mel Henning
b71b6a03c2 novueau/winsys: nv_device_info.has_transfer_queue
Add an option that signals if we can use transfer queues on the current
hardware and kernel or not.

Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36617>
2025-12-19 20:08:40 +00:00
Mel Henning
c94f721b72 nvk: Skip barriers if engine is not present
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36617>
2025-12-19 20:08:40 +00:00
Mel Henning
a431e8dfe6 nvk: Use semaphore helper for BufferMarker2AMD
By calling into nvk_event_report_semaphore we get better support for
queues other than graphics.

Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36617>
2025-12-19 20:08:40 +00:00
Martin Roukala (né Peres)
34502840ca Revert "ci: disable the valve-kws farm"
This reverts commit 13783fe2ef, now that access
has been restored.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39042>
2025-12-19 21:30:25 +02:00
José Roberto de Souza
821baac5c3 iris: Make uint32 the type used for slab sizes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Most of the functions were using unsigned but we had too uint32 and even a
function with a uint64_t so lets standarize into uint32.

No changes in behavior expected.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39024>
2025-12-19 13:40:15 +00:00
José Roberto de Souza
2cf0b8c2d0 iris: Fix slab memory leak
When in alloc_bo_from_slabs() size and alloc_size are different enough to have
different pb_slabs it causes the slab to be put into the reclaim list of a the
smaller pb_slabs when calling iris_bo_unreference(), causing a memory leak of
(alloc_size - size) bytes.

So here storing and using the actual slab size to fix this issue.

Cc: stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39024>
2025-12-19 13:40:15 +00:00
Daniel Schürmann
f930ecdc55 amd: add newer small APUs to get_task_num_entries()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38999>
2025-12-19 13:03:49 +00:00
Erik Faye-Lund
02cfc61cc9 panfrost: enable texel-buffers for three-component formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The CTS issue for this was closed two months ago, so this should be
fixed now.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38997>
2025-12-19 11:15:26 +00:00
Lionel Landwerlin
252e55a1bb nir/printf-helpers: set writes_memory at printf emission
Those helpers can be called late (since it's mostly for debug
purposes). This can avoid surprises in the backend and also avoids
rerunning gather_info.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38995>
2025-12-19 10:31:08 +00:00