Commit graph

200459 commits

Author SHA1 Message Date
Daniel Schürmann
0db1ae1f01 aco: disable XNACK on all GPUs
Affects code generation on GFX8 and GFX9 APUs where we misunderstood
the feature. XNACK replay is not being used with graphics APIs.

Totals from 41759 (65.90% of 63370) affected shaders: (Raven)

MaxWaves: 298672 -> 299000 (+0.11%)
Instrs: 19200726 -> 19138227 (-0.33%); split: -0.33%, +0.00%
CodeSize: 98501904 -> 98253196 (-0.25%); split: -0.26%, +0.00%
SGPRs: 3058544 -> 2831492 (-7.42%)
VGPRs: 1644896 -> 1643660 (-0.08%)
Latency: 193383803 -> 193224047 (-0.08%); split: -0.08%, +0.00%
InvThroughput: 92741082 -> 92698975 (-0.05%); split: -0.05%, +0.00%
SClause: 678580 -> 630107 (-7.14%); split: -7.15%, +0.00%
Copies: 1863375 -> 1863406 (+0.00%); split: -0.04%, +0.04%
VALU: 13791245 -> 13791267 (+0.00%); split: -0.00%, +0.00%
SALU: 2066726 -> 2066741 (+0.00%); split: -0.04%, +0.04%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38701>
2025-12-22 07:34:43 +00:00
Daniel Schürmann
b9c7cea719 radeonsi: use si_shader_encode_{sgprs|vgprs} in si_compute.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38701>
2025-12-22 07:34:42 +00:00
Daniel Schürmann
d94e90df25 amd/common: link with libamdgpu_addrlib
ac_surface needs that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38701>
2025-12-22 07:34:41 +00:00
Samuel Pitoiset
045b778ed6 radv: add the SQTT relocated shaders BO to the cmdbuf list
Found this while debugging another thing with amdgpu.debug_mask=0x1 (VM).

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39002>
2025-12-22 07:13:06 +00:00
Vinson Lee
c576d64801 util/u_printf: Fix const correctness in util_printf_next_spec_pos
Fix compiler error:

../src/util/u_printf.c:75:13: error: initializing 'char *' with an
expression of type 'const char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
   75 |       char *spec_pos = strpbrk(str_found, "cdieEfFgGaAosuxXp%");
      |             ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

glibc now provides C23-style type-generic string functions. strpbrk
returns const char * when passed a const char * argument. Update
spec_pos declaration to match.

Fixes: 6d263ff5a3 ("util: Convert util/u_printf.cpp to util/u_printf.c")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39059>
2025-12-21 22:34:40 -08:00
Yiwei Zhang
166923bf0e venus: adopt vk_common_GetCalibratedTimestampsKHR
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Venus driver already has to query host time domains within the guest to
be monotonic, so we can rely on the common impl as well and only query
device domain from the renderer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38963>
2025-12-21 16:47:30 +00:00
Yiwei Zhang
36c52644fa venus: use vk_common_GetPhysicalDeviceCalibrateableTimeDomainsKHR
Only host domains are conditional, and they are checked with the common
vk_device_get_timestamp helper.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38963>
2025-12-21 16:47:30 +00:00
Valentine Burley
f8ed6c578a zink/ci: Mark new TGL glx failures as flakes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These newly failures can pass intermittently.

Fixes: a00f6ee033 ("zink/ci: Add tests to the anv-tgl fails list to reflect CI state")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39056>
2025-12-21 11:38:31 +00:00
Yiwei Zhang
9670c15d46 venus: hide vtest from Windows build
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/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
Rob Clark
c430f394c5 freedreno/a6xx: Move assert
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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
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/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