Commit Graph

216394 Commits

Author SHA1 Message Date
Eric Engestrom
14b7340bbf ci: fix path to clippy.toml
"container" images using FDo's ci-templates are built in a chroot with
different paths, breaking absolute paths and making us have to rely on
nobody ever using `cd` or `pushd` anywhere (since we also source every
script instead of executing them). Very fragile and I hate it, but it
hasn't been fixed yet so here we are.

Fixes: 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/39055>
2025-12-21 11:26:31 +01:00
Yiwei Zhang
9670c15d46 venus: hide vtest from Windows build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
2025-12-20 19:12:47 +00:00
Yiwei Zhang
1ddd09c72d venus: refactor meson to be more flexible for additions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
2025-12-20 19:12:47 +00:00
anonymix007
55219167c6 venus: Guard Linux-specific code against being compiled on Windows
v2:
- drop most additions except thread id
- fix DRM_FORMAT_MOD_LINEAR in a different way

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
2025-12-20 19:12:47 +00:00
Yiwei Zhang
d792403f0b venus: disable TLS ring prio forwarding on Windows
The prios aren't consistent when guest and host are different OS'es.
Even if they are the same, sometimes the forwarding can hit other
permission issues. The entire ring prio thing has to be redesigned, and
before that we just disable it on Windows.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
2025-12-20 19:12:47 +00:00
Yiwei Zhang
77b32df391 venus: hide unsupported external extensions on Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
2025-12-20 19:12:47 +00:00
anonymix007
342605f9b1 venus: Expose deviceLUID in props if available
v2: wrap props within id props and use snake case naming

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
2025-12-20 19:12:47 +00:00
Yiwei Zhang
1aa273ae57 venus: hide unsupported device extensions on Windows
This change hides:
- VK_EXT_image_drm_format_modifier
- VK_EXT_map_memory_placed
- VK_EXT_physical_device_drm

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
2025-12-20 19:12:46 +00:00
Yiwei Zhang
c00c398995 venus: hide unsupported wsi extensions on Windows
Hide present id/wait extensions on Windows

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
2025-12-20 19:12:46 +00:00
Vinson Lee
191e4b8fe0 bin/symbols-check: Fix undefined symbol detection on macOS
Commit e626636e90 ("bin/symbols-check: fix fields length condition
before accessing fields") changed the condition from `or` to `and`
to prevent potential IndexError when accessing fields[1].

However, this broke macOS because `nm -gP` outputs different field
counts for undefined symbols:
- Linux:  `_symbol U`           (2 fields)
- macOS:  `_symbol U 0 0`       (4 fields)

The condition `len(fields) == 2 and fields[1] == 'U'` only matched
the Linux format, causing undefined symbols like
_mesa_glapi_tls_Dispatch to be incorrectly reported as
"unknown symbol exported" on macOS.

Fix by using `len(fields) >= 2` to handle both platforms while still
guarding against IndexError.

Fixes: e626636e90 ("bin/symbols-check: fix fields length condition before accessing fields")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13451
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38983>
2025-12-20 02:05:15 +00:00
Rob Clark
c430f394c5 freedreno/a6xx: Move assert
The flags_regid is only present if gs is present (in which case, gs is
the last_shader).  If there is no gs, flags_regid is initialized to
zero, not INVALID_REG (r63.x).  But you have to scroll up several pages
of a long fxn to see that.

Move the assert to make things more clear.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:14 +00:00
Rob Clark
fdf90697e6 tu: Drop FD_NO_DEPRECATED_PACK
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:13 +00:00
Rob Clark
f306e119c8 tu: Convert rest of tu_pipeline deprecated reg builders
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:13 +00:00
Rob Clark
5e3f36fbb6 tu: Rework emit_vpc()
Drop the reg_config table trickery, which doesn't play nicely with
register changes across generations.  (Note, some of the registers,
like PC_HS_CNTL, are not in fact the same as other shader stages.)

While at it, convert to crb to simplify copying code from the gallium
driver.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:13 +00:00
Rob Clark
b91a614baf tu: Rework emit_xs_config()
Rework it to take all active/enabled shader stages in one shot, to
simplify things and drop the xs_configs table.

This lets us use the variant reg packers directly to better deal with
register changes across generations.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:13 +00:00
Rob Clark
dd489e2615 tu: Convert tu_shader deprecated reg builders
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:11 +00:00
Rob Clark
15a839f90c tu: Convert tu_cmd_buffer deprecated reg builders
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:11 +00:00
Rob Clark
4e20cfd797 tu: Convert tu_clear_bit deprecated reg builders
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:11 +00:00
Rob Clark
76cd06426d tu: Rework pipeline stat queries
Drop the legacy register offset macros.  And re-work how we map the vk
query to pipeline stat offset, to account for re-ordering of the
pipeline stat regs in gen8.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:10 +00:00
Rob Clark
d9f1f0e9b9 tu: Drop use of legacy reg offset macros
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:10 +00:00
Rob Clark
7ce63372bd tu: Drop tu_cs_image_*_ref
These were only used in one place.  Drop them and convert to using the
new register packers for improved cross-gen portability.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:09 +00:00
Rob Clark
31d757495e freedreno/registers: Reintroduce FD_NO_DEPRECATED_PACK
The non-variant reg packers were removed in commit fd6489c026 ("tu:
Drop emitting of deprecated packing."), along with
FD_NO_DEPRECATED_PACK.

Add support to mark the even older reg builders as deprecated, and
re-introduce FD_NO_DEPRECATED_PACK to control this.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:08 +00:00
Rob Clark
2f3d6119fc freedreno/registers: Move 'unknown' last
If the builder is passed just a raw value, like an iova in the case of
turnip, we probably don't want to assert that it is all unknown bits.

This hasn't been a problem for the gallium driver, as the bo pointer is
first.  But became a problem for turnip with commit 2d6c15ad57 ("tu:
remove magic bo reg packing (use iovas directly)").

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:07 +00:00
Rob Clark
6326ac4350 freedreno/a6xx: Drop legacy CP_EVENT_WRITE builders
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:06 +00:00
Rob Clark
32be52a457 freedreno/registers: Mark LOAD_IMMED as a5xx
This is replaced by CP_SET_LOAD_IMMEDIATE on later gens.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:06 +00:00
Rob Clark
af38b71e5b freedreno/a6xx: Set FD_BO_NO_HARDPIN from meson
Rather than setting it in each file, we can just set it globally for all
c++ files.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:06 +00:00
Job Noorman
2ed37033a0 ir3/legalize: fix (eq) scheduling for sam.s2en
sam.s2en uses the first src for its samp/tex while the coordinates (for
which derivatives need to be calculated) are in the second src. We used
to unconditionally track needed helpers for the first src causing (eq)
to potentially get scheduled too early for sam.s2en. Fix this by using
the second src for sam.s2en.

Fixes frame instability in Metro Exodus.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 29f8277952 ("ir3/legalize: schedule (eq) more accurately")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38992>
2025-12-19 23:49:55 +00:00
Eric Engestrom
3584bac0b2 nil: cleanup derelict allow(dead_code) annotations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:14:46 +01:00
Eric Engestrom
6b9524f864 nak: cleanup derelict allow(dead_code) annotations
As well as one `allow(non_camel_case_types)`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:14:46 +01:00
Eric Engestrom
e2e36f352f rusticl: cleanup derelict allow(non_upper_case_globals) annotation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:14:46 +01:00
Eric Engestrom
96a48ee8db rusticl: drop collapsible_else_if annotation now that it's allowed globally
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:14:46 +01:00
Eric Engestrom
2202c2d62a util/rust: cleanup derelict allow(dead_code) annotations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:14:46 +01:00
Eric Engestrom
eef174b56b nak: use std::mem::size_of_val(data) instead of open-coding it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:20 +01:00
Eric Engestrom
de7d3cdbda nak: drop "unneeded return statement"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
41ce1939f9 nak: replace .find(x).is_some() with .contains(x)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
c52fa1ac14 nak: merge identical if branches for blackwell, ampere and ada
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
9cfb4b1fdb nak: replace .get(0) with .first()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
124fe82762 nak: drop "deref on an immutable reference"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
4fbda98cf4 nak: drop "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
daeed4a946 nak: allow LdCacheOp values to be named Cache*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
9454006956 nak: drop cast of u8 to u8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
ddc26666da nak: drop clone of Copy-able types (RegOrigin & SSAValue)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
340c355714 nak: use saturating_sub() 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
f4c832ac15 nak: drop "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
5ebe62ebed rusticl: silence incorrect clippy error about re-implementing memcpy
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
74aa12e5ab compiler/rust: drop "borrow of a value the compiler would automatically borrow"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
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