Compare commits

...

2755 commits

Author SHA1 Message Date
Vinson Lee
191e4b8fe0 bin/symbols-check: Fix undefined symbol detection on macOS
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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
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
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
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
Erik Faye-Lund
c1e4c073cd pvr: limit hw-defs to rogue
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Because we are using these carefully picked HW-defs in common code here,
we need to set PVR_BUILD_ARCH_ROGUE first.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
13d12b33c0 pvr: make some winsys files multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
e762592bff pvr: build pvr_arch_*.c as a multi-arch sources
This will allow us to build this multiple times for different
architectures. For now, it only defines a single architecture, because
that's what we currently support. But this makes room for future
architectures, that will follow relatively soon.

Co-authored-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
346e365daa pvr: pass device-info to a few winsys functions
These will have to start knowing about the arch...

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
ba2c40cd03 pvr: use rogue-prefix for rogue-specific code
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
6ae6dd7db6 pvr: make blit/clear-code rogue-specific
For Volcanic, we're planning on on using vk_meta instead of these, so
let's mark them as rogue-only for now.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
e1064e57a7 pvr: only build pvr_dump_csb.c for rogue
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Ashish Chauhan
6b4577e12d pvr: prepare for multi-gen compilation
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:02 +01:00
Erik Faye-Lund
edca79bc41 pvr: prepare winsys files for multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
f473c5fa97 pvr: mark pvr_framebuffer.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
e11fac9f26 pvr: mark pvr_mrt.c as multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
3d84905198 pvr: mark pvr_query_compute.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Ashish Chauhan
be52ea2af7 pvr: mark pvr_queue.c as multi-arch
Signed-off-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
d0d443abd7 pvr: mark pvr_sampler.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
921a04aac6 pvr: mark pvr_job_common.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
6bd378131a pvr: mark pvr_hw_pass.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Ashish Chauhan
949e41a664 pvr: split pvr_formats.c
Signed-off-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
0b97360139 pvr: split pvr_image.c
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
8c7f0ad749 pvr: mark pvr_job_context.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Ashish Chauhan
1f1a6cdadf pvr: split pvr_spm.c
Signed-off-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
8af73b5614 pvr: mark pvr_job_transfer.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
11f59c942e pvr: mark pvr_job_render.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
d07bf4b190 pvr: mark pvr_cmd_query.c as per-arch
This is riddled with per-arch details; this should all be per-arch I
think.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
bd9d87592e pvr: mark pvr_cmd_buffer.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
6e57d71c0a pvr: mark pvr_job_compute.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
eb56f9a200 pvr: mark pvr_tex_state.c as multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
6c14ff34e8 pvr: mark pvr_pass.c as multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
f789eb0d7d pvr: mark pvr_border.c as multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
120a89e2a9 pvr: split pvr_descriptor_set.c
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
1facaaba69 pvr: split pvr_csb.c
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
2c828a8825 pvr: split pvr_device.c
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
b5400c8ddf pvr: factor out framebuffer-specific code
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
5c70230c49 pvr: factor out pvr_rt_dataset to separate module
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
9b3ab2c8cf pvr: factor out cmdbuf functions from pvr_query.c
These functions needs to be per-arch, so let's split them out.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
90f60b9b7e pvr: limit availability of HW defs
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
5b3c05006d pvr: store format-table in pvr_physical_device
This way we can look up in it without having to know what architecture
we're using.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
49d94897af pvr: add missing forward-decl
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
429e29ec42 pvr: add missing include
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Christoph Pillmayer
cef4841d1a pan/bi: Fix bi_find_loop_blocks for single block loops
Fixes: 6535a3b6 ("pan: Fix bi_find_loop_blocks")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39018>
2025-12-19 08:30:19 +00:00
Zan Dobersek
6bff8fd5e8 tu: use application name matching for Yooka-Laylee driconf option
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When running Yooka-Laylee under FEX, the executable name will be the one of
the FEX binary, which the existing driconf option won't match. FEX is able
to override the executable name in newer versions, but overall it's still
more reliable to match the application name provided through Vulkan.

Fixes: 0574bfd5f4 ("tu: add UBO lowering workaround for Yooka-Laylee")
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39012>
2025-12-19 07:50:40 +00:00
Ahmed Hesham
95ed8d6638 panfrost: fix get_image_width for 1D buffer images
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Image size queries for buffer images were incorrectly using the
underlying buffer's width instead of the image view's size.

This affected `get_image_width` in OpenCL C for 1Dbuffer images, in
cases where the buffer is larger than the image to account for
padding, breaking the conformance test `test_kernel_image_methods
1Dbuffer`.

Fixes: 0efe7a6eb9 ("panfrost: implement image_size sysval")

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38949>
2025-12-19 00:57:37 +00:00
Sushma Venkatesh Reddy
d9834fcaa6 compiler: Add FP8 types to GLSL type decoder
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39007>
2025-12-19 00:09:53 +00:00
Sushma Venkatesh Reddy
d1d4e3d530 brw: Add EU assembler support for float8
Decode logic in Gfx12+ has become complex with the new types, so Caio
suggested that we move to the table like other gens.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39007>
2025-12-19 00:09:53 +00:00
Jordan Justen
0088aae481 intel/brw: Add new encode/decode for use with brw_data_type_float/int
Rework:
 * Sushma: Add BF in brw_data_type_encode, brw_data_type_decode

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39007>
2025-12-19 00:09:53 +00:00
Jordan Justen
46e843f76e intel/brw: Add brw_data_type_float/brw_data_type_int
These type encodings were first were used in dpas instructions, but
continue to be used in more places.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39007>
2025-12-19 00:09:52 +00:00
Sushma Venkatesh Reddy
54accefed2 brw: Add BRW_TYPE_BF8 and BRW_TYPE_HF8 for float8
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39007>
2025-12-19 00:09:52 +00:00
Mel Henning
c9ae59dec5 nvk: Set maxStorageBufferRange = maxBufferSize
We were previously reporting a larger maxStorageBufferRange than our
maxBufferSize, which is weird. Lower maxStorageBufferRange to match
maxBufferSize.

Fixes crucible stress.limits.buffer-update.range.storage.q0

Fixes: 65f12fde44 ("nvk: Improve address space and buffer size limits")
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39021>
2025-12-18 23:51:50 +00:00
Ian Romanick
b967942b64 brw: Do cmod prop again after scheduling
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
After selecting the scheduling mode, do cmod prop again. It's possible
that doing cmod prop between performing a schedule and trying to
register allocate would cause a different scheduling mode to be
selected. However, this would require fully restoring the pre-schedule
set of instructions (via cloning). I have tried to implement this, and
it's harder than it looks. :(

v2: Delete unused variable `progress`. Noticed by Marge.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19967018 -> 19967006 (<.01%)
instructions in affected programs: 10652 -> 10640 (-0.11%)
helped: 4 / HURT: 0

total cycles in shared programs: 884129990 -> 884139590 (<.01%)
cycles in affected programs: 20334512 -> 20344112 (0.05%)
helped: 0 / HURT: 4

fossil-db:

Lunar Lake
Totals:
Instrs: 924967191 -> 924963460 (-0.00%); split: -0.00%, +0.00%
Cycle count: 105962414958 -> 105961925594 (-0.00%); split: -0.00%, +0.00%
Spill count: 3423582 -> 3423564 (-0.00%); split: -0.00%, +0.00%
Fill count: 4877121 -> 4876955 (-0.00%); split: -0.00%, +0.00%

Totals from 2511 (0.12% of 2018786) affected shaders:
Instrs: 12541707 -> 12537976 (-0.03%); split: -0.03%, +0.00%
Cycle count: 4816359238 -> 4815869874 (-0.01%); split: -0.01%, +0.00%
Spill count: 179536 -> 179518 (-0.01%); split: -0.03%, +0.02%
Fill count: 279407 -> 279241 (-0.06%); split: -0.07%, +0.01%

Meteor Lake, DG2, Tiger Lake, Ice Lake, and Skylake had similar results. (Meteor Lake shown)
Totals:
Instrs: 980252404 -> 980237686 (-0.00%); split: -0.00%, +0.00%
Cycle count: 91758669556 -> 91764028404 (+0.01%); split: -0.00%, +0.01%
Spill count: 3664771 -> 3664744 (-0.00%); split: -0.00%, +0.00%
Fill count: 4962078 -> 4960482 (-0.03%); split: -0.04%, +0.01%

Totals from 8472 (0.38% of 2251522) affected shaders:
Instrs: 34977623 -> 34962905 (-0.04%); split: -0.04%, +0.00%
Cycle count: 6251857553 -> 6257216401 (+0.09%); split: -0.04%, +0.13%
Spill count: 480251 -> 480224 (-0.01%); split: -0.01%, +0.00%
Fill count: 676539 -> 674943 (-0.24%); split: -0.28%, +0.05%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
2025-12-18 15:15:20 -08:00
Ian Romanick
09450faf6a brw: Do cmod prop again after post-RA scheduling
shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19968728 -> 19963825 (-0.02%)
instructions in affected programs: 788014 -> 783111 (-0.62%)
helped: 2503 / HURT: 0

total cycles in shared programs: 884112912 -> 884093268 (<.01%)
cycles in affected programs: 20017168 -> 19997524 (-0.10%)
helped: 1830 / HURT: 52

LOST:   0
GAINED: 6

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 980768016 -> 980172179 (-0.06%)
Cycle count: 91762351767 -> 91757280093 (-0.01%); split: -0.01%, +0.00%
Max dispatch width: 37602592 -> 37608768 (+0.02%)

Totals from 157150 (6.98% of 2251329) affected shaders:
Instrs: 107323207 -> 106727370 (-0.56%)
Cycle count: 12696754006 -> 12691682332 (-0.04%); split: -0.04%, +0.00%
Max dispatch width: 3708584 -> 3714760 (+0.17%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
2025-12-18 15:15:20 -08:00
Ian Romanick
08d71730ca brw/cmod: Propagate to an instruction with same source
Detect cases like

    mov.nz.f0.0(8)  null<1>D       g66<8,8,1>D
    (+f0.0) sel(8)  g123<1>UD      g87<8,8,1>UD   g84<8,8,1>UD
    mov.nz.f0.0(8)  null<1>D       g66<8,8,1>D
    (+f0.0) sel(8)  g124<1>UD      g88<8,8,1>UD   g85<8,8,1>UD

Either MOV instruction could also be an equivalent CMP.

v2: Require no predicate, groups match, and flags written match.

v3: Add some more unit tests. Suggested by Caio.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 17203627 -> 17203590 (<.01%)
instructions in affected programs: 51432 -> 51395 (-0.07%)
helped: 37 / HURT: 0

total cycles in shared programs: 879884982 -> 879884670 (<.01%)
cycles in affected programs: 6014730 -> 6014418 (<.01%)
helped: 25 / HURT: 4

fossil-db:
Lunar Lake
Totals:
Instrs: 925092938 -> 925071952 (-0.00%); split: -0.00%, +0.00%
Cycle count: 105972157149 -> 105966120894 (-0.01%); split: -0.01%, +0.00%
Spill count: 3423592 -> 3423582 (-0.00%)
Fill count: 4876743 -> 4877121 (+0.01%); split: -0.00%, +0.01%
Max live registers: 193525293 -> 193525251 (-0.00%)
Max dispatch width: 49047056 -> 49047088 (+0.00%); split: +0.00%, -0.00%

Totals from 17714 (0.88% of 2018791) affected shaders:
Instrs: 56708169 -> 56687183 (-0.04%); split: -0.04%, +0.00%
Cycle count: 4560530879 -> 4554494624 (-0.13%); split: -0.15%, +0.01%
Spill count: 434846 -> 434836 (-0.00%)
Fill count: 807443 -> 807821 (+0.05%); split: -0.02%, +0.07%
Max live registers: 4332542 -> 4332500 (-0.00%)
Max dispatch width: 295248 -> 295280 (+0.01%); split: +0.02%, -0.01%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 995075628 -> 995051291 (-0.00%); split: -0.00%, +0.00%
Cycle count: 92060967154 -> 92059311640 (-0.00%); split: -0.00%, +0.00%
Spill count: 3664664 -> 3664675 (+0.00%); split: -0.00%, +0.00%
Fill count: 4961929 -> 4961874 (-0.00%); split: -0.00%, +0.00%
Max live registers: 121480292 -> 121480184 (-0.00%)
Max dispatch width: 37947528 -> 37947496 (-0.00%)

Totals from 20569 (0.90% of 2278279) affected shaders:
Instrs: 57437989 -> 57413652 (-0.04%); split: -0.04%, +0.00%
Cycle count: 4297505238 -> 4295849724 (-0.04%); split: -0.06%, +0.03%
Spill count: 487508 -> 487519 (+0.00%); split: -0.00%, +0.00%
Fill count: 869228 -> 869173 (-0.01%); split: -0.01%, +0.00%
Max live registers: 2413028 -> 2412920 (-0.00%)
Max dispatch width: 239280 -> 239248 (-0.01%)

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 1012570598 -> 1012546137 (-0.00%); split: -0.00%, +0.00%
Cycle count: 85579989052 -> 85589116671 (+0.01%); split: -0.00%, +0.01%
Spill count: 3901755 -> 3901748 (-0.00%)
Fill count: 6799383 -> 6799367 (-0.00%)
Max live registers: 122288761 -> 122288658 (-0.00%)

Totals from 20595 (0.90% of 2280449) affected shaders:
Instrs: 57764192 -> 57739731 (-0.04%); split: -0.04%, +0.00%
Cycle count: 3899898675 -> 3909026294 (+0.23%); split: -0.04%, +0.27%
Spill count: 481262 -> 481255 (-0.00%)
Fill count: 1057996 -> 1057980 (-0.00%)
Max live registers: 2412395 -> 2412292 (-0.00%)

Skylake
Totals:
Instrs: 516619178 -> 516617390 (-0.00%)
Cycle count: 57593545602 -> 57592502019 (-0.00%); split: -0.00%, +0.00%
Fill count: 860403 -> 860402 (-0.00%)
Max live registers: 87553761 -> 87553649 (-0.00%)

Totals from 1357 (0.08% of 1730068) affected shaders:
Instrs: 3575640 -> 3573852 (-0.05%)
Cycle count: 1772148559 -> 1771104976 (-0.06%); split: -0.06%, +0.00%
Fill count: 68917 -> 68916 (-0.00%)
Max live registers: 131237 -> 131125 (-0.09%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
2025-12-18 15:15:20 -08:00
Ian Romanick
50f2cd7366 brw/dce: Don't generate more NULL destinations after brw_lower_3src_null_dest
Later commits will call DCE after lowering has been performed. Creating
more things that would need lowering is problematic.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
2025-12-18 15:15:20 -08:00
Ian Romanick
24cd8aa3b8 brw/cmod: Allow FIXED_GRF
Later commits will call cmod prop after register allocation. At that
time, there is only FIXED_GRF.

No shader-db or fossil-db changes on any Intel platform.

v2: FIXED_GRF uses subnr instead of offset. Add a unit test to
demonstrate the issue.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
2025-12-18 15:15:20 -08:00
Ian Romanick
d7227b11a1 brw: elk: Disable can_do_cmod for MACH
PRMs for G35 (Gfx4) through Ivy Bridge (Gfx7) all say that conditional
modifiers are allowed for MACH. Starting with Haswell (Gfx7.5), this
seems to be removed. This function doesn't have any way to know the
platform, so false is returned for all platforms.

No shader-db or fossil-db changes on any Intel platform.

Prevents a failure in "brw: Do cmod prop again after post-RA scheduling"
in piglit's builtin-uint-mad_sat-1.0.generated.cl.

Cc: stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
2025-12-18 15:15:20 -08:00
Ian Romanick
ba30794847 brw/cmod: Don't propagate between instructions in different groups
The group implicity selects which flags the instruction can write. This
was discovered while working on another set of changes that could change
some logical operations into predicated MOV instructions.

Prevents regressions later in the series in
dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition.

No shader-db or fossil-db changes on any Intel platform.

v2: Update the comment in the test case. Suggested by Caio.

Fixes: 95ac3b1dae ("i965/fs: don't propagate cmod when the exec sizes differ")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
2025-12-18 15:15:20 -08:00
Ian Romanick
c0fb93506b brw: Add brw_reg::is_grf
v2: Add a function comment. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
2025-12-18 15:15:20 -08:00
Benjamin Cheng
fa8b0b6bbb radv/video: Enable write combine for decode
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39025>
2025-12-18 15:25:57 -05:00
Dmitry Baryshkov
4315c28739 gfxstream: don't dump genvk.py args to generated files
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Full command lines include full path to the output file, which triggers
reproducibility warnings (e.g. in Yocto builds). Drop the args and print
only a basename of the script used to generate the file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38875>
2025-12-18 18:52:19 +00:00
hwandy
ffbe6470a2 anv: fix a memory leak in slab allocator.
An example when the memory leak happens: requested_size = 4 and alignment = 65536 in anv_slab_bo_alloc:

The alloc_size = 65536 and requested = 4 in this case.

The group to allocate the entry is the group of size 65536 based on the entry size,
while the group to reclaim the entry is the group of size 4 due to the bo->size is
registered as the requested_size=4 and used in anv_slab_bo_free.

That means, the entry is allocated in group[order of size 65535]->free,
moved from group[order of size 65535]->free to the user, and then moved
to group[order of size 4]->reclaim, so the entries is accumulated in
group[order of size 4]->reclaim and group[order of size 65535] keeps
allocating new entries and leading to OOM.

The solution is to use `bo->actual_size` to get the group in pb_slab_bo_free using the allocation size.

Fixes: dabb012423 ("anv: Implement anv_slab_bo and enable memory pool")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14396
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: hwandy <hwandy@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38989>
2025-12-18 18:25:54 +00:00
Alyssa Rosenzweig
61dc9201a1 brw: constant fold before texture lowering
This ensures we don't need dynamic stuff. Noticed when debugging weird
regressions around the mcs lowering. ARL:

total instructions in shared programs: 19857061 -> 19854964 (-0.01%)
instructions in affected programs: 91768 -> 89671 (-2.29%)
helped: 154
HURT: 0
helped stats (abs) min: 9.0 max: 33.0 x̄: 13.62 x̃: 13
helped stats (rel) min: 0.51% max: 40.91% x̄: 4.66% x̃: 3.36%
95% mean confidence interval for instructions value: -14.04 -13.19
95% mean confidence interval for instructions %-change: -5.49% -3.84%
Instructions are helped.

total cycles in shared programs: 884538769 -> 884485530 (<.01%)
cycles in affected programs: 10508994 -> 10455755 (-0.51%)
helped: 116
HURT: 38
helped stats (abs) min: 4.0 max: 15238.0 x̄: 666.22 x̃: 148
helped stats (rel) min: 0.01% max: 34.53% x̄: 2.58% x̃: 1.07%
HURT stats (abs)   min: 4.0 max: 4027.0 x̄: 632.68 x̃: 302
HURT stats (rel)   min: 0.01% max: 32.75% x̄: 3.46% x̃: 0.59%
95% mean confidence interval for cycles value: -631.32 -60.09
95% mean confidence interval for cycles %-change: -2.06% -0.12%
Cycles are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39023>
2025-12-18 17:55:29 +00:00
Mel Henning
0df735a619 nvk: Disable compression for image import/export
Reviewed-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36450>
2025-12-18 12:13:05 -05:00
Mohamed Ahmed
cabfdb4404 nvk: Enable compression
Enables compression for select images. Additionally, we get large (64K), and
huge (2M) pages as a bonus as the hardware can only do compression on these page
sizes. However, due to nouveau limitations, this means that we are limited to
enabling it on things pinned to VRAM. Fortunately, this works out for us as we
can enable it for color, Z/S, and storage images, which are the main types
to benefit from compression as they're write heavy.

Unfortunately, this means that we need to handle the memory allocation in a
delicate way, as the Vulkan API is a bit restrictive in this regard, so we have
to use dedicated allocations for compression/larger pages.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36450>
2025-12-18 12:12:47 -05:00
Juan A. Suarez Romero
d656960596 broadcom/ci: set testgroup size for asan
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Set it to 500 tests, as if just only one test fails the asan, all the
tests will be marked as fail too. Keeping the size smaller, will allow
to process later to bisect searching for the tests that actually expose
the issue.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39022>
2025-12-18 16:42:30 +00:00
Juan A. Suarez Romero
cf7e2b9f6b broadcom/ci: update expected list
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39022>
2025-12-18 16:42:30 +00:00
Mel Henning
b55b8da012 nak: Add a prepass instruction scheduler
Totals:
CodeSize: 5750619392 -> 5817868528 (+1.17%); split: -0.32%, +1.49%
Number of GPRs: 16276896 -> 16342962 (+0.41%); split: -1.00%, +1.41%
SLM Size: 8927212 -> 8739732 (-2.10%); split: -2.59%, +0.49%
Static cycle count: 1497053946 -> 1412275595 (-5.66%); split: -6.00%, +0.33%
Spills to memory: 14248182 -> 14157708 (-0.63%); split: -1.25%, +0.62%
Fills from memory: 14248182 -> 14157708 (-0.63%); split: -1.25%, +0.62%
Spills to reg: 9143000 -> 9042885 (-1.09%); split: -1.22%, +0.13%
Fills from reg: 6892354 -> 6808724 (-1.21%); split: -1.33%, +0.12%
Max warps/SM: 6482016 -> 6567500 (+1.32%); split: +1.40%, -0.08%

Totals from 189431 (96.40% of 196502) affected shaders:
CodeSize: 5739697280 -> 5806946416 (+1.17%); split: -0.32%, +1.50%
Number of GPRs: 16114477 -> 16180543 (+0.41%); split: -1.01%, +1.42%
SLM Size: 8927180 -> 8739700 (-2.10%); split: -2.59%, +0.49%
Static cycle count: 1495006918 -> 1410228567 (-5.67%); split: -6.00%, +0.33%
Spills to memory: 14248182 -> 14157708 (-0.63%); split: -1.25%, +0.62%
Fills from memory: 14248182 -> 14157708 (-0.63%); split: -1.25%, +0.62%
Spills to reg: 9141040 -> 9040925 (-1.10%); split: -1.23%, +0.13%
Fills from reg: 6890401 -> 6806771 (-1.21%); split: -1.34%, +0.12%
Max warps/SM: 6149140 -> 6234624 (+1.39%); split: +1.47%, -0.08%

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33306>
2025-12-18 16:17:05 +00:00
Mel Henning
5caee114ec nak: Reserve capacity in LiveSet::from_iter,extend
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33306>
2025-12-18 16:17:05 +00:00
Mel Henning
f64d2c8557 nak: Factor out prev_multiple_of
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33306>
2025-12-18 16:17:04 +00:00
Pierre-Eric Pelloux-Prayer
645fff5dae ac/descriptors: account for num_storage_samples for gfx10
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes a page fault when nr_samples=4 but nr_storage_samples=2.
Based on si_is_format_supported this is only supported for color
formats and when has_eqaa_surface_allocator is true (< GFX11).

The referenced commit below didn't introduce the issue but it
exposed it by forcing the gfx blit path to be used.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13255
Fixes: 3424e16ece ("radeonsi: add decision code to select when to use CB_RESOLVE for performance")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38925>
2025-12-18 10:45:49 +00:00
Pierre-Eric Pelloux-Prayer
7fc5267d08 hud: add new 'dev' pseudo-graph
It displays the renderer string and the PCIe bus info.
It's not a real graph because hud_graph is built to draw
numbers and 'dev' is the only use case so far where we
just want to draw a string.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38925>
2025-12-18 10:45:49 +00:00
Pierre-Eric Pelloux-Prayer
3b4b5761aa hud: only increase y if the pane contains graphs
This makes the layout of "fps,cpu" identical to "fps,stdout,cpu".
Without this change, the ',' separator after 'stdout' would increase
y and we would have a gap between the fps and cpu graphs.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38925>
2025-12-18 10:45:49 +00:00
Pierre-Eric Pelloux-Prayer
f521a6270b mesa: consider Attrib.MinLayer in do_blit_framebuffer
Otherwise a blit from a fbo with a GL_COLOR_ATTACHMENT0
using a GL_TEXTURE_2D view of a GL_TEXTURE_2D_ARRAY will
always read from layer 0.

See https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/1060

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13527
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38925>
2025-12-18 10:45:49 +00:00
Martin Roukala (né Peres)
13783fe2ef ci: disable the valve-kws farm
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We are having problem establishing connections to the s3.freedesktop.org
web server, so let's disable the farm until we can figure it out.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39017>
2025-12-18 12:35:39 +02:00
Lucas Stach
57dc4cf4fb etnaviv: don't emit steering state when uniforms are unchanged
The steering bits tell the GPU which caches to invalidate on the
subsequent uniform state writes. There is no point in writing
those steering bits when there are no uniforms to emit.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38998>
2025-12-18 09:05:39 +00:00
Boris Brezillon
d7d690b47f panvk: Fix set_compute_sysval()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
BITSET_SET_RANGE() was passed sysval_fau_start() instead of
sysval_fau_end() as a 3rd argument.

Fixes: ae76a6a045 ("panvk: Pack push constants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14489
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38980>
2025-12-18 08:14:14 +01:00
Kenneth Graunke
d83c699045 brw: Convert GS pulled inputs to use URB intrinsics
We leave GS pushed inputs using load_per_vertex_input for now - they're
relatively simple, and using load_attribute_payload doesn't work well
since it's assumed to be convergent (for TES, FS inputs) while GS inputs
are divergent.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38990>
2025-12-18 06:39:02 +00:00
Kenneth Graunke
eae3bd19d4 brw: Move GS URB Read Length limiting to brw_nir_lower_gs_inputs()
We're going to be deciding on push vs. pull in the NIR lowering pass
soon, so move the code to limit our register usage from brw's thread
payload code to brw_nir_lower_gs_inputs().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38990>
2025-12-18 06:39:02 +00:00
Kenneth Graunke
8889802271 brw: Make max_push_bytes a parameter to URB lowering data
This allows us to program something other than a stage-based constant.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38990>
2025-12-18 06:39:02 +00:00
Kenneth Graunke
f62f7d80e2 brw: Update try_load_push_input to handle dword-unit offsets too
We don't need this case today, but it's trivial to handle.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38990>
2025-12-18 06:39:01 +00:00
Job Noorman
f601aa5ce7 ir3/bisect: fix off-by-one issues while bisecting
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes two separate issues:
- Getting stuck when ending up with a list of 2 ids;
- Removing a potential bad id.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38993>
2025-12-18 04:43:16 +00:00
Marek Olšák
3c5c96fedb radv: double pixel throughput in certain cases of PS without interpolated inputs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reduces the number of initialized VGPRs by 1 when no barycentric
coordinates are used.

I have verified with zink that this indeed increases performance for
cases where sysvals like frag_coord and front_face are used without
interpolated PS inputs.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38936>
2025-12-18 03:37:58 +00:00
Marek Olšák
8cf154d2eb radeonsi: don't load sampler states for buffer and MS samplers
They don't use them.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38915>
2025-12-18 03:20:13 +00:00
Marek Olšák
5acabdd1f8 radeonsi: double pixel throughput in certain cases of PS without inputs
When no barycentric VGPRs are needed, we always enabled one of the pairs
(e.g. PERSP_SAMPLE_ENA) because it's a HW requirement. However,
the requirement says that LINE_STIPPLE_TEX_ENA can be enabled instead,
which occupies only 1 VGPR.

To get maximum pixel throughput, we can only have 2 initialized VGPRs
at most. By reducing initialized VGPRs from 2 (with PERSP_SAMPLE_ENA) to 1
(with LINE_STIPPLE_TEX_ENA), we can have 1 additional initialized VGPR
for free with maximum pixel throughput, such as POS_FIXED_PT for
frag_coord.xy without MSAA.

Only ACO gets this perf improvement because the change would be more
complicated with LLVM.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38915>
2025-12-18 03:20:13 +00:00
Timothy Arceri
6592a18cd7 util/driconf: add workaround for Interstellar Rift
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This game sets the reset isolation bit which causes the GL context
creation to fail as Mesa doesn't support the
GLX_ARB_robustness_application_isolation extension. Here we override
and clear the bit.

According to the spec says:

    "The GLX_ARB_robustness_application_isolation and
    GLX_ARB_robustness_share_group_isolation extensions do not provide
    guarantees for graphics resets caused by applications which did
    not create their contexts with both the LOSE_CONTEXT_ON_RESET_ARB
    reset notification strategy and the
    GLX_CONTEXT_RESET_ISOLATION_BIT_ARB bit."

And the game doesn't set LOSE_CONTEXT_ON_RESET_ARB so technically
we could ignore the reset isolation bit even if Mesa did support
the extension.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13336

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38668>
2025-12-17 23:35:25 +00:00
Timothy Arceri
67eeee43e0 driconf: add a way to override GLX_CONTEXT_RESET_ISOLATION_BIT_ARB
This allows us to override and clear the reset isolation bit.
It will be used in the following patch to override missing support
for GLX_CONTEXT_RESET_ISOLATION_BIT_ARB.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38668>
2025-12-17 23:35:24 +00:00
Dylan Baker
f5351afbc8 docs: update calendar for 25.3.2
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/39010>
2025-12-17 22:11:17 +00:00
Dylan Baker
bb8d00e4b2 docs: Add checksums for 25.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39010>
2025-12-17 22:11:17 +00:00
Dylan Baker
7e53a239aa docs: add release notes for 25.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39010>
2025-12-17 22:11:17 +00:00
Lucas Stach
075eefc422 etnaviv: blt: fix tile count calculation for in-place resolve
A in-place resolve via the BLT engine is only supposed to fill the
tiles of a single layer of a resource, so the size to calculate the
number of tiles is the layer stride, same as done for the in-place
resolve via the RS engine in
8df11f3fad ("etnaviv: fix in-place resolve tile count.")

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39005>
2025-12-17 21:55:13 +00:00
Emma Anholt
c00ebca5c4 ir3: Improve spilling of NIR vars to scratch.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Previously, we would spill at the NIR level any temp array over 16 vec4s.
This had two problems:

1) We wouldn't spill for the worst case scenario: a MAD accessing a dst
array and 3 different src arrays (that all get fully unspilled, rather
than just reloading the specific reg in the operand).  This would fail to
register allocate.  We haven't seen this in practice.

2) We would spill vec4[17] and larger arrays that weren't necessary to get
the shader to register allocate.  This occurred on a FS for in Stray that
had a vec4[24] array and just 4 vec4s of register pressure other than the
array.

Instead, use NIR scratch spilling when the worst case set of vars to
reference in an instruction would overflow GPR space.  This makes the
shader in Stray go from 11ms to .5ms, by eliminating all spilling and
leaving the array in GPRs.  On the other hand, if leaving the arrays
unspilled in NIR means that we cause spilling in ir3, the fact that ir3
spills/reloads work on the whole array may cause the amount of spilling to
increase.  However, we can see the effect is very small in terms of number
of shaders affected in shader-db and an overwhelmingly positive effect on
spills:

MaxWaves: 22522470 -> 22520664 (-0.01%)
Instrs: 396093281 -> 396122221 (+0.01%); split: -0.00%, +0.01%
STPs: 218915 -> 182907 (-16.45%)
LDPs: 155374 -> 153364 (-1.29%); split: -2.79%, +1.50%

Totals from 496 (0.03% of 1561298) affected shaders:
MaxWaves: 3792 -> 1986 (-47.63%)
Instrs: 441224 -> 470164 (+6.56%); split: -0.00%, +6.57%
CodeSize: 926164 -> 976734 (+5.46%); split: -0.05%, +5.52%
NOPs: 58896 -> 52765 (-10.41%); split: -14.95%, +4.60%
MOVs: 16314 -> 57901 (+254.92%)
COVs: 3293 -> 5146 (+56.27%)
Full: 12876 -> 23632 (+83.54%)
(ss): 18613 -> 11573 (-37.82%); split: -47.53%, +9.71%
(sy): 2539 -> 2505 (-1.34%); split: -10.75%, +9.41%
(ss)-stall: 40682 -> 26413 (-35.07%); split: -47.90%, +12.80%
(sy)-stall: 147862 -> 117004 (-20.87%); split: -37.65%, +16.69%
STPs: 38566 -> 2558 (-93.37%)
LDPs: 5060 -> 3050 (-39.72%); split: -85.77%, +45.93%
Cat0: 65593 -> 59487 (-9.31%); split: -13.42%, +4.15%
Cat1: 19667 -> 63105 (+220.87%)
Cat2: 155958 -> 157879 (+1.23%); split: -0.05%, +1.28%
Cat6: 105228 -> 94910 (-9.81%); split: -12.36%, +2.54%
Cat7: 2480 -> 2485 (+0.20%); split: -0.08%, +0.28%
Subgroup size: 31872 -> 31744 (-0.40%)

The primary impacted application from shader-db is gfxbench aztec ruins.
A quick test of it showed no significant performance improvement (n=3).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37245>
2025-12-17 19:50:28 +00:00
Emma Anholt
0d9428736b ir3/ra: Make a helper to get RA register pressure limits.
I'll be reusing this to let vars_to_scratch keep bigger arrays in register
space.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37245>
2025-12-17 19:50:28 +00:00
Emma Anholt
d5cb38e457 ir3: Move the compute shader threadsize forcing earlier.
With this, we can look at real_wavesize while running NIR passes and know
if we have to be doubled because of the shader info coming in.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37245>
2025-12-17 19:50:28 +00:00
Emma Anholt
5a09abe890 nir: Introduce nir_lower_vars_to_scratch_global().
This lets the driver make a more informed decision about which vars to
lower to scratch based on the vars available to spill.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37245>
2025-12-17 19:50:28 +00:00
Emma Anholt
059d301c79 nir: Drop the mode argument of nir_lower_vars_to_scratch().
It only makes sense for function temps, and that's the only way it's been
used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37245>
2025-12-17 19:50:28 +00:00
Yiwei Zhang
962bed2dd6 vulkan: update ALLOWED_ANDROID_VERSION for api level 36
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38988>
2025-12-17 19:22:47 +00:00
Mel Henning
dfdaee5ca7 nak: Use the hardware's max warps_per_sm value
This should improve our occupancy estimates.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38913>
2025-12-17 19:08:05 +00:00
Mel Henning
b154071178 nak: Don't box ShaderModelInfo
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38913>
2025-12-17 19:08:05 +00:00
Mel Henning
d7e906d60e nak: Replace &dyn ShaderModel w/ &ShaderModelInfo
This is mostly a s/dyn ShaderModel/ShaderModelInfo/ with a few manual fixes.
With this change, we now statically dispatch into ShaderModel, which is
a bit faster than dynamically dispatching. Together, this commit and the
last one improve compile times by about 1% geomean.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38913>
2025-12-17 19:08:04 +00:00
Mel Henning
ee65578fa1 nak: Add ShaderModelInfo
which statically dispatches into the right ShaderModel implementation.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38913>
2025-12-17 19:08:04 +00:00
Ian Romanick
66fd4d72fd nir/algebraic: Mask with shifted constant instead of shift-then-mask
shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 17088766 -> 17088765 (<.01%)
instructions in affected programs: 1375 -> 1374 (-0.07%)
helped: 1 / HURT: 1

total cycles in shared programs: 887873068 -> 887871748 (<.01%)
cycles in affected programs: 136402 -> 135082 (-0.97%)
helped: 2 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 924954240 -> 924939317 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 40937696 -> 40937728 (+0.00%)
Cycle count: 106116946509 -> 106116637903 (-0.00%); split: -0.00%, +0.00%
Spill count: 3423930 -> 3423250 (-0.02%); split: -0.02%, +0.00%
Fill count: 4876960 -> 4876045 (-0.02%); split: -0.03%, +0.01%
Max live registers: 193882457 -> 193881816 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 49078640 -> 49078656 (+0.00%)
Non SSA regs after NIR: 231314214 -> 231314219 (+0.00%); split: -0.00%, +0.00%

Totals from 13809 (0.68% of 2019450) affected shaders:
Instrs: 25433084 -> 25418161 (-0.06%); split: -0.08%, +0.02%
Subgroup size: 32 -> 64 (+100.00%)
Cycle count: 1483550606 -> 1483242000 (-0.02%); split: -0.27%, +0.25%
Spill count: 41466 -> 40786 (-1.64%); split: -1.88%, +0.24%
Fill count: 74195 -> 73280 (-1.23%); split: -2.12%, +0.88%
Max live registers: 2326365 -> 2325724 (-0.03%); split: -0.05%, +0.02%
Max dispatch width: 234848 -> 234864 (+0.01%)
Non SSA regs after NIR: 3394104 -> 3394109 (+0.00%); split: -0.00%, +0.00%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 997527742 -> 997524495 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 27452928 -> 27452944 (+0.00%)
Cycle count: 93646717070 -> 93649738060 (+0.00%); split: -0.00%, +0.01%
Spill count: 3710125 -> 3709784 (-0.01%); split: -0.03%, +0.02%
Fill count: 5032819 -> 5033191 (+0.01%); split: -0.04%, +0.05%
Max live registers: 121648838 -> 121648528 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 37811544 -> 37811584 (+0.00%)
Non SSA regs after NIR: 255562054 -> 255565914 (+0.00%); split: -0.00%, +0.00%

Totals from 14438 (0.63% of 2281134) affected shaders:
Instrs: 25974222 -> 25970975 (-0.01%); split: -0.08%, +0.06%
Subgroup size: 16 -> 32 (+100.00%)
Cycle count: 1149710820 -> 1152731810 (+0.26%); split: -0.29%, +0.55%
Spill count: 44445 -> 44104 (-0.77%); split: -2.23%, +1.46%
Fill count: 76172 -> 76544 (+0.49%); split: -2.89%, +3.37%
Max live registers: 1237997 -> 1237687 (-0.03%); split: -0.04%, +0.02%
Max dispatch width: 123528 -> 123568 (+0.03%)
Non SSA regs after NIR: 3490757 -> 3494617 (+0.11%); split: -0.03%, +0.14%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 1013364485 -> 1013342384 (-0.00%); split: -0.00%, +0.00%
Cycle count: 85509342602 -> 85500105656 (-0.01%); split: -0.02%, +0.01%
Spill count: 3903944 -> 3903350 (-0.02%); split: -0.02%, +0.01%
Fill count: 6801948 -> 6799368 (-0.04%); split: -0.05%, +0.01%
Max live registers: 122212165 -> 122211859 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 37805336 -> 37805472 (+0.00%)
Non SSA regs after NIR: 244624956 -> 244628603 (+0.00%); split: -0.00%, +0.00%

Totals from 14835 (0.65% of 2278397) affected shaders:
Instrs: 27522570 -> 27500469 (-0.08%); split: -0.10%, +0.02%
Cycle count: 1128820972 -> 1119584026 (-0.82%); split: -1.53%, +0.71%
Spill count: 46408 -> 45814 (-1.28%); split: -2.04%, +0.76%
Fill count: 99071 -> 96491 (-2.60%); split: -3.14%, +0.54%
Max live registers: 1287967 -> 1287661 (-0.02%); split: -0.04%, +0.02%
Max dispatch width: 126600 -> 126736 (+0.11%)
Non SSA regs after NIR: 3438628 -> 3442275 (+0.11%); split: -0.03%, +0.14%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38979>
2025-12-17 18:38:55 +00:00
Tapani Pälli
2418c91537 anv/drirc: disable Xe2 CCS drm modifiers for GTK engine
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38373>
2025-12-17 17:34:09 +00:00
Connor Abbott
68c1a8230d freedreno/crashdec: Fix crash with older kernels
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Older kernels lack the cluster-name property. Don't crash decoding
devcoredumps from them, even if they can't be converted to snapshots
properly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38931>
2025-12-17 16:00:56 +00:00
Samuel Pitoiset
f8feed17e1 ac,radv,radeonsi: add tracked register macros to common code
Because the tracked registers are really driver dependant, the driver
is expected to handle the tracked_registers struct itself.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:26 +00:00
Samuel Pitoiset
c580fc667f ac,radv: add ac_cmdbuf::context_roll and use it
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:26 +00:00
Samuel Pitoiset
f3b385859a ac,radv: add more cmdbuf emit helpers
Some can't be shared with RadeonSI because it uses templates in some
places.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:25 +00:00
Samuel Pitoiset
b444dc145a radv: remove redundant assertions in radeon_emit_{array}()
The common helpers already have assertions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:25 +00:00
Samuel Pitoiset
262fc80e45 ac,radv,radeonsi: add functions to initialize tracked regs
Also initialize the new slots for RADV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:25 +00:00
Samuel Pitoiset
eb2f4a13c4 radeonsi: remove dead code in si_set_tracked_regs_to_clear_state()
GFX12 doesn't have clear state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:24 +00:00
Samuel Pitoiset
44314e1ea6 ac,radv,radeonsi: add ac_tracked_regs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:24 +00:00
Samuel Pitoiset
c97bd17d4d radv: switch to AC_TRACKED_xxx
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:23 +00:00
Samuel Pitoiset
fad24d6fcc ac/cmdbuf: add new slots to ac_tracked_reg
For RADV registers that aren't tracked in RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:23 +00:00
Samuel Pitoiset
18bdb76408 ac,radeonsi: move si_tracked_reg to common code
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38740>
2025-12-17 15:09:22 +00:00
Icenowy Zheng
6bda88bfdb pvr: copy WSI can_present_on_device function from PanVK
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Both PVR and PanVK are drivers for generic embedded GPU IP cores, so
just take the can_present_on_device implementation from PanVK, which
allows any platform devices for presentation.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38985>
2025-12-17 14:53:39 +00:00
Martin Roukala (né Peres)
8b8e472c65 zink/ci: update the a750 expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38977>
2025-12-17 14:10:32 +00:00
Martin Roukala (né Peres)
5f54ae9048 turnip/ci: update the vkd3d expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38977>
2025-12-17 14:10:32 +00:00
Martin Roukala (né Peres)
f155711a33 freedreno/ci: update the a750 expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38977>
2025-12-17 14:10:32 +00:00
Martin Roukala (né Peres)
6993b0172b freedreno/ci/a750: switch to the linux-firmware-provided gpu fw
Now that qcom has released the gpu firmware for the a750, let's stop
using my fw package in favor of the publicly-available ones.

v2:

 * Be more specific in the list of files we want to keep (lumag)
 * Uprev the linux firmware version
 * Use gfx-ci/firmware rather than the upstream gitlab repo

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38977>
2025-12-17 14:10:32 +00:00
Erik Faye-Lund
74b7b68628 mesa/st: always override internal-format for 10-bit formats
We also need to do this in the GLES-only code-path, otherwise we'll end
up setting PIPE_BIND_RENDER_TARGET for these, which means we'll
incorrectly require these to be color-renderable.

Fixes: 60e115dedf ("mesa/st: do not drop binding prematurely")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38945>
2025-12-17 13:42:21 +00:00
Caterina Shablia
0da350f879 panvk: remove AFBC header zeroing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is not actually necessary and moreover was corrupting
mipmapped arrayed 2D images in cases when the transition barrier
wasn't transitioning all mips, but more than one layer.

Keep the layout transition infrastructure in place as we'll need
it for transaction elimination CRC zeroing on v10-.

Fixes: c95f8993 ("panvk: add a meta command for transitioning image layout")

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38972>
2025-12-17 12:33:58 +00:00
Caterina Shablia
d8ceb38ef1 panvk: do not access the image in image view's destructor
Vulkan allows destroying an image without destroying the views of
this image first. These views can not be used in any way and the
only thing that the user can do with such a view is destroy it.
This also means that the driver can not refer to the image inside
the image view's destructor.

Fixes cb3f6481 ("panvk: Create MS shadow images and views")

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38972>
2025-12-17 12:33:58 +00:00
Samuel Pitoiset
bf2aa05b60 zink/ci: add two tests to the skip lists
They either fails or hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38714>
2025-12-17 11:11:18 +00:00
Samuel Pitoiset
5d76202b6d radv: create descriptors for color/depth-stencil surfaces earlier
For less CPU overhead when rendering begins and also because it's
easy to pre-compute those descriptors.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38714>
2025-12-17 11:11:18 +00:00
Samuel Pitoiset
c8729cdd3c radv/meta: stop passing a stencil attachment for depth decompress
It should only be the depth aspect.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38714>
2025-12-17 11:11:18 +00:00
Samuel Pitoiset
43d7d97b13 radv/meta: inject image view usage info
This will be used to initialize color/depth-stencil descriptors earlier
when the image view is created.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38714>
2025-12-17 11:11:18 +00:00
Samuel Pitoiset
ce69cabb60 radv: constify radv_{cb,ds}_buffer_info parameters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38714>
2025-12-17 11:11:18 +00:00
Lucas Fryzek
48799005d7 Revert "drisw: Copy entire buffer ignoring damage regions"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit 755e795e4c.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38817>
2025-12-17 10:06:32 +00:00
Lucas Fryzek
17ab0f2ece drisw: Modify drisw_swap_buffers_with_damage to swap entire buffer
When swapping buffer with damage regions, to be strictly correct we
need to swap the entire back buffer to the front buffer. This needs to
be done in case the compositor does not support damage regions. This
means we need to ignore the input damage region and tell drisw to swap
the entire buffer.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38817>
2025-12-17 10:06:32 +00:00
Georg Lehmann
37c3a2fb89 zink/ci: update radv trace checksums
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38730>
2025-12-17 08:41:32 +00:00
Georg Lehmann
0478021fdc aco/optimizer: reassociate rcp(mul(a, const)) into rcp_omod(a)
Foz-DB Navi48:
Totals from 2484 (2.54% of 97637) affected shaders:
Instrs: 10368279 -> 10361892 (-0.06%); split: -0.06%, +0.00%
CodeSize: 55161104 -> 55150752 (-0.02%); split: -0.02%, +0.00%
SpillSGPRs: 14665 -> 14666 (+0.01%)
Latency: 87694014 -> 87689324 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 16595764 -> 16594448 (-0.01%); split: -0.01%, +0.00%
VClause: 209922 -> 209918 (-0.00%); split: -0.01%, +0.00%
SClause: 205195 -> 205251 (+0.03%); split: -0.01%, +0.04%
Copies: 843771 -> 843765 (-0.00%); split: -0.01%, +0.01%
Branches: 275985 -> 275962 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 170608 -> 170494 (-0.07%)
VALU: 5840893 -> 5838038 (-0.05%); split: -0.05%, +0.00%
SALU: 1481388 -> 1479037 (-0.16%); split: -0.16%, +0.00%
VOPD: 7496 -> 7485 (-0.15%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38730>
2025-12-17 08:41:32 +00:00
Georg Lehmann
a8f5ced670 aco/optimizer: reassociate mul(mul(a, const), b) into mul_omod(a, b)
Foz-DB Navi48:
Totals from 14608 (14.96% of 97637) affected shaders:
MaxWaves: 364201 -> 364421 (+0.06%)
Instrs: 28051720 -> 28022503 (-0.10%); split: -0.13%, +0.03%
CodeSize: 148938740 -> 148943480 (+0.00%); split: -0.04%, +0.04%
VGPRs: 994520 -> 994004 (-0.05%); split: -0.05%, +0.00%
SpillSGPRs: 45182 -> 45179 (-0.01%)
Latency: 187734461 -> 187725301 (-0.00%); split: -0.07%, +0.06%
InvThroughput: 33967002 -> 33949881 (-0.05%); split: -0.11%, +0.06%
VClause: 495237 -> 495207 (-0.01%); split: -0.03%, +0.02%
Copies: 2048324 -> 2047937 (-0.02%); split: -0.12%, +0.10%
Branches: 598445 -> 598431 (-0.00%); split: -0.01%, +0.01%
PreSGPRs: 877715 -> 877684 (-0.00%)
PreVGPRs: 778146 -> 776383 (-0.23%); split: -0.23%, +0.00%
VALU: 16413380 -> 16391508 (-0.13%); split: -0.15%, +0.01%
SALU: 3685279 -> 3677655 (-0.21%); split: -0.23%, +0.02%
VOPD: 26219 -> 25926 (-1.12%); split: +0.43%, -1.55%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38730>
2025-12-17 08:41:31 +00:00
Daniel Schürmann
125ac1626d radv: remove precomputed registers from radv_shader_binary
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It is enough to compute them after upload.
This saves some disk space and eliminates an unlikely
bug where the shader cache is shared between two GPUs
with the same chip but a different number of enabled CUs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38970>
2025-12-17 08:16:06 +00:00
Sagar Ghuge
61287b00f3 anv: Stop using RCS companion for MSAA copy/clear on Xe3+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
On Xe3+, we have typed MSAA load/store message support. We can use them
during MSAA copies. We don't have to fallback on RCS companion queue
anymore.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33905>
2025-12-17 05:34:02 +00:00
Sagar Ghuge
de0c547448 blorp: Handle 2D MSAA array image copies on compute shader
We are passing number of layers as inline parameter register, so figure
out z_pos and write to 2D MSAA array images in compute
shader. We already get component X, Y and sample index, all we needed
was the number of layers.

Ken:
- Use load/store var instead of derefs

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33905>
2025-12-17 05:34:02 +00:00
Sagar Ghuge
080d28a03e blorp: Set persample_msaa_dispatch for render shader
Only 3D shader gets dispatched per sample not the compute shader.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33905>
2025-12-17 05:34:02 +00:00
Lionel Landwerlin
d99a3d9b58 anv: remove CS-L3 coherency on Xe2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I'll try to write some crucible tests for this.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: be5f5f659f ("anv: consider CS coherent with L3 on Xe2+")
Fixes: 503355c7f8 ("anv: update pipeline barriers for Xe2+")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38966>
2025-12-16 21:35:27 +00:00
Steev Klimaszewski
10f259e673 tu: Stop printing descriptor pool allocation failures
The VK_ERROR_FRAGMENTED_POOL and VK_ERROR_OUT_OF_POOL_MEMORY errors are
not as exceptional cases as most.  These are expected to be hit by
applications in the normal course of doing their thing.  Probably best
not to spam stderr and the debug logs with them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38940>
2025-12-16 21:11:41 +00:00
Rob Clark
a520752328 freedreno/a6xx: gen8 lrz support
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
2025-12-16 19:38:38 +00:00
Rob Clark
0e82a8d759 freedreno/a6xx: Fix layered lrz
Don't hard-code to a single layer, and fix lrz (slow) clear path to
account for the # of layers.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5582
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
2025-12-16 19:38:37 +00:00
Rob Clark
14a23e8b3e freedreno/lrz: Add gen8 lrz layout support
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
2025-12-16 19:38:37 +00:00
Rob Clark
81c465372a freedreno/a6xx: Fix GRAS_LRZ_BUFFER_SLICE_PITCH
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
2025-12-16 19:38:37 +00:00
Rob Clark
cb201e5755 freedreno/a6xx: Fix GRAS_LRZ_BUFFER_PITCH
The pitch is in bytes, rather than pixels, whereas internally lrz_layout
uses a pitch in pixels.  Adjust the xml and state emit accordingly.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
2025-12-16 19:38:37 +00:00
Rob Clark
17b567485a freedreno/devices: Add num_slices
Add num_slices param to the device info.  This will be needed for
calculating LRZ layout.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
2025-12-16 19:38:37 +00:00
Aitor Camacho
57c93d31f2 kk: Expose occlusionQueryPrecise
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:16 +00:00
Aitor Camacho
317a249205 kk: Attachmentless render passes start postponed to pipeline bind
Sample count is only known at pipeline bind not when the render pass is
started since there is no attachments to infer sample count.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:16 +00:00
Aitor Camacho
279679ce0c kk: Remove render pass logic in event set/reset entrypoints
vkCmdSetEvent2 and vkCmdResetEvent2 can only be called from outside a
render pass so there is no need to handle anything about them.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:16 +00:00
Aitor Camacho
e11240228b kk: Remove signal and end from upload writes not to end compute encoders
Not ending the compute encoder allows us to concatenate next commands into
the same encoder if a compute encoder is requested.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:16 +00:00
Aitor Camacho
ea7f5f7f1c kk: Propagate availability before we reset it in vkCmdResetQueryPool
Required to avoid availability write races. We could have an availability
update pending so adding the reset availability write to the same pool of
writes led to write races. Avoid this by flushing writes before reseting
queries.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:16 +00:00
Aitor Camacho
53cea0ab43 kk: Update query availability only if it has availability
Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:15 +00:00
Aitor Camacho
5b1a89e21a kk: Change queue writes timing for easier compute merge for Metal4 upgrade
Writes will now happen before a command encoder is started aiming to merge
them with the existing compute encoder before we end it. Alternatively,
they also happen when a compute encoder is started. This will simplify
the migration to Metal4 later down the road.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:14 +00:00
Aitor Camacho
86b5d376f5 kk: Simplify compute and blit encoder start
Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:14 +00:00
Aitor Camacho
237f8cbe6b kk: Split internally encoder fence signal and end
Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:13 +00:00
Aitor Camacho
2e2813f013 kk: Remove unneeded entrypoints in kk_encoder.h
Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38957>
2025-12-16 19:05:12 +00:00
Aitor Camacho
7b435be0d6 kk: Mark graphics descriptors' root dirty when dirtying graphics state
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38938>
2025-12-16 18:46:35 +00:00
Aitor Camacho
9ef979b48b kk: Account for dynamic VI when flushing draw state
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38938>
2025-12-16 18:46:35 +00:00
Yiwei Zhang
6865ff18ba kk: support VK_(KHR|EXT)_calibrated_timestamps
Use common implementation.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38965>
2025-12-16 18:30:21 +00:00
Yiwei Zhang
3a73a7ba29 kk: add mtl_device_get_gpu_timestamp bridge
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38965>
2025-12-16 18:30:21 +00:00
Alyssa Rosenzweig
819213dc29 hk: fix flrp lowering
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
Piles of CTS blowing up, e.g. dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.r5g6b5_unorm_pack16.r32g32b32a32_sfloat.optimal_optimal_linear

Fixes: 4bbc29373a ("nir/lower_flrp: Check and set shader_info::flrp_lowered")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:10 +00:00
Alyssa Rosenzweig
09d493fc54 asahi: clang-format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:10 +00:00
Alyssa Rosenzweig
079e9ae606 treewide: use BITSET_*_COUNT
Mix of Coccinelle patch, manual fix ups, sed, etc. Probably best to review the diff
as-if hand written:

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:10 +00:00
Alyssa Rosenzweig
593517a53a util: add BITSET_*_COUNT macros
We currently have BITSET_*_RANGE macros which take a closed interval/range: a
start bit and an end bit. Occassionally that is what you want, but most of the
time callers actually want a start and a length. For example, register
allocators will often do operations at (variable start register, variable start
register + variable size - 1). It's more convenient to just take a start and a
size, while also making the size=0 case well-defined as a no-op set/clear and
false for test.

This patch adds BITSET_*_COUNT macros aliasing to the existing range macros, and
the rest of the series converts many call sites across the tree to use the new
macros.

Of the few call sites not converted, a whole bunch look like off-by-one bugs
which I did not want to "fix" here and risk breaking something else. Probably
worth checking your driver if you have RANGE calls leftover after this series.

Also, aco and dozen both open-coded RANGE helpers that should probably be
switched to the common code but that's neither here nor there.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:10 +00:00
Alyssa Rosenzweig
7d5afb0ee9 util: fix (amusing) find-n-replace fail
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:09 +00:00
Alyssa Rosenzweig
9d704930a1 util/bitset: allow BITSET_*_RANGE(x, 0, -1)
as a no-op. This reduces special cases in callers.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:09 +00:00
Caio Oliveira
9c16bbd023 brw: Perform mark_last_urb_write_with_eot optimization after CFG
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Avoid using exec_node::remove() and the initial "main list of
instructions", and instead use the existing helpers like other
passes.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37146>
2025-12-16 17:02:58 +00:00
Caio Oliveira
a4e84c9244 nir/gcm: Consider dead code elimination done by GCM as progress
This will also fix NIR_DEBUG=extended_validation complaining about
invalid loop analysis.  GCM will invalidate loop analysis if progress
was made, and depending on the removed instruction it will affect the
instr_cost.

Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38932>
2025-12-16 16:19:21 +00:00
Pavel Ondračka
c7a345aea6 r300/ci: remove RV530 and RV380 non-asan deqp jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No need to duplicate the work with asan jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38971>
2025-12-16 14:40:43 +00:00
Erik Faye-Lund
c1bf22b56f panfrost: do not over-estimate format tib-size
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
While the MAX2 thing here is correct for some formats, it's not correct
for all; for instance R8_SNORM doesn't need 32-bits here.

This should enable some higersample-counts on some 8 and 16-bit formats
on some Mali GPUs.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38968>
2025-12-16 13:05:57 +00:00
Erik Faye-Lund
5330d09931 panfrost: factor out meat of pan_bytes_per_pixel_tib to helper
We're going to have to do this from non arch-specific code, so let's
factor the meat out into a helper so we don't need to repeat the logic.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38968>
2025-12-16 13:05:57 +00:00
Erik Faye-Lund
762fe6e9dc panfrost: do not over-estimate memory needed for dummy-rt
This matches better what we do in pan_emit_fbd, where we don't increase
the cbuf_offset variable for unused render-targets. This way we simply
make sure we *at least* can fit a dummy-RT (as per the HW spec), but
since we don't write to it we also don't need to give it dedicated
memory beyond that.

This also seemingly fixes a subtle bug where we don't deal with PLS if
there's no active render-targets.

Fixes: 9ec6197a0b ("panfrost: allocate tile-buffer for dummy render-targets")
Fixes: c15a43cce0 ("pan/lib: prepare for pixel local storage support")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38968>
2025-12-16 13:05:57 +00:00
Boris Brezillon
aa3c8e6fb0 panvk/csf: Fix BY_REGION dependencies
When only the tile buffers are touched, it's okay to take care of the
dependency at the draw level, with DCD_FLAGS_2, but as soon as one side
of the dep has side effects that could impact the other side, we need to
split the render pass and insert a real barrier, with a proper flush on
read-only L1 caches.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Aksel Hjerpbakk <aksel.hjerpbakk@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38950>
2025-12-16 13:24:20 +01:00
Boris Brezillon
a00f6ee033 zink/ci: Add tests to the anv-tgl fails list to reflect CI state
There seems to be a weston crash leading to new gfx@ failures.
Reflect that in the zink-anv-tgl fails list so we can keep merging
stuff that touch common files.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 12:45:44 +01:00
Boris Brezillon
86581cca70 pan/ci: Replace the g610-vk-full job by a g610-vk-asan one
We've notived a few weird crashes that look like memory corruption.
Let's add an -asan job to see if we can catch any
double-free/UAF/memleak issues.

Since the new -asan job is also a full run, and we're short on rock5s,
discard the g610-vk-full job. The reason the new job takes roughly
the same time even though it's less parallel and has the ASan overhead
is because of the tests_per_group increase.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:06:44 +01:00
Boris Brezillon
fe3a0ab105 ci: Add panfrost drivers to debian-arm64-asan
We intend to add panfrost-xxx-asan jobs soon, so let's add our
gallium/vulkan drivers to the lists.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:06:42 +01:00
Boris Brezillon
8f0a8916c4 pan/ci: Extend g610-vk pre-merge test coverage
Things are stable enough now to increase the number tests per group,
which allows us to lower the DEQP_FRACTION to 3. This also allows
us to lower the 'parallel' property to 4 leaving one extra board for
other jobs to run.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:06:39 +01:00
Boris Brezillon
1f704f0012 pan/ci: Update the g610 flakes to avoid UnexpectedImprovement(Pass)
dEQP-VK.image.general_layout.memory_barrier.fragment.write_read.* are
passing sometimes, which causes UnexpectedImprovement(Pass) to show up,
but the bug still exists.

Add those to the flake list until this is fully sorted out.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:06:35 +01:00
Boris Brezillon
55481b6f10 panvk: Free the decode context in the create_device() error path
If we don't do that and something fails in the middle, we leak
the decode context.

Fixes: d155d6b7a3 ("panvk: Add a decode context at the panvk_device level")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:02:15 +01:00
Boris Brezillon
bbc8ce2704 pan/cs: Don't leak builder resources
cs_finish() is doing two things:

1. wrapping up the CS to prepare for its execution
2. freeing the temporary instrs array and maybe_ctx allocations

Mixing those two things lead to confusion and leaks, so let's split
those into cs_end() and cs_builder_fini(), and make sure panvk/panfrost
call both when appropriate.

Fixes: 50d2396b7e ("pan/cs: add helpers to emit contiguous csf code blocks")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:02:15 +01:00
Boris Brezillon
d9fa4d5cbb panvk: Don't leak shader binaries when loaded from the cache
own_bin needs to be set to true if we want the bin_ptr to be freed.

Fixes: 3d2cc01f8a ("panvk: Add create_shader_from_binary")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:02:15 +01:00
Boris Brezillon
b66861a5f0 pan/bi: Fix leak in bi_iterator_schedule()
s/util_dynarray_clear/util_dynarray_fini/ to fix the leak.

Fixes: 7dc4f28507 ("pan/bi: schedule simple iterators to avoid extra move")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:02:15 +01:00
Boris Brezillon
29d173060e panvk: Fix a memory leak in the descriptor set logic
The desc_heap field is unconditionally initialized, so we need to
call util_vma_heap_finish() on it.

Fixes: ec02137c86 ("panvk: Support DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
2025-12-16 11:02:15 +01:00
Christoph Pillmayer
8b6e4c68d6 panvk: Expose EXT_multisampled_render_to_single_sampled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38825>
2025-12-16 08:22:23 +00:00
Christoph Pillmayer
b6cadef428 panvk: Implement VkSubpassResolvePerformanceQueryEXT
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38825>
2025-12-16 08:22:23 +00:00
Christoph Pillmayer
5d2e297556 panvk: Setup attachments for ms to ss rendering
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38825>
2025-12-16 08:22:23 +00:00
Christoph Pillmayer
cb3f648175 panvk: Create MS shadow images and views
VK_EXT_multisampled_render_to_single_sampled needs those to be able
to render to the MS attachment when the app only provides a single-
sampled one.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38825>
2025-12-16 08:22:23 +00:00
Christoph Pillmayer
092d78ebf4 pan/preload: Prepare for reading from single sampled view
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38825>
2025-12-16 08:22:23 +00:00
Christoph Pillmayer
d7ae5d5824 pan/decode: Fix indent in pandecode_dcd
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38825>
2025-12-16 08:22:23 +00:00
Samuel Pitoiset
6193483c4f radv: rename RADEON_FLAG_VA_UNCACHED to RADEON_FLAG_GL2_BYPASS
Easier to understand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38907>
2025-12-16 07:17:08 +00:00
Samuel Pitoiset
0beb83b0eb radv: add RADV_DEBUG=vm option
Useful for debugging page faults because this adds a gap between every
VA allocation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38907>
2025-12-16 07:17:08 +00:00
Caio Oliveira
e53576a559 brw: Move MATH related validation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Moved existing checks to EU validation and added a few more
based on instruction description in the various PRMs / BSpec.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:46 +00:00
Caio Oliveira
55863c1267 brw: Add EU validation for ROR/ROL
And remove asserts() in generator.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:46 +00:00
Caio Oliveira
47d8ed1177 brw: Move PLN/LINE normalization
Add validation for Source 0 and move the normalization into
the code producing the instruction.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:44 +00:00
Caio Oliveira
3f436bdc6e brw: Make LINE normalization into validation
Add validation for Source 0.  Should not cause problems
since this instruction is not used by the compiler anymore.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:43 +00:00
Caio Oliveira
75cf20f0eb brw: Remove LINE from brw_builder and brw_generator
Gfx9 only instruction that is not used anymore.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:42 +00:00
Caio Oliveira
cd3e3dd0d3 brw: Drop asserts for brw_SRND
These are already covered by the EU validation.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:41 +00:00
Caio Oliveira
68190499df brw: Move ADD related validation
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:40 +00:00
Caio Oliveira
6ae92d3372 brw: Move AVG related validation
Couldn't find in the docs a reference for the types needing to match,
and simulator + MTL seem fine with mixing UD and UW, so not adding
a replacement for the removed assertions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:38 +00:00
Caio Oliveira
6d8d733d4d brw: Move MUL related validation
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:34 +00:00
Kenneth Graunke
26523bedec brw: Call nir_opt_offsets for mesh shaders
Most stages call this as part of brw_nir_postprocess_opts() but mesh
lowers to URB intrinsics after that since it needs bit-sizes lowered.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:46 +00:00
Kenneth Graunke
88d46605bd nir: Support Intel URB intrinsics in nir_opt_offsets
We don't bother with maximums or wrapping because it shouldn't come up
for IO intrinsics anyway.

fossil-db results on Battlemage:

   Instrs: 231363032 -> 231359554 (-0.00%)
   Cycle count: 34057005552.0 -> 34057236190.0 (+0.00%); split: -0.00%, +0.00%
   Max live registers: 71873886 -> 71870438 (-0.00%)
   Non SSA regs after NIR: 67159408 -> 67159523 (+0.00%)

   Totals from 1779 (0.23% of 788851) affected shaders:
   Instrs: 774359 -> 770881 (-0.45%)
   Cycle count: 10551280.0 -> 10781918.0 (+2.19%); split: -0.32%, +2.51%
   Max live registers: 158193 -> 154745 (-2.18%)
   Non SSA regs after NIR: 180104 -> 180219 (+0.06%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:46 +00:00
Kenneth Graunke
d831f38d11 brw: Delete all the old backend mesh/task URB handling code
This has all been replaced by NIR lowering to URB intrinsics.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:46 +00:00
Kenneth Graunke
d0dc45955d brw: Lower task shader payload access in NIR
We keep this separate from the other lowering infrastructure because
there's no semantic IO involved here, just byte offsets.  Also, it needs
to run after nir_lower_mem_access_bit_sizes, which means it needs to be
run from brw_postprocess_opts.  But we can't do the mesh URB lowering
there because that doesn't have the MUE map.

It's not that much code as a separate pass, though.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:46 +00:00
Kenneth Graunke
bd0c173595 brw: Lower mesh shader outputs in NIR
With all the infrastructure in place, this is largely a matter of
calling the lowering passes with the appropriate data from the MUE map.

MUE initialization is now done with semantic IO instead of raw offsets.

This drops another case of non-standard NIR IO usage (and no_validate).

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:44 +00:00
Kenneth Graunke
6e5cc63a3a brw: Extend URB lowering infrastructure to handle mesh shader outputs
Mesh shaders introduce per-primitive outputs, and also our MUE layout
has per-vertex data starting at an offset.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:43 +00:00
Lionel Landwerlin
60db7f20c9 brw: move MUE initialization out of the SIMD loop
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:42 +00:00
Lionel Landwerlin
d3053fb3d2 brw: Implement URB handle intrinsics for task/mesh stages
(Split by Ken from a larger patch originally written by Lionel.)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:40 +00:00
Kenneth Graunke
d18423b116 brw: Make lower_{inputs,outputs}_to_urb_intrinsics non-static
I want to reuse these in brw_compile_mesh.cpp.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:40 +00:00
Kenneth Graunke
788c49ecc6 brw: Extend load_urb/store_urb to handle 32-bit non-vec4-aligned access
(Based on the original implementation by Lionel Landwerlin, but adapted
to my respun URB lowering framework.)

The mesh shader URB payload requires reading and writing fields at
arbitrary DWord offsets.  For example, the Primitive Indices array
starts at DWord 1, and it can be a vec1[], vec2[], or vec3[] array,
leading to very unaligned and sometimes double-parked elements.

Still, most fields are still conveniently vec4-aligned.

To handle this, we add a new cb_data::vec4_access flag.  If set, access
remains in vec4 units, with vec4 alignment.  We use this for non-mesh
stages.  When unset, offset is in 32-bit units, allowing unaligned
DWord access.

This is trivial to support on Xe2, where the LSC URB messages support
arbitrary byte-aligned addressing.  On older platforms, we have to
convert this to vec4 aligned offsets plus a component offset (either
returning a subset of the channels loaded, or using component masking
to store a subset of a vec4/vec8).

Thankfully, since the OWord URB messages support accessing a vec8 at
a time, this means we can do any vec4 access in one message, even if
it's double-parked.  We use mod-analysis to see if we can statically
determine the sub-vec4 component offset required (we often can).  If
not, we use the ability to have dynamic writemasks to sort it out.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:38 +00:00
Kenneth Graunke
97857d3224 nir: Fix mod analysis of ishl to shift the recursive result
When considering ((x << y) % divisor), we recursed to calculate
mod = (x % (divisor << y)) but incorrectly returned mod directly,
rather than the correct value, (mod << y).

(Note that we require divisor to be a power-of-two.)

As an example of this going wrong, (x << 1) % 4 was returning (x % 2)
which is 0 or 1, but x << 1 is 2x, which is always an even number so
the result mod 4 can only be 0 or 2.

Unit test suggested by Caio Oliveira during review.

Fixes: 2255375c4d ("nir: add nir_mod_analysis & its tests")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:37 +00:00
Kenneth Graunke
2b700f6bfd brw: Delete attr_desc struct
Unused since commit 18bbcf9a63.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:37 +00:00
Kenneth Graunke
8177695403 brw: Add missed access to store_urb_lsc_intel intrinsics
I forgot to copy this over in the LSC case.  This meant we were missing
reorderability which meant that we were missing out on CSE.

fossil-db results on Battlemage:

   Instrs: 231471427 -> 231363032 (-0.05%)
   Send messages: 12077759 -> 12019628 (-0.48%)
   Cycle count: 34058451430.0 -> 34057005552.0 (-0.00%); split: -0.01%, +0.00%
   Spill count: 520387 -> 520135 (-0.05%)
   Fill count: 470812 -> 470722 (-0.02%)
   Max live registers: 72111834 -> 71873886 (-0.33%)

   Totals from 2898 (0.37% of 788851) affected shaders:
   Instrs: 1223836 -> 1115441 (-8.86%)
   Send messages: 148633 -> 90502 (-39.11%)
   Cycle count: 17732554.0 -> 16286676.0 (-8.15%); split: -10.65%, +2.49%
   Spill count: 252 -> 0 (-inf%)
   Fill count: 90 -> 0 (-inf%)
   Max live registers: 491684 -> 253736 (-48.39%)
   Non SSA regs after NIR: 255397 -> 255402 (+0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:36 +00:00
Kenneth Graunke
87c63b4725 brw: Rename brw_nir_lower_vue_inputs to brw_nir_lower_gs_inputs
The other stages don't use this anymore.  Geometry should stop too,
but that's for a future MR.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:34 +00:00
Kenneth Graunke
d525d2456a brw: Calculate tessellation URB offsets when lowering to URB intrinsics
This now lowers IO intrinsics to URB intrinsics in a single step,
rather than modifying IO intrinsics to have non-standard meanings
temporarily.  We are able to drop one "no_validate" flag.

For example, remap_patch_urb_offsets had added (vertex * stride) to
(offset) for per-vertex IO intrinsics, but left them as per-vertex
intrinsics.  Now we just have an urb_offset() function to calculate
that when doing the lowering.

This also provides a central location for calculating URB offsets,
which we should be able to extend for other uses (per-view lowering,
mesh per-primitive lowering) in future patches.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:34 +00:00
Kenneth Graunke
b02a01c636 intel: Replace signed char with int8_t
Let's use modern stdint types.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:32 +00:00
Dylan Baker
ca96f8517c iris: remove uses of pipe_surface as a pointer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36690>
2025-12-15 14:38:40 -08:00
Mauro Rossi
e8134e6eaf radv/rt: Fix gnu-empty-initializer error
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes the following building error happening with clang:

FAILED: src/amd/vulkan/libvulkan_radeon.so.p/nir_radv_nir_rt_traversal_shader.c.o
...
../src/amd/vulkan/nir/radv_nir_rt_traversal_shader.c:1159:49: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct radv_nir_rt_traversal_params params = {};
                                                ^
1 error generated.

Fixes: f692ac76 ("radv/rt: Use traversal vars for object origin/direction in ahit/isec")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38954>
2025-12-15 22:27:29 +01:00
Timur Kristóf
0324700c03 radv: Use zero-filled BO for GFX6 and GFX10 null index buffer bug
GFX10 hangs when drawing from a 0-sized index buffer.
GFX6 has a HW bug when the index buffer	address is 0.

Looking at VK CTS runs, GFX6 still triggers VM faults despite the
current mitigation, and it also tries to access memory when the
index buffer is zero sized. So it looks like GFX6 and GFX10
really have the same bug.

Let's share the mitigation between the two.
Use a zero-filled BO instead of the upload buffer.
This fixes VM faults on GFX6, and should speed up GFX10 a bit.

Note that the zero-filled BO is also going to be used for
other bug mitigations on GFX6-7.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38958>
2025-12-15 21:03:19 +00:00
Timur Kristóf
f001515c87 aco: Use only VGPR offset on buffer atomics on GFX6-7
SGPR offset is not included in the bounds check
according to the ISA documentation of GFX6-7 and
indeed it can trigger VM faults on OOB access.

Note that ACO already doesn't use the SGPR offset
on GFX6-7 for buffer loads and stores. This commit
just does the same for buffer atomics.

This commit mitigates a ton of VM faults that are exposed by:
24e75fea4b

Fossil DB stats on Hawaii (GFX7):

Totals from 148 (0.24% of 61818) affected shaders:
Instrs: 324004 -> 327352 (+1.03%)
CodeSize: 1556468 -> 1514100 (-2.72%); split: -2.74%, +0.02%
Latency: 1271480 -> 1276894 (+0.43%)
InvThroughput: 396850 -> 397740 (+0.22%)
VClause: 6861 -> 6858 (-0.04%)
Copies: 34083 -> 37430 (+9.82%)
PreVGPRs: 5705 -> 5706 (+0.02%)
VALU: 147529 -> 150898 (+2.28%)
SALU: 98194 -> 98172 (-0.02%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38958>
2025-12-15 21:03:19 +00:00
Ian Forbes
42e797b139 svga: Report "VRAM" more accurately
While the concept of "VRAM" is somewhat nebulous on SVGA devices this is
the value above which some performance degradation is likely to occur.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38818>
2025-12-15 20:45:18 +00:00
Lionel Landwerlin
94d2ec975d anv: disable crast on SKL
SKL is failing the following tests (maybe more) :

dEQP-VK.rasterization.conservative.overestimate.samples_1.triangles.degenerate.0_00
dEQP-VK.rasterization.conservative.overestimate.samples_16.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_2.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_2.triangles.degenerate.min
dEQP-VK.rasterization.conservative.overestimate.samples_4.triangles.degenerate.0_00
dEQP-VK.rasterization.conservative.overestimate.samples_8.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_8.triangles.degenerate.min

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38951>
2025-12-15 20:15:03 +00:00
Benjamin Cheng
59f821218c radv/video: Move probability table filling to bind
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We should not manipulate the session buffers at command recording time.
It shouldn't cause any problems as these initialized probability tables
are not modified by firmware, but moving these to bind time should be
safer and also faster if an application frequently RESETs.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38926>
2025-12-15 18:49:28 +00:00
Aaron Ruby
3bddd2eaed Revert "device-select-layer: Implement VkNegotiateLayerInterface::pfnGetDeviceProcAddr"
This reverts commit b17896f693

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38953>
2025-12-15 16:46:13 +00:00
José Roberto de Souza
518705a4fe intel/brw: Split to a function the code that calculate sampler channels that should be written
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This block of code will be re-used in a future patch, also it reduces a bit the
size and complexity of lower_sampler_logical_send().
No changes in behavior intended here.

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/38792>
2025-12-15 06:57:15 -08:00
Nanley Chery
188193cbf2 iris: Add comments from Bspec fast-clear preamble page
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Copy and paste from anv.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38928>
2025-12-15 12:42:57 +00:00
Nanley Chery
18e67d853f iris: Fix pipe control around fast-clears
Use the right pipe control helper function so that texture invalidates
occur after the end-of-pipe sync rather than during.

Fixes: 23658920d1 ("anv,iris: Skip tex invalidate for clear conversion")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12550
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38928>
2025-12-15 12:42:57 +00:00
Georg Lehmann
a2b70ce4ec aco/isel: remove uniform reduce/scan optimization
This is now done in NIR, with the exception of exclusive min/max/and/or scans.
But those are not really useful, and if we ever come across them we can
optimize them in NIR using write_invocation_amd.

No Foz-DB changes on Navi21.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38902>
2025-12-15 12:22:32 +00:00
Georg Lehmann
81245e262f radeonsi: use nir_opt_uniform_subgroup
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38902>
2025-12-15 12:22:32 +00:00
Georg Lehmann
ec81337d8d radv: use nir_opt_uniform_subgroup
Foz-DB Navi21:
Totals from 665 (0.68% of 97581) affected shaders:
MaxWaves: 12856 -> 12822 (-0.26%)
Instrs: 2073376 -> 2068645 (-0.23%); split: -0.23%, +0.00%
CodeSize: 11116904 -> 11098376 (-0.17%); split: -0.18%, +0.01%
VGPRs: 39584 -> 39568 (-0.04%); split: -0.20%, +0.16%
SpillSGPRs: 160 -> 155 (-3.12%)
SpillVGPRs: 2995 -> 2968 (-0.90%)
Latency: 15432093 -> 15503462 (+0.46%); split: -0.13%, +0.59%
InvThroughput: 3344411 -> 3351185 (+0.20%); split: -0.08%, +0.28%
VClause: 50278 -> 50225 (-0.11%); split: -0.15%, +0.04%
SClause: 57537 -> 57505 (-0.06%); split: -0.18%, +0.13%
Copies: 189642 -> 188175 (-0.77%); split: -0.86%, +0.08%
Branches: 68800 -> 68502 (-0.43%); split: -0.45%, +0.02%
PreSGPRs: 37646 -> 37068 (-1.54%)
PreVGPRs: 35891 -> 35943 (+0.14%)
VALU: 1386943 -> 1385881 (-0.08%); split: -0.09%, +0.01%
SALU: 287322 -> 284165 (-1.10%); split: -1.11%, +0.01%
VMEM: 90874 -> 90820 (-0.06%)

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38902>
2025-12-15 12:22:32 +00:00
Jose Maria Casanova Crespo
f57add1d14 v3dv: Enable TFU blits with raster destinations on 7.1 HW (RPi5)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38910>
2025-12-15 11:57:51 +00:00
Jose Maria Casanova Crespo
19580dfae1 v3d: Enable TFU blits with raster destinations on 7.1 HW (RPi5)
We take advantage or fixing a typo in TFU_IOC formats defines
when adding the TFU_IOC_RASTER FORMAT.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38910>
2025-12-15 11:57:51 +00:00
Jose Maria Casanova Crespo
40339ada9c broadcom: Drop use of nir_lower_wrmasks
v3d_nir_lower_load_store_bitsize that uses nir_lower_mem_access_bit_sizes
already ensures that any writemask on store has consecutive bits set.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38921>
2025-12-15 11:34:27 +00:00
Valentine Burley
b1de4249f7 lavapipe/ci: Add a nightly ASAN job
This is a longer, nightly variant of lavapipe-vkcts-asan that runs
1/40 of dEQP instead of 1/1000.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14042
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38870>
2025-12-15 11:19:21 +00:00
Karmjit Mahil
cfd10a729d gallium: Fix gnu-empty-initalizer error
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Addresses:
```
../src/gallium/auxiliary/hud/hud_context.c:498:42: error: use of GNU
empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct pipe_resource *releasebuf[3] = {};
                                         ^

../src/gallium/auxiliary/postprocess/pp_mlaa.c:76:42: error: use of GNU
empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct pipe_resource *releasebuf[2] = {};
                                         ^
```

Fixes: 51605bfac2 ("gallium: Make upload_cb0 return a releasebuf")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38920>
2025-12-15 09:35:25 +00:00
Mary Guillemard
86d190e158 nvk: Use rendering state attachment count when setting SET_CT_SELECT
In case vk_color_attachment_location_state is in its default state, we
would end up with an identity mapping for color_map resulting in 8 RTs
being selected instead of what is really required.

This now use the rendering state attachment count to properly emit
SET_CT_SELECT.

Found while debugging MRT on
"dEQP-VK.shader_object.rendering.color_attachment_count_1.extra_attachment_after_1.none.none.same_color_formats.after.none.r16g16_sint_d32_sfloat_s8_uint"
and while comparing with the proprietary driver.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 84de6c12b2 ("nvk: Emit SET_CT_SELECT based on the dynamic color location map")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38946>
2025-12-15 09:03:42 +00:00
Lionel Landwerlin
e241e30986 anv: add a no-resource-barrier debug flag
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:42 +00:00
Lionel Landwerlin
5f58ac7b11 anv: implement WA_18039014283
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:42 +00:00
Lionel Landwerlin
15174b185b anv: instrument resource barriers instruction in u_trace
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:42 +00:00
Lionel Landwerlin
3520abf8a3 anv: use RESOURCE_BARRIER for event waiting when possible
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:41 +00:00
Lionel Landwerlin
5f9ece0b83 anv: implement Wa_18037648410
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:41 +00:00
Rohan Garg
24e9afb0b7 anv: implement resource barrier emissions
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:40 +00:00
Lionel Landwerlin
e5fc567f49 anv: introduce an new virtual pipecontrol flag for BTI change
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:40 +00:00
Lionel Landwerlin
682f907228 intel: rename DCFlushEnable to ForceDeviceCoherency
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:39 +00:00
Rohan Garg
e55a7bc83a anv: program STATE_COMPUTE_MODE to flush the L1 cache
This is required for upcoming resource barrier work to implement HDC
flush's.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:39 +00:00
Lionel Landwerlin
47bc9da064 anv: use anv_add_pending_pipe_bits for event reset
Nicer tracking with INTEL_DEBUG=pc

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:39 +00:00
Lionel Landwerlin
8834ef8bcd anv: use flushing PIPE_CONTROL for event signaling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:38 +00:00
Lionel Landwerlin
a06b0213c8 anv: switch events to use 0/!0 values for unsignaled/signaled
RESOURCE_BARRIER cannot write a particular value, just a HW generated
ID.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:38 +00:00
Lionel Landwerlin
5b0c2339d5 anv: use the blitter/video barrier helper for event signalling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:37 +00:00
Lionel Landwerlin
5dd6f0d0ef anv: store event creation flags
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:37 +00:00
Lionel Landwerlin
72ee520b36 anv: remove unused event field
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:36 +00:00
Lionel Landwerlin
23be634934 anv: disable deferred bits on Gfx20+
Gfx20+ doesn't do PIPELINE_SELECT, the assumption is that we can now
do any PIPE_CONTROL we want regardless of the pipeline mode.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:36 +00:00
Lionel Landwerlin
be5f5f659f anv: consider CS coherent with L3 on Xe2+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:35 +00:00
Lionel Landwerlin
503355c7f8 anv: update pipeline barriers for Xe2+
We experimentally found that some fixed functions have apparently be
hooked up to the L3. So we can drop a some flushing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:34 +00:00
Lionel Landwerlin
15524de710 anv: remove pb-stalls from various locations
Now that we track the stages, it's not required to add those bits
anymore.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:34 +00:00
Lionel Landwerlin
86dceded22 anv: move cs/pb-stall detection to flushing function
Now that we have the stages accumulated, we can delay this at flushing
time.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:33 +00:00
Lionel Landwerlin
f2c571fabf anv: add tracking of involved stages in pipe flushes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:32 +00:00
Lionel Landwerlin
4e8a25cf6f anv: remove use of emit_apply_pipe_flushes() in various helpers
For a bunch of workarounds and special cases we want PIPE_CONTROL not
RESOURCE_BARRIER. We want emit_apply_pipe_flushes() to be mostly for
application barriers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:31 +00:00
Lionel Landwerlin
d37a888a9b anv: remove unused gpu_memcpy function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:31 +00:00
Mel Henning
01cf905c71 nak: Set variable_latency=0 for !needs_scoreboard
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
This simplifies usage of estimate_variable_latency a little in that we
can just use it directly in our max() expressions instead of guarding it
with an if.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38939>
2025-12-13 16:29:18 +00:00
Mel Henning
b4bac84d3b nak: Add a Dst::file() helper function
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38939>
2025-12-13 16:29:18 +00:00
Mel Henning
f5f89407f6 nak: Handle CS2R latencies in SSA form
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38939>
2025-12-13 16:29:18 +00:00
Georg Lehmann
fee87679bf radv/nir: fix front_face_fsign opt
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If front facing primitives are culled, there are only back facing fragments left.

Fixes: 0fe8250bf4 ("radv: optimize known front_face_fsign too")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38937>
2025-12-13 10:22:21 +01:00
Marek Olšák
d17d1f53bd nir/opt_cse: update potential future plans merging copy propagation with CSE
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This matches my current understanding of nir_opt_copy_prop, including that
nir_opt_copy_prop always replaces movs with vecN.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38916>
2025-12-13 06:41:59 +00:00
Marek Olšák
9ac8e643d6 nir/lower_io: explain properly how nir_lower_io_lower_64bit_to_32* options work
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38916>
2025-12-13 06:41:59 +00:00
Marek Olšák
41d127b9e8 nir/lower_io: remove unused option nir_lower_io_lower_64bit_float_to_32
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38916>
2025-12-13 06:41:59 +00:00
Marek Olšák
09b2325877 nir/print: print tex->sampler_dim
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38916>
2025-12-13 06:41:58 +00:00
Marek Olšák
4d976a5787 nir: fix the value of nir_io_use_frag_result_dual_src_blend
Due to rebasing not recognizing it as a conflict, it ended up having
the same value as nir_io_assign_color_input_bases_after_all_other_inputs.

Fixes: 9a2f1be814 - nir: add FRAG_RESULT_DUAL_SRC_BLEND and an option to use it

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38916>
2025-12-13 06:41:58 +00:00
Caio Oliveira
375e9d1094 intel/mda: Handle better processing a lot of archives
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Keep only the metadata when initially parsing the files.  Then re-load
the relevant archives again when necessary.

The old code was just keeping everything in memory, which was slow when
looking at a directory containing archives resulted from processing
a large fossil file.

Extra care is taken with `search` commands to ensure we don't keep
unnecessary contents around.  At some point we could reorganize so
find_all is not used here, but for now this should be fine.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38228>
2025-12-13 01:21:08 +00:00
Caio Oliveira
5474e9bfdc intel/mda: Use function to read content of objects
Preparation for a later patch that will make the content be loaded
on-demand.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38228>
2025-12-13 01:21:08 +00:00
Job Noorman
29f8277952 ir3/legalize: schedule (eq) more accurately
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Instructions that calculate derivatives (whether implicitly or
explicitly) don't actually need helpers enabled as long as helpers were
enabled while their coordinates were calculated. We currently don't
track this and leave helpers enabled until the derivative instructions
themselves.

Improve this by adding a backwards data-flow analysis which tracks the
last instruction that wrote the coordinates so that helpers can be
disabled after that.

Totals from 38306 (23.26% of 164705) affected shaders:
Instrs: 19635952 -> 19647753 (+0.06%); split: -0.03%, +0.09%
CodeSize: 40465212 -> 40489860 (+0.06%); split: -0.03%, +0.09%
NOPs: 3493898 -> 3505699 (+0.34%); split: -0.16%, +0.49%
(ss)-stall: 1755983 -> 1755365 (-0.04%); split: -0.04%, +0.01%
(sy)-stall: 5345890 -> 5350570 (+0.09%); split: -0.03%, +0.12%
Last helper: 8754510 -> 6313744 (-27.88%); split: -27.89%, +0.01%
Cat0: 3821218 -> 3833019 (+0.31%); split: -0.14%, +0.45%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36410>
2025-12-13 00:01:02 +00:00
Job Noorman
54cde77163 ir3: print eq and needs_helpers instruction flags
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36410>
2025-12-13 00:01:02 +00:00
Collabora's Gfx CI Team
db30011663 Uprev Piglit to 2842979ebe03b99c33c3e49af5960c69be6c6d46
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
5309e3401d...2842979ebe

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38333>
2025-12-12 21:45:24 +00:00
Sergi Blanch Torne
b40fe92b73 ci,piglit: update expectations from piglit nightly
Some expectation updates in the piglit uprev come from results we already see
in the nightly runs. Updating xfiles with those results before the uprev
commit, shows better the origin of the changes.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38333>
2025-12-12 21:45:24 +00:00
Valentine Burley
8a39515124 ci: Allow PIGLIT_TAG to be unset in deqp-runner script
Fixes `unbound variable` error with `set -u`.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38333>
2025-12-12 21:45:23 +00:00
Sergi Blanch Torne
9e62e22598 crnm: clean uncolored job status
With the default non-colored job status, all the listed non-colored job
statuses can be absorbed by the default behavior.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38919>
2025-12-12 20:35:35 +00:00
Sergi Blanch Torne
c5f5b6b78d crnm: default wo coloring when unknown GitLab job status
When GitLab adds new job statuses, we need to upgrade the coloring dictionary.
By having a default value for non-colored output, we handle future unknown
status, and avoid crashes.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38919>
2025-12-12 20:35:35 +00:00
Ian Forbes
d75f5e0add svga: Don't crash if only one of Depth or Stencil buffer is present
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This piglit test arb_clear_texture-depth was crashing because we assume
we always have stencil and depth buffer.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38836>
2025-12-12 19:41:42 +00:00
Nanley Chery
d2f336c108 intel/isl: Only assert surface addresses on gfx9+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Restrict the surface address assertions to platforms with soft-pin. We
technically could check for (gfx8+ && !CHV), but we choose to use the
simpler condition instead.

Fixes: 8e96b516ca ("intel/isl: Assert alignments of surface addresses")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11331
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38905>
2025-12-12 18:06:16 +00:00
LingMan
49446a62c0 meson: specify minimal target meson version for rust subprojects
Silences several meson warnings like:
```
../subprojects/equivalent-1.0.1/meson.build:9: WARNING: Project does not target a minimum version but uses feature introduced in '1.3.0': rust_abi arg in static_library.
```

The target of 1.7.0 was chosen since that's the minimal required meson version of the rust components in mesa anyway.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38814>
2025-12-12 17:28:49 +00:00
LingMan
f53f35cb32 meson: silence warnings in rust subprojects
Rust 1.91 as well as clippy show various benign warnings in our dependencies. Silence them since we
can't really do much about them anyway and we want to enforce clippy complience via CI in the
future.

Matches cargo behavior, which also doesn't show warnings or clippy lints outside the workspace.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38814>
2025-12-12 17:28:49 +00:00
Georg Lehmann
17e597093d radv: eliminate unused FS output channels
For formats that don't have all color channels, there is no reason to
output all of them.
Games often write to R only or RGB formats with non trivial remaining channels.

Foz-DB Navi21:
Totals from 10270 (10.55% of 97347) affected shaders:
MaxWaves: 249166 -> 250950 (+0.72%); split: +0.73%, -0.01%
Instrs: 8442016 -> 8354715 (-1.03%); split: -1.05%, +0.01%
CodeSize: 45939644 -> 45487156 (-0.98%); split: -1.01%, +0.02%
VGPRs: 472584 -> 463784 (-1.86%); split: -1.98%, +0.12%
SpillSGPRs: 1502 -> 1448 (-3.60%)
LDS: 6024192 -> 6011904 (-0.20%)
Inputs: 42463 -> 41773 (-1.62%)
Outputs: 24601 -> 23955 (-2.63%)
Latency: 78011745 -> 77653907 (-0.46%); split: -0.56%, +0.10%
InvThroughput: 19767826 -> 19274046 (-2.50%); split: -2.53%, +0.03%
VClause: 177891 -> 176681 (-0.68%); split: -0.80%, +0.12%
SClause: 236784 -> 235324 (-0.62%); split: -0.72%, +0.10%
Copies: 621048 -> 616096 (-0.80%); split: -1.03%, +0.23%
Branches: 202608 -> 201811 (-0.39%); split: -0.44%, +0.05%
PreSGPRs: 441032 -> 437698 (-0.76%); split: -0.77%, +0.01%
PreVGPRs: 378067 -> 369564 (-2.25%); split: -2.26%, +0.01%
VALU: 5906415 -> 5833179 (-1.24%); split: -1.25%, +0.01%
SALU: 973428 -> 968088 (-0.55%); split: -0.61%, +0.06%
VMEM: 298277 -> 296504 (-0.59%); split: -0.61%, +0.01%
SMEM: 402244 -> 399612 (-0.65%); split: -0.71%, +0.06%

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
2025-12-12 17:00:51 +00:00
Georg Lehmann
5d2f3065fd radv: gather color0_written with scalar io correctly
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
2025-12-12 17:00:51 +00:00
Georg Lehmann
18013e3281 radv: consider dual src blend for when epilog needs alpha
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
2025-12-12 17:00:51 +00:00
Georg Lehmann
a1fbf91ff2 radv/nir: fix radv_nir_remap_color_attachment progress
And switch to SPDX header.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
2025-12-12 17:00:51 +00:00
Georg Lehmann
da197c3d55 ac/nir/lower_ps_late: remove gfx6 mrtz writemask workaround
This is now done in the backends.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
2025-12-12 17:00:51 +00:00
Georg Lehmann
6a7ff2204b ac/llvm/gfx6: move mrtz writemask workaround to ac_build_export
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
2025-12-12 17:00:51 +00:00
Georg Lehmann
072815e5cb aco/gfx6: move mrtz writemask workaround to assembler and handle all mrt
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
2025-12-12 17:00:51 +00:00
LingMan
2044cf885b rust: build ucd-trie dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: e28ff81869 ("meson: Add pest rust dependencies")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38726>
2025-12-12 16:25:29 +00:00
LingMan
f95a5d5df8 rust: build paste dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: dde95fc039 ("meson,ci: Add the paste crate")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38726>
2025-12-12 16:25:28 +00:00
LingMan
d757018e77 rust: build equivalent dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: 9e3e12e6a9 ("meson: Add indexmap rust dependencies")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38726>
2025-12-12 16:25:28 +00:00
Rhys Perry
b5cf3b1628 ac/nir: fix check for increasing size of non-descriptor loads
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In the previous version, "end" could have been zero, which would have
allowed an increase of "mul" bytes, when it should not not be increased at all.

For example:
- align_offset=4
- mul=4
- unaligned_new_size=96
- aligned_new_size=128
This would have loaded a dword which was not loaded previously.

fossil-db (gfx1201):
Totals from 115 (0.14% of 79839) affected shaders:
Instrs: 286697 -> 287097 (+0.14%); split: -0.16%, +0.30%
CodeSize: 1477728 -> 1481256 (+0.24%); split: -0.13%, +0.37%
SpillSGPRs: 1662 -> 1658 (-0.24%); split: -0.42%, +0.18%
Latency: 2288612 -> 2290248 (+0.07%); split: -0.04%, +0.11%
InvThroughput: 467307 -> 467602 (+0.06%); split: -0.03%, +0.10%
VClause: 3689 -> 3691 (+0.05%)
SClause: 5052 -> 5064 (+0.24%); split: -0.20%, +0.44%
Copies: 34837 -> 35103 (+0.76%); split: -0.80%, +1.56%
Branches: 7402 -> 7401 (-0.01%)
PreSGPRs: 9147 -> 9143 (-0.04%); split: -0.44%, +0.39%
VALU: 159333 -> 159372 (+0.02%); split: -0.01%, +0.04%
SALU: 52047 -> 52276 (+0.44%); split: -0.55%, +0.99%
SMEM: 9556 -> 9697 (+1.48%)

fossil-db (navi31):
Totals from 238 (0.30% of 79825) affected shaders:
Instrs: 484480 -> 485105 (+0.13%); split: -0.05%, +0.17%
CodeSize: 2514012 -> 2517928 (+0.16%); split: -0.06%, +0.22%
SpillSGPRs: 1064 -> 1059 (-0.47%)
Latency: 3941121 -> 3944670 (+0.09%); split: -0.04%, +0.13%
InvThroughput: 897483 -> 898090 (+0.07%); split: -0.04%, +0.11%
VClause: 7101 -> 7098 (-0.04%)
SClause: 9036 -> 9052 (+0.18%); split: -0.44%, +0.62%
Copies: 42790 -> 43096 (+0.72%); split: -0.30%, +1.01%
PreSGPRs: 14357 -> 14342 (-0.10%); split: -0.37%, +0.26%
VALU: 298325 -> 298347 (+0.01%); split: -0.01%, +0.02%
SALU: 57288 -> 57577 (+0.50%); split: -0.20%, +0.70%
SMEM: 18768 -> 18967 (+1.06%); split: -0.01%, +1.07%

fossil-db (navi21):
Totals from 239 (0.30% of 79825) affected shaders:
Instrs: 444783 -> 445177 (+0.09%); split: -0.07%, +0.15%
CodeSize: 2371776 -> 2373136 (+0.06%); split: -0.13%, +0.19%
Latency: 4226478 -> 4219221 (-0.17%); split: -0.24%, +0.07%
InvThroughput: 1430962 -> 1428445 (-0.18%); split: -0.23%, +0.06%
SClause: 9357 -> 9398 (+0.44%); split: -0.20%, +0.64%
Copies: 42742 -> 42927 (+0.43%); split: -0.53%, +0.96%
Branches: 12975 -> 12970 (-0.04%); split: -0.05%, +0.02%
PreSGPRs: 14368 -> 14312 (-0.39%); split: -0.47%, +0.08%
VALU: 306642 -> 306720 (+0.03%); split: -0.02%, +0.05%
SALU: 63702 -> 63790 (+0.14%); split: -0.31%, +0.45%
SMEM: 20030 -> 20231 (+1.00%); split: -0.00%, +1.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14458
Backport-to: 25.3
Reviewed-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/38903>
2025-12-12 13:58:42 +00:00
Rhys Perry
49d923078f ac/nir: fix calculation of aligned_new_size
This should consider nir_round_up_components().

fossil-db (gfx1201):
Totals from 90 (0.11% of 79839) affected shaders:
MaxWaves: 1829 -> 1901 (+3.94%)
Instrs: 410780 -> 411825 (+0.25%); split: -0.02%, +0.27%
CodeSize: 2227956 -> 2234464 (+0.29%); split: -0.02%, +0.31%
VGPRs: 6952 -> 6760 (-2.76%); split: -3.11%, +0.35%
Latency: 3071765 -> 3073960 (+0.07%); split: -0.00%, +0.07%
InvThroughput: 766201 -> 767322 (+0.15%); split: -0.00%, +0.15%
VClause: 7887 -> 7898 (+0.14%); split: -0.08%, +0.22%
Copies: 48189 -> 48324 (+0.28%); split: -0.05%, +0.33%
PreVGPRs: 6605 -> 6595 (-0.15%); split: -0.18%, +0.03%
VALU: 237272 -> 238147 (+0.37%); split: -0.01%, +0.37%
SALU: 48987 -> 49003 (+0.03%)
VMEM: 15542 -> 15560 (+0.12%)
VOPD: 188 -> 200 (+6.38%)

fossil-db (navi31):
Totals from 89 (0.11% of 79825) affected shaders:
MaxWaves: 1811 -> 1883 (+3.98%)
Instrs: 403695 -> 404691 (+0.25%); split: -0.01%, +0.26%
CodeSize: 2150612 -> 2154860 (+0.20%); split: -0.03%, +0.23%
VGPRs: 6892 -> 6676 (-3.13%)
Latency: 3306107 -> 3310010 (+0.12%); split: -0.01%, +0.13%
InvThroughput: 813092 -> 814382 (+0.16%); split: -0.00%, +0.16%
VClause: 7999 -> 8010 (+0.14%); split: -0.06%, +0.20%
Copies: 50089 -> 50210 (+0.24%); split: -0.05%, +0.29%
PreVGPRs: 6596 -> 6586 (-0.15%); split: -0.18%, +0.03%
VALU: 239617 -> 240392 (+0.32%); split: -0.01%, +0.33%
SALU: 45349 -> 45363 (+0.03%)
VMEM: 15762 -> 15780 (+0.11%)
VOPD: 258 -> 262 (+1.55%)

fossil-db (navi21):
Totals from 89 (0.11% of 79825) affected shaders:
Instrs: 345634 -> 346426 (+0.23%); split: -0.00%, +0.23%
CodeSize: 1895616 -> 1900156 (+0.24%); split: -0.00%, +0.24%
Latency: 3043334 -> 3046859 (+0.12%); split: -0.01%, +0.13%
InvThroughput: 928236 -> 929626 (+0.15%); split: -0.01%, +0.16%
VClause: 7894 -> 7905 (+0.14%); split: -0.06%, +0.20%
Copies: 48694 -> 48785 (+0.19%); split: -0.03%, +0.22%
PreVGPRs: 6580 -> 6570 (-0.15%); split: -0.18%, +0.03%
VALU: 228323 -> 229072 (+0.33%); split: -0.01%, +0.33%
SALU: 47202 -> 47216 (+0.03%)
VMEM: 16546 -> 16564 (+0.11%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14458
Backport-to: 25.3
Reviewed-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/38903>
2025-12-12 13:58:42 +00:00
Hyunjun Ko
c50474ac6f anv/video: clean up VP9 picture state setup
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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38904>
2025-12-12 13:37:44 +00:00
Hyunjun Ko
2fe09217a1 anv/video: fix VP9 chroma subsampling format detection
Fixes: 314de7af ("anv: Initial support for VP9 decoding")
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38904>
2025-12-12 13:37:44 +00:00
Boris Brezillon
c0d982751c panvk: Use WB mappings for the global RW and executable memory pools
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This implies relying on all users of these pools to do the flushing
explicitly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
2dd27c647b panvk: Use WB maps for command buffer memory
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
f860c7bdf1 panvk: Use write-back maps for descriptor sets
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
e84f804a6d panvk: Add a write_desc_data() helper
This centralizes things so that we only ever write to the descriptor
buffer in write_desc_data(). get_desc_slot_ptr() now returns a const
void * so we don't write to it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
3b711d687b panvk: Map our standalone private BOs writeback when it makes sense
We can used CPU cached mappings for our private BOs being updated by
the CPU. We make the printf BO an exception to avoid having to
invalidate it every time we check the queue status.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
5095e125c5 panvk: Add various flush/invalidate helpers for internal BOs
Those will be used as we progressively transition some of our
internal buffers to writeback CPU mappings.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
f60d2aa545 panvk: Force a cacheline alignment when allocating objects from WB shared pools
When allocating individual objects from a shared pool, we don't want
objects to share cachelines, otherwise cache maintenance operations on
individual objects might corrupt other objects.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
1c7793ea0b panvk: Advertise a HOST_CACHED memory type if we have WC maps
If the GPU is IO coherent, we expose one memory type that's both
host-coherent and host-cached. Otherwise we expose one type that's
host-uncached and host-coherent, and one that's host-cached and
host-noncoherent.

By default, we advertise <cached,non-coherent> before
<non-cached,coherent> because that's the combination providing the
best perfs in situations where the user knows how to deal with the
non-coherent nature of the GPU.

Unfortunately, the CTS has a few bugs (missing or incorrect flush/inval
calls) forcing us to re-order things. We might drop the flag at some
point (some fixes have been submitted, others are on their way).

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
2afef24d3f panvk: Base memoryTypeBits on phys_dev->type_count
Stop hard-coding 1 and just advertise everything on the physical device.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
ba293b1e49 panvk: Store the memory heaps/types in the physical device
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
c7ca8950f2 panvk: Sync CPU maps around host image copies
This is a little annoying.  We probably don't want to call into the
kernel once for every Z slice or array layer we touch.  But at the same
time if we can flush from userspace we don't want to flush/invalidate
more than necessary.  So we have two sets of flushes, a more precise one
which we do based for userspace flushing and a coarse-grained one for
kernel flushing.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
a32eb87a5d panvk: Implement Flush/InvalidateMappedMemoryRanges()
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
1e6ea0697a panvk: Flush pending map syncs before submission
Flush deferred CPU sync ops so we can make CPU changes visible to the GPU.
This is currently a NOP because we haven't enabled cached mappings in
panvk yet, but we need to prepare for that before we progressively
switch each relevant buffer to use writeback CPU mappings.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
3ae96f3cfd panvk: Add a debug flag to force CPU map syncs through the kernel
Useful for debugging.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
4bee7f0003 panvk: Add a debug flag to force CPU-uncached mappings
Useful to debug stuff.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
a670956b7a panvk: Mask off BO_FLAG_WB_MMAP in adjust_bo_flags()
This makes it easier to say we want WB maps various places.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
aebd71cc8d panvk: Rely on supported_bo_flags to mask PAN_KMOD_BO_FLAG_GPU_UNCACHED
Now that we have it hooked up at the props level, we can filter
this flag out in panvk_device_adjust_bo_flags() and use this helper
when creating our uncached mempool.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
76bb8e1a39 panvk: Add a panvk_priv_mem_check_alloc() helper and use it
Stop checking allocation success with panvk_priv_mem_{dev,host}_addr().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
c9e94f92a0 panvk: Don't allocate memory for a buffer descriptor in CreateBufferView()
The buffer descriptor is copied to the descriptor set, and there's no
side-band data to allocate in GPU memory.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
b5e47ba894 pan/kmod: Add new helpers to sync BO CPU mappings
pan_kmod_flush_bo_map_syncs() queues CPU-sync operations, and
pan_kmod_flush_bo_map_syncs_locked() ensures all queued
operations are flushed/executed. Those will be used when we start
adding support for CPU-cached mappings.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
af14c37bf1 pan/kmod: Enforce PAN_KMOD_BO_FLAG_NO_MMAP
Fail early in pan_kmod_bo_mmap() if PAN_KMOD_BO_FLAG_NO_MMAP is set.
This saves us a user -> kernel round-trip, but most importantly, it
allows us to enforce NO_MMAP at the userspace level on BOs that the
kernel would otherwise accept to mmap() (mapping of imported BOs
requires extra DMA_BUF_IOCTL_SYNC calls we don't have).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
0f4f556229 pan/kmod: Expose the IO coherency property
Will be used to skip cache maintenance operations when the GPU is IO
coherent.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
cd8b8baf6e pan/kmod: Expose the BO flags supported by a pan_kmod_device
Will be needed to let the frontend know if it can use cached CPU-mappings,
and it allows us to extend the set of supported flags without introducing
a new field if we ever have to.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Faith Ekstrand
7e65322c93 pan/kmod: Add a panfrost_kmod_driver_version_at_least() helper
We have a few hand-rolled instances of this which work well enough but it
gets more complicated as soon as we care about checking a major version
more than 1.  Add a helper to make this more robust.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:41 +01:00
Boris Brezillon
ee172bb769 pan/kmod: Cache the device props at the pan_kmod_dev level
The frontend is going to query the device props anyway, so let's just
query it at device creation time and store it in pan_kmod_dev::props.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:15:30 +01:00
Faith Ekstrand
f43cff3728 util: Move STACK_ARRAY into util
It's useful for more than just Vulkan.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:03:02 +01:00
Faith Ekstrand
61f7990b9a drm-uapi: Sync the panfrost header
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:03:02 +01:00
Faith Ekstrand
8c8864baea drm-uapi: Sync the panthor header
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:03:02 +01:00
Boris Brezillon
ef760d4c59 people: Add Christoph Pillmayer to the list
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:03:02 +01:00
Georg Lehmann
0fe8250bf4 radv: optimize known front_face_fsign too
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Foz-DB Navi21:
Totals from 1941 (1.99% of 97581) affected shaders:
MaxWaves: 44196 -> 44612 (+0.94%); split: +0.97%, -0.03%
Instrs: 1553182 -> 1548823 (-0.28%); split: -0.36%, +0.08%
CodeSize: 8261308 -> 8261496 (+0.00%); split: -0.17%, +0.18%
VGPRs: 98488 -> 97968 (-0.53%); split: -0.56%, +0.03%
SpillSGPRs: 1288 -> 1347 (+4.58%)
Latency: 19136399 -> 19094748 (-0.22%); split: -0.38%, +0.16%
InvThroughput: 5424693 -> 5409469 (-0.28%); split: -0.32%, +0.04%
VClause: 29941 -> 29943 (+0.01%); split: -0.26%, +0.27%
SClause: 39922 -> 39972 (+0.13%); split: -1.02%, +1.14%
Copies: 109736 -> 109684 (-0.05%); split: -1.45%, +1.40%
Branches: 24523 -> 24499 (-0.10%); split: -0.12%, +0.02%
PreSGPRs: 99206 -> 99191 (-0.02%); split: -0.02%, +0.00%
PreVGPRs: 79019 -> 78240 (-0.99%); split: -1.00%, +0.02%
VALU: 1145088 -> 1140731 (-0.38%); split: -0.44%, +0.06%
SALU: 164035 -> 164077 (+0.03%); split: -0.48%, +0.51%
SMEM: 80668 -> 80658 (-0.01%)

We used to call this pass before front_face_fsign is created
but that has changed.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38906>
2025-12-12 08:24:38 +00:00
Collabora's Gfx CI Team
dd05c4a566 Uprev ANGLE to 2ed4b049c064add3109c7b1e0c954a0bce856df8
ee05836a49...2ed4b049c0

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38917>
2025-12-12 07:04:49 +00:00
Marek Olšák
9bd2c6dcb2 ac/nir: allow smaller workgroups for GS
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's not good for performance, but it's possible to use for debugging.
Running single-wave GS workgroups could work around any LDS race conditions.

Setting the workgroup size to 64 reliably works around
GLCTS *primitive_counter*line failures, indicating streamout data
corruption with multi-wave GS workgroups.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38328>
2025-12-12 04:27:32 +00:00
stefan11111
ff8df8712e gallium/frontends/dri: Don't force dri cursor buffers to be 64x64
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38841>
2025-12-12 02:39:41 +00:00
Qiang Yu
3f37740762 ac/llvm: workaround legacy fma intrinsic crash on gfx12
This is a llvm bug:
  https://github.com/llvm/llvm-project/issues/170437

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14359
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38884>
2025-12-12 02:08:41 +00:00
Rob Clark
cb9d9b8a6e asahi: Set prefer_real_buffer_in_constbuf0
This avoids u_upload_data_ref() when cb0 is bound.  The u_upload_*_ref()
paths are still problematic to mix with uploaders that the front-end
uses with explicitly managed releasebufs, but this at least side-steps
the issue, and is a legit fix on it's own.

Cc: mesa-stable
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38896>
2025-12-12 00:55:55 +00:00
Rob Clark
51605bfac2 gallium: Make upload_cb0 return a releasebuf
pipe_upload_constant_buffer0() was immediately releasing the
u_upload_alloc() releasebuf.  But it is used in various call-
paths where the release needs to be deferred further.

Fixes crashes in firefox for any driver that uses the same
u_upload_mgr instance for pipe->const_uploader and
pipe->stream_uploader.

Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14309
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38896>
2025-12-12 00:55:55 +00:00
Rob Clark
b2daaaec81 gallium/aux: Add debug option to force u_upload rollover
Triggering the rollover where the old upload buffer is released is a
good way to catch bugs with a releasebuf being dropped too soon (ie.
while the frontend still needs a reference).

This makes it easy to reproduce firefox crashes in any driver where
pipe->const_uploader == pipe->stream_uploader.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38896>
2025-12-12 00:55:55 +00:00
Kenneth Graunke
bdacab49c7 brw: Use LSC extended descriptor offsets for Xe2 URB messages
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
URB messages on Xe2 are LSC messages with FLAT addressing.  We can
specify a S19 immediate offset in the extended message descriptor,
which should be more than adequate to hold any offsets we need.

We wrote the original URB code before implementing that, and never
doubled back to take advantage of it.  But doing so can drop ADDs
near every URB access.

fossil-db results on Battlemage:

   Totals:
   Instrs: 232239759 -> 231432254 (-0.35%)
   Cycle count: 34044435848.0 -> 34055507100.0 (+0.03%); split: -0.00%, +0.04%
   Spill count: 520370 -> 520362 (-0.00%); split: -0.00%, +0.00%
   Fill count: 470790 -> 470803 (+0.00%); split: -0.00%, +0.00%
   Max live registers: 72111853 -> 72111369 (-0.00%); split: -0.00%, +0.00%

   Totals from 227920 (28.89% of 788851) affected shaders:
   Instrs: 59841897 -> 59034392 (-1.35%)
   Cycle count: 683385208.0 -> 694456460.0 (+1.62%); split: -0.14%, +1.76%
   Spill count: 17278 -> 17270 (-0.05%); split: -0.10%, +0.06%
   Fill count: 17481 -> 17494 (+0.07%); split: -0.03%, +0.10%
   Max live registers: 23052652 -> 23052168 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38899>
2025-12-12 00:12:03 +00:00
Kenneth Graunke
9482d392a1 brw: Fix outdated comments about urb->offset units
I recently converted urb->offset to be in bytes on Xe2, but neglected to
update these comments that still said OWord.

Fixes: 9ffae42975 ("brw: Store brw_urb_inst::offset in bytes on Xe2")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38899>
2025-12-12 00:12:03 +00:00
Alejandro Piñeiro
bb06af3f9b panfrost/job: avoid shadowing variable name
Without this commit, panfrost_batch_update_access receives a parameter
called "batch", and then it uses the same name while iterating for all
batches on the current context. This can be confusing and error-prone,
so let's rename the latter.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38908>
2025-12-11 23:44:20 +00:00
Lionel Landwerlin
fecb9e0952 anv: switch shader heap placement to beginning of heap by default
It seems placing the shader at the end has a negative performance
impact.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8ba197c9ef ("anv: Switch shaders to dedicated VMA allocator")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38900>
2025-12-11 23:20:06 +00:00
Iván Briano
094f8f041f anv: enable fragmentShadingRateWithShaderSampleMask on Xe2+
Before DG2, the value the HW gives us seems to be backwards, but
since DG2 this is supposed to be supported just fine.
However, due to Wa_22012766191, enable it only for Xe2 and up.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38641>
2025-12-11 22:50:10 +00:00
Iván Briano
df15770785 anv: coarse_pixel doesn't require any InputCoverageMaskState
The UNUSED is to avoid warnings on the gen9 variant.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38641>
2025-12-11 22:50:10 +00:00
Iván Briano
978d4b2a99 anv: maxFragmentShadingRateCoverageSamples is 16 on all platforms
But before ACM, we need to mis-report it to keep the CTS sane, as the
implementation of coarse pixel seems to have all sorts of wrongs in
older HW.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38641>
2025-12-11 22:50:10 +00:00
Iván Briano
a7280ab590 nir: add nir_lower_single_sampled::lower_sample_mask_in option
GLSL defines gl_SampleMaskIn as :
   "a fragment language that indicates the set of samples covered
    by the primitive generating the fragment during multisample
    rasterization"

when variable rate shading is enabled, a single invocation might cover
multiple samples. The lowering done in nir_lower_single_sampled() does
not account for that case, so add an option to selectively disable it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38641>
2025-12-11 22:50:10 +00:00
Iván Briano
ef31f07077 nir: clear SAMPLE_MASK_IN if we lowered it
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38641>
2025-12-11 22:50:10 +00:00
Emma Anholt
71b59563fe tu: Move tu_xs_config() to use the CRB builder.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This duplicates the field setup per stage, but lets us use the nice reg
packers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
780de476e7 tu: Split loading immediates for a program from the program config.
This moves the immediates load down a bit, so we can continue the CRB
conversion of program config.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
5f091af897 tu: Move a bunch of program config to CRB.
This shows off how we don't need to pass an explicit size per CRB instance
in our non-growable CSes.

However, I don't like the additional indentation I did to make a CRB go
out of scope when I needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
c130c94bcb tu: move tu6_emit_msaa() to use CRB.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
f973ff307d tu: Move tu6_emit_window_offset() to use CRB.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
5bfc950128 tu: Move tu6_emit_mrt() to use CRB.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
daa9c0e228 tu: Move VFD CRBs to the CRB builder.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
02602cc3e4 tu: Move pipeline SO setup to the CRB builder.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
1b93a4b778 tu: Add CRB builder.
Loosely based on freedreno's, but simplified since a lot of overflow
handling was already there in tu_cs.  It successfully catches issues of:

- Overflowing the CRB reservation
- Starting a new CRB with one in progress.
- Emitting a pkt4 while a CRB emit is in progress.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Jonathan Marek
2d6c15ad57 tu: remove magic bo reg packing (use iovas directly)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Emma Anholt
67c6abb20b tu,freedreno: Drop the ".bo_write" flag.
It's been unused since my commit 064f395a89 ("freedreno: Tell the kernel
that all BOs are for writing.") back in 2020.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Calder Young
0b3f0d1662 anv: Fix typo when checking if async rt scratch size changed
Current stack size is stored in layout.sw_stack_size, but the function
thats supposed to update it is comparing layout.total_size instead.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38898>
2025-12-11 20:43:51 +00:00
Christian Gmeiner
b393518bdf treewide: Use wsi_common_is_swapchain_image() helper
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Replace the duplicated swapchain image detection pattern across all
Vulkan drivers with the new wsi_common_is_swapchain_image() helper.

Since the swapchain handle can be extracted from VkImageCreateInfo's
pNext chain inside wsi_common_create_swapchain_image(), remove the
now-redundant VkSwapchainKHR parameter from that function.

This removes the #ifdef guards for Android/WSI platforms from each
driver, as the helper now handles this uniformly.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38541>
2025-12-11 20:20:39 +00:00
Christian Gmeiner
9a89280d62 vulkan/wsi: Add wsi_common_is_swapchain_image() helper
Add a helper function to check if a VkImageCreateInfo represents a
swapchain image by looking for VkImageSwapchainCreateInfoKHR in the
pNext chain.

This consolidates the swapchain detection logic that is currently
duplicated across all Vulkan drivers, and handles the Android case
in one place.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Suggested-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38541>
2025-12-11 20:20:39 +00:00
Boris Brezillon
840c80d80e pan/ci: Disable THP on panfrost-g52-piglit
This is causing an OOM, and weston gets killed, which causes all
the remaining jobs to fail after that point.

Until this is sorted out, disable THP for this specific job.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38912>
2025-12-11 19:45:33 +00:00
Erik Faye-Lund
708d331a04 pvr: run clang-format
This fixes up a bunch of clang-format issues that was missed recently.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38886>
2025-12-11 19:07:40 +00:00
Erik Faye-Lund
306de6782c pvr: disable has_gs_rta_support for ge7800 as well
The MR adding support for ge7800 (!38211) was submitted while the MR
that disabled has_gs_rta_support (!38024) was under review. It seems
nobody noticed that we missed disabling it here as well.

Let's fix that up, so we don't try to use this when it's not expected to
work.

Fixes: c60232c0c5 ("pvr: temporarily disable gs_rta_support on all cores")
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Alessio Belle <alessio.belle@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38909>
2025-12-11 18:52:36 +00:00
Faith Ekstrand
39b8456a79 panvk: Drop compile_inputs from panvk_lower_nir()
We no longer need this.  Now panvk_lower_nir() is simply about
descriptors, I/O, and calling into the back-end lowering code.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:54 +00:00
Faith Ekstrand
4909e23d11 panvk: Pull multiview lowering out of panvk_lower_nir()
It only applies to vertex shaders right now.  Also, once we add
geometry, it won't really work anymore so we'll need to do something
else.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:54 +00:00
Faith Ekstrand
4f0386fbfb panvk: Restructure VS variant handling
There's no real point in the array of NIRs and the array of infos.  It
just makes everything more of a headache inside the loop.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:54 +00:00
Faith Ekstrand
0191e1f28a panvk: Make compile_inputs const in panvk_compile_nir()
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:53 +00:00
Faith Ekstrand
c161619a0c panvk: Only pass the panvk_shader_desc_info to panvk_lower_nir()
Now that input attachment lowering is factored out, there's no reason to
be passing the whole shader variant around here.  This both makes things
a lot more clear and gives us more flexibility about when we call it,
allowing us to potentially call it once per-shader instead of once
per-variant.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:53 +00:00
Faith Ekstrand
1c5ea90042 panvk: Store the varying attribute descriptor count in desc_info
This is what everybody outside the compiler actually wants.  This also
gives us the opportunity to centralize our choice to use LD_VAR_BUF[_IMM]
to one place in the compiler and stop sprinkling it around all over.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:52 +00:00
Faith Ekstrand
153a35aa91 panvk: Move I/O lowering out of panvk_lower_nir()
It really is per-stage and there's nothing we're really saving ourselves
by trying to do it in a common place.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:51 +00:00
Faith Ekstrand
e694e2c352 panvk: Re-prefix panvk_shader_desc_info/map with lower_
This is more clear in the presence of the lowering pass and will prevent
a name collision in the next commmit.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:50 +00:00
Faith Ekstrand
3747e3318a panvk: Call lower_input_attachment_loads() from compile_shader()
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:50 +00:00
Faith Ekstrand
cddfa4615b panvk: Break input attachment lowering into its own file
Input attachment lowering really has nothing to do with descriptor
lowering.  It just needs to be called first so we still have access to
the variables.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:49 +00:00
Faith Ekstrand
5ac0b11893 panvk: Stop using descriptor helpers in lower_input_attachments
We're about to move this to another file which won't have anything to do
with descriptor sets.  This makes the one potentially functional change
easily bisectable and then the next commit is just moving code.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:48 +00:00
Faith Ekstrand
e518450661 panvk: Use nir_instr_clone() for input attachment loads
There's no point in re-typing it all with the builder

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:48 +00:00
Faith Ekstrand
c2e6133549 panvk: Add separate COMPUTE and FRAGMENT cases in compile_shader()
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:47 +00:00
Faith Ekstrand
388a3cff5c panvk: Upload all variants at the end of compile_shader()
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:47 +00:00
Mary Guillemard
aabdd0f5ca panvk: Move late lowering to panvk_compile_nir()
This is needed for intershader optimization and GS lowering.

We now pass all NIR variants with pan_compile_inputs to
panvk_compile_shader and handle sysvals/push consts lowering in there.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:46 +00:00
Mary Guillemard
f4470dd7d7 panvk: Move FAU space info to panvk_compile_nir
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Co-authored-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:45 +00:00
Faith Ekstrand
2bd282a968 pan/bi: Run nir_lower_all_phis_to_scalar() late
We were running this in the preprocess step and then trusting that it
would clean up everything before we got to the back-end.  However, we
were running the entire optimization loop in between as well as drivers
potentially adding stuff (since panvk has it's own passes after
postprocess).  Instead, this should be one of the last things run, right
before we go into the back-end.

Cc: mesa-stable
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:44 +00:00
Faith Ekstrand
5f22dfa2e1 panvk: Run pan_preprocess_nir() in the preprocess step
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:44 +00:00
Faith Ekstrand
7206572884 pan/bi: Move opt_sink and opt_move calls to postprocess
The comments pretty explicitly say that they assume lowered UBOs and
SSBOs so preprocess is the wrong place for them.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:44 +00:00
Faith Ekstrand
5841106027 pan/bi: Only delete function temp variables
Other resource variables like UBOs and SSBOs are still useful for
debugging and not harming anything.  Also, some Vulkan-focused passes
look up variables from the otherwise detached resource intrinsics and
use them for things.  We really want to keep them around.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
2025-12-11 18:29:43 +00:00
Connor Abbott
da969df092 ir3: Fix condition for using uniform predicates
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
cat2_may_use_scalar_alu() was incorrect because the instruction could
use an indirectly-accessed const where a0.x (i.e. the offset) is
non-uniform. Fortunately, we already know whether this is the case,
because the original instruction would then write a non-shared GPR.
Also, the restrictions for scalar ALU are the same regardless of whether
we write up0.x or a shared GPR, and vice versa the restrictions for
normal cat2 are the same regardless of whether we write p0.x or a
non-shared GPR, so it should always be safe to write p0.x if non-shared
and up0.x if shared. So, just do that.

Fixes: 2a8c5ebc77 ("ir3: enable scalar predicates")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38895>
2025-12-11 18:02:46 +00:00
Rob Clark
d0bae6c1b3 ir3: Fix early-preamble (sy)
This is about writes to shared regs, not GPR (as early-preamble can only
use shared regs).  It's a pretty hypothetical case, but might as well
get it correct.

Fixes: 189e494249 ("ir3: Add (sy) before end of preamble when necessary")
Reported-by: Job Noorman <jnoorman@igalia.com>
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38868>
2025-12-11 17:36:11 +00:00
Rhys Perry
156ae6195e aco: print large p_parallelcopy using several lines
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Emre Cecanpunar <emreleno@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38695>
2025-12-11 16:51:21 +00:00
Rhys Perry
21414e0898 aco/ra: add first loop header phi operand to temp_to_phi_resources
If the first operand is a CSSA copy, we might want to add this to
temp_to_phi_resources, so that we later mark it as the last-seen phi
operand.

fossil-db (navi31):
Totals from 284 (0.36% of 79825) affected shaders:
Instrs: 4160233 -> 4157517 (-0.07%); split: -0.09%, +0.03%
CodeSize: 21546420 -> 21532884 (-0.06%); split: -0.09%, +0.02%
VGPRs: 31404 -> 31416 (+0.04%)
Latency: 40266308 -> 40253731 (-0.03%); split: -0.06%, +0.02%
InvThroughput: 8140751 -> 8139724 (-0.01%); split: -0.05%, +0.04%
VClause: 99849 -> 99835 (-0.01%); split: -0.02%, +0.01%
Copies: 344512 -> 341732 (-0.81%); split: -1.08%, +0.28%
Branches: 113620 -> 113629 (+0.01%); split: -0.02%, +0.03%
VALU: 2502619 -> 2499836 (-0.11%); split: -0.15%, +0.04%
SALU: 499245 -> 499341 (+0.02%); split: -0.02%, +0.04%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Emre Cecanpunar <emreleno@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38695>
2025-12-11 16:51:21 +00:00
Rhys Perry
43b3901362 aco/ra: copy vector_info to affinities
This eliminates some copies in BVH traversal loops.

fossil-db (navi31):
Totals from 200 (0.25% of 79825) affected shaders:
Instrs: 734931 -> 732521 (-0.33%); split: -0.34%, +0.01%
CodeSize: 3801080 -> 3791692 (-0.25%); split: -0.26%, +0.01%
VGPRs: 13704 -> 13728 (+0.18%); split: -0.44%, +0.61%
Latency: 6094605 -> 6082060 (-0.21%); split: -0.24%, +0.03%
InvThroughput: 1081982 -> 1080121 (-0.17%); split: -0.19%, +0.02%
VClause: 18835 -> 18837 (+0.01%); split: -0.01%, +0.02%
Copies: 64602 -> 62239 (-3.66%); split: -3.75%, +0.09%
Branches: 20111 -> 20112 (+0.00%); split: -0.01%, +0.02%
VALU: 438618 -> 436257 (-0.54%); split: -0.55%, +0.01%
SALU: 85092 -> 85085 (-0.01%); split: -0.01%, +0.00%
VOPD: 76 -> 74 (-2.63%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Emre Cecanpunar <emreleno@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38695>
2025-12-11 16:51:21 +00:00
Konstantin Seurer
85e8f815e0 radv/nir: Use fmt_idx correctly
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38462>
2025-12-11 16:26:01 +00:00
Konstantin Seurer
c14eb415a2 radv/bvh: Avoid a slow case when compressing triangles
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38462>
2025-12-11 16:26:01 +00:00
Konstantin Seurer
2749b5b713 radv/bvh: Fix calculating the vertex payload/prefix sizes
This calculation needs to happen in the same loop as the
geometry/triangle id calculations in case the selected invocation is
before all invocations that were already selected.

Totals from 1269 (15.10% of 8406) affected BVHs:
compacted_size: 137581888 -> 137606464 (+0.02%); split: -0.08%, +0.10%
sah: 6496048424 -> 6496048450 (+0.00%); split: -0.00%, +0.00%
primitive_node_count: 604384 -> 604656 (+0.05%); split: -0.14%, +0.19%

Fixes: c18a7d0 ("radv: Emit compressed primitive nodes on GFX12")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38462>
2025-12-11 16:26:00 +00:00
Konstantin Seurer
3a3810647e radv/bvh: Assert that indices_midpoint is valid
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38462>
2025-12-11 16:26:00 +00:00
Konstantin Seurer
685d34a6d3 radv/rra/gfx12: Fix primitive/geometry index validation
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38462>
2025-12-11 16:25:59 +00:00
Konstantin Seurer
07afe65beb radv: Use hw_leaf_node_count for computing BVH size
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38462>
2025-12-11 16:25:59 +00:00
Konstantin Seurer
034f58c7e3 nir: Ignore ray query ranges that don't start with rq_initialize
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Handles is a rare edge case where the ray query is used "before"
there is a rq_initialize.

cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38850>
2025-12-11 15:56:29 +00:00
Konstantin Seurer
5e03d09eb5 nir: Fix typo in nir_opt_ray_query_ranges
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38850>
2025-12-11 15:56:28 +00:00
Erik Faye-Lund
be7f39a519 pvr: rename colliding symbol
We already have a function called  pvr_render_targets_init() in
pvr_device.c. Having two symbols with the same name, even though they
both are static only leads to confusion.

So let's rename one of them to clear things up.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38888>
2025-12-11 15:40:47 +00:00
Erik Faye-Lund
8fa6aabb33 pvr: break out pvr_free_list into a separate module
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
17f99c870b pvr: replace constant-returning function with a macro
Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
745d576516 pvr: make queries arch-agnostic
The only HW-definition we depend on here is the occlusion query minimum
alignment. But this value doesn't differ per arch, so let's just make it
a global define for now.

This should probably have a better name and location. But AFAICT, this
applies to a lot in this header. So let's untangle this down the road
instead.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
70270348e8 pvr: fixup some includes
This just pre-emptively fixes up some includes that will bite us in the
future if not fixed.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
5dd76663a7 pvr: add helpers to query limits based on device-info
These are only implemented for Rogue so far, which is fine because
that's all we currently support. Once we add support for more
generations, these helpers need updating.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Ashish Chauhan
0d38d22c02 pvr: move PVR_TEX_FORMAT_COUNT to pvr_limits.h
Signed-off-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
ed83ee7659 pvr: do not store compressed pbe-formats
These are always invalid, so let's not even store them in the table.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:04 +00:00
Erik Faye-Lund
f716599d5f pvr: use strongly-typed enum instead of uint32_t
Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:04 +00:00
Erik Faye-Lund
298c14bbc4 pvr: rework format binding flags
This takes us from one "supported"-bit to per-bind flags for each of
vertex-buffer, sampler-view, render-target, depth-stencil and
storage-image bindings.

While we chould have stored extra bits for storage storage/uniform
texel-buffers as well, that seems a bit excessive to me.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:03 +00:00
Erik Faye-Lund
283c6bb19e pvr: split out pbe-details from main format-table
The PBE details here aren't relevant for all GPUs, so let's split them
out to a separate table here.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:03 +00:00
Erik Faye-Lund
c1da96affe pvr: move border-specific format-code into pvr_border.c
Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:02 +00:00
Erik Faye-Lund
cd6c4bf772 pvr: remove unused member
We never read this member, so let's cull it.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:01 +00:00
Erik Faye-Lund
c11f5197f5 pvr: do not store VkFormat in pvr_format
The VkFormat is the key into the format-table, so we always know from a
higher level up what VkFormat we're talking about. So let's instead pass
VkFormat around, and look up pvr_format from the format-table later on
instead.

This leads to a few more lookups, but those are relatively cheap, and
doesn't happen in critical code-paths.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:01 +00:00
Erik Faye-Lund
de5d08eb72 pvr: move include to source-file
Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:25:59 +00:00
Hans-Kristian Arntzen
c00ae68585 egl/x11: Fix memory leak when querying translated coord.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38901>
2025-12-11 14:58:59 +00:00
Emma Anholt
1a2d0d3f31 nir: Optimistically unroll loops using induction var as a sample id.
On the assumption that nobody will use a sample id greater than the sample
count, have loop unrolling guess based on the driver's max sample count.
This unrolls a simple resolve shader with a uniform max samples on ir3 to:

  value = vec4(0);
  if (max_samples > 0) {
    value += txf_ms(coord, 0);
    if (max_samples > 1 {
      value += txf_ms(coord, 1);
      if (max_samples > 2){
        value += txf_ms(coord, 2);
        if (max_samples > 3) {
          value += txf_ms(coord, 3);
          for (i = 4; i < max_samples; i++)
            value += txf_ms(coord, i);
          }
        }
     }
   }
   ...

This is only worth a 1% win on our microbenchmark as-is, but if we could
flatten those ifs out and pull the fadds out to the end, avoiding syncs
per load would be a big win.  This seems like a first step.

I've taken a shot at updating drivers to set the value, and tried to leave
notes in places that drivers might update, and want to follow up with
updating the compiler option.

This affects over half the DX11 apps in shader-db-private.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38585>
2025-12-11 14:26:11 +00:00
Emma Anholt
10ba7675c8 nir/uub: Use an optional max_samples from drivers for sample counts.
This triggers some unrolling in Fallout 4, GTAV, and Rocky Planet in my
shader-db.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38585>
2025-12-11 14:26:11 +00:00
Emma Anholt
dc30e1a128 nir/loop_analyze: Use nir_unsigned_upper_bound for loop trip limits.
This triggers some unrolling in Monster Hunter World, Total War:
Warhammer, and Planet Zoo.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38585>
2025-12-11 14:26:10 +00:00
Luigi Santivetti
564bf2379e pvr: enable VK_KHR_dynamic_rendering
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: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:28 +00:00
Luigi Santivetti
146364ab9f pvr: add support for VK_KHR_dynamic_rendering
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Co-authored-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:28 +00:00
Luigi Santivetti
5b752ccab0 pvr: move code for resolving attachments
In preparation for dynamic rendering and for removing renderpasses
move relevant code so it doesn't need to move again.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:28 +00:00
Luigi Santivetti
edadff30d8 pvr: get the format for start of render clears from pass info
In preparation for dynamic rendering make the code in start of renders
clear more robust and generic so not to depend on render passes when
it doesn't have / need to.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:28 +00:00
Luigi Santivetti
5d46d6c93c pvr: do not assert in multi-layer rta emulated path
The assert here was too strict and dynamic rendering tests do exercise this
part. The correct fix is to either re-enable RTA support or handle properly
multi-layered emulation.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:27 +00:00
Ella Stanforth
2eabbbe57d pvr: use linked list to back deferred clears
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:27 +00:00
Luigi Santivetti
8e52b6adb7 pvr: be more restrictive of when to emit vdm terminate
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:27 +00:00
Luigi Santivetti
656050bab1 pvr: split out command buffer render pass inheritance
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:26 +00:00
Luigi Santivetti
ef73c58918 pvr: split out device tile buffers teardown
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:26 +00:00
Luigi Santivetti
b42522a719 pvr: split framebuffer clear values allocation and setup
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:25 +00:00
Luigi Santivetti
c0526a6880 pvr: split framebuffer attachments allocation and setup
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:24 +00:00
Luigi Santivetti
bdfc24031b pvr: split out driver specific framebuffer data
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:24 +00:00
Ella Stanforth
0bf47f0435 pvr: move load_op_shader_generate to pvr_mrt
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:23 +00:00
Ella Stanforth
b076f8170e pvr: move pvr_load_op_state to pvr_mrt.h
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:23 +00:00
Ella Stanforth
3d1e2b3976 pvr: move pvr_load_op to pvr_mrt.h
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:22 +00:00
Ella Stanforth
2dcaa9866d pvr: move tile_buffer_size logic to pvr_device.c
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:21 +00:00
Ella Stanforth
95e24abf1a pvr: make pvr_get_tile_buffer_size static
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:21 +00:00
Ella Stanforth
d549c1d045 pvr: add pipeline handling to use dynamic rendering info
This change also preserves the functionality of the old renderpass path.

Signed-off-by: Ella Stanforth <ella@igalia.com>
Co-authored-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:20 +00:00
Ella Stanforth
a7de9dae6b pvr: Add routine for filling out usc_mrt_setup from dynamic rendering state
Signed-off-by: Ella Stanforth <ella@igalia.com>
Co-authored-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:20 +00:00
Ella Stanforth
fae9f308ea pvr: Avoid putting tile buffer allocators on the heap
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38744>
2025-12-11 12:52:20 +00:00
Samuel Pitoiset
a89118c5b0 radv: fix race condition when getting the blit queue
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14439
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38883>
2025-12-11 11:16:29 +00:00
Samuel Pitoiset
31a24caad9 radv: only include executable size when capturing shaders with RGP
This might help RGP to not try to disassemble past s_endpgm and crashes
on unknown instructions.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14419
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38885>
2025-12-11 10:56:10 +00:00
Aitor Camacho
16a94b1b7f kk: Enable float16 and int8
Metal does not seem to respect memory coherency for threads. Workaround 6
enforces device coherency for global loads/stores even if it should not
be needed.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38847>
2025-12-11 10:30:39 +00:00
Boris Brezillon
1e0e7d4296 pan/ci: Bump kernel versions for platforms testing panvk
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We want to start testing new features that made it into drm-misc-next
recently, so switch to pan{frost,thor} specific kernel tags to get that
tested on g{52,610,925}.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38890>
2025-12-11 08:56:15 +00:00
Valentine Burley
040a24785e panfrost/ci: Fix GitLab rules after YAML split
Add the new file so panfrost CI jobs are properly triggered.

Fixes: c793f612fc ("ci/panfrost: Split inherit definitions into -inc")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38890>
2025-12-11 08:56:15 +00:00
Lionel Landwerlin
6dff50c8bc anv: fix dynamic buffers & independent sets
In 0ca870c6f3 I forgot to fill the bind_map::dynamic_descriptors
array... Duh!

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0ca870c6f3 ("anv: fix broken ray tracing dynamic descriptors")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38893>
2025-12-11 08:32:32 +00:00
Georg Lehmann
ef246aaf72 aco/isel: emit register copies for workgroup ids
This way, we don't overestimate SGPR pressure.

Foz-DB Navi48:
Totals from 1413 (1.45% of 97637) affected shaders:
Instrs: 3468375 -> 3468585 (+0.01%); split: -0.01%, +0.02%
CodeSize: 18643064 -> 18643520 (+0.00%); split: -0.01%, +0.01%
VGPRs: 71776 -> 71788 (+0.02%)
SpillSGPRs: 18575 -> 18561 (-0.08%)
Latency: 23207643 -> 23207998 (+0.00%); split: -0.00%, +0.01%
InvThroughput: 8116806 -> 8116541 (-0.00%); split: -0.01%, +0.00%
VClause: 75250 -> 75252 (+0.00%); split: -0.00%, +0.00%
SClause: 65274 -> 65283 (+0.01%); split: -0.02%, +0.04%
Copies: 275750 -> 275942 (+0.07%); split: -0.03%, +0.10%
PreSGPRs: 70246 -> 69072 (-1.67%)
VALU: 1892111 -> 1892092 (-0.00%); split: -0.00%, +0.00%
SALU: 523460 -> 523648 (+0.04%); split: -0.02%, +0.05%
VOPD: 41097 -> 41102 (+0.01%)

Sadly the RA noise is slightly negative for instruction count.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38830>
2025-12-11 08:06:59 +00:00
Georg Lehmann
839a035564 aco/optimizer: propagate fixed regs to copy/extract/insert
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38830>
2025-12-11 08:06:58 +00:00
Georg Lehmann
d32dd5e1df aco/optimizer: propagate fixed registers
Foz-DB Navi48:
Totals from 351 (0.36% of 97637) affected shaders:
Instrs: 3568192 -> 3567166 (-0.03%)
CodeSize: 18890368 -> 18886304 (-0.02%)
Latency: 17047945 -> 17048185 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 3185739 -> 3185813 (+0.00%); split: -0.00%, +0.00%
SClause: 61544 -> 61536 (-0.01%)
Copies: 271592 -> 270845 (-0.28%)
PreSGPRs: 17186 -> 17094 (-0.54%)
PreVGPRs: 21897 -> 21901 (+0.02%)
VALU: 2003976 -> 2003980 (+0.00%)
SALU: 468403 -> 467664 (-0.16%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38830>
2025-12-11 08:06:58 +00:00
Georg Lehmann
b798ace443 aco/optimizer: fix skip_smem_offset_align with non temp register operands
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38830>
2025-12-11 08:06:58 +00:00
Georg Lehmann
911e1ce168 aco/isel: emit exec copy for ballot(true)
Once copy propagated in the optimizer, this will allow
using nir_opt_uniform_subgroup without too many regressions.

Foz-DB Navi48:
Totals from 405 (0.41% of 97637) affected shaders:
Instrs: 3796716 -> 3796894 (+0.00%); split: -0.00%, +0.00%
CodeSize: 20116136 -> 20116652 (+0.00%); split: -0.00%, +0.00%
Latency: 18326661 -> 18327114 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 3353206 -> 3353268 (+0.00%); split: -0.00%, +0.00%
Copies: 292307 -> 293830 (+0.52%)
SALU: 507523 -> 507738 (+0.04%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38830>
2025-12-11 08:06:58 +00:00
Georg Lehmann
72e3071751 aco/optimizer: keep pass_flags valid for all instructions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38830>
2025-12-11 08:06:57 +00:00
Collabora's Gfx CI Team
d8e9c669cb Uprev ANGLE to ee05836a4934129527544385203ecf420afc5dd1
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
127a84404b...ee05836a49

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38503>
2025-12-11 00:09:04 +00:00
Sagar Ghuge
560b21fe49 anv/rt: Increment block count only for valid children
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If invalid childrens don't consume space in memory, we don't have to
increment the block count. HW unit just look at the bounding boxes and
reject them in intersection test.

Also, this patch handles invalid children type encoding.

Fixes: 198537039a ("anv/rt: reduce writes to block_incr_and_start_prim")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38717>
2025-12-10 23:16:30 +00:00
Connor Abbott
f734dff419 tu: Fill render pass state when resuming
We forgot to call tu_fill_render_pass_state when resuming because it was
mixed in with emitting commands for the start of the subpass. Fix that
by pulling it out. This adds some duplication, but I think it's better
than mixing command emission and CPU-side state setup in the same
function.

Fixes: cb0f414b2a ("tu: Add support for suspending and resuming renderpasses")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38873>
2025-12-10 22:43:10 +00:00
Mel Henning
2fab8fc297 nir: Use instr_clone in rematerialize_deref_in_block
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The previous implementation seems to predate nir_instr_clone() and
duplicates a lot of the deref cloning code. This also makes the pass
preserve deref->arr.in_bounds correctly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38856>
2025-12-10 22:07:45 +00:00
Mel Henning
dc44c0f32b treewide: Use nir_deref_instr_is_arr()
Via coccinelle and some manual fixups.

@@
expression e1;
@@
- e1->deref_type == nir_deref_type_array || e1->deref_type == nir_deref_type_ptr_as_array
+ nir_deref_instr_is_arr(e1)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38856>
2025-12-10 22:07:45 +00:00
Mel Henning
263a82f49b nir: Add nir_deref_instr_is_arr() helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38856>
2025-12-10 22:07:44 +00:00
Michael Cheng
8ba197c9ef anv: Switch shaders to dedicated VMA allocator
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Switched to the new VMA allocator that provides explicit GPU VA
control via util_vma_heap.

This is architectural preparation for ray tracing capture/replay,
which requires the ability to reserve and allocate shaders at specific
VAs. The state pool's free-list design makes VA reservation difficult
to add, while the new chunk allocator is designed for explicit VA
management from the ground up.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38869>
2025-12-10 20:32:10 +00:00
Michael Cheng
1fa327ac32 anv: Add VMA allocator for shader binaries
Introduce a VMA-first chunk allocator for shader binaries to eventually
replace the anv_state_pool-based implementation. This allocator works
directly with GPU virtual addresses through util_vma_heap, making the
virtual address space an explicit resource managed by ANV.

No functional change in this commit.

v2(Michael Cheng): Use existing instruction state pool anv_va_range

v3(Lionel): Simplify allocator

Signed-off-by: default avatarMichael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38869>
2025-12-10 20:32:10 +00:00
Lionel Landwerlin
20f320b7c7 anv: program STATE_BASE_ADDRESS instruction ptr using pdevice address
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38869>
2025-12-10 20:32:10 +00:00
Lionel Landwerlin
7cc9d8eec7 anv: fixup error path for shader allocation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d39e443ef8 ("anv: add infrastructure for common vk_pipeline")
Acked-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38869>
2025-12-10 20:32:10 +00:00
Lionel Landwerlin
567c1b3af4 anv: add missing device_memory_report for shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d39e443ef8 ("anv: add infrastructure for common vk_pipeline")
Acked-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38869>
2025-12-10 20:32:09 +00:00
Lionel Landwerlin
efe60d2940 intel: remove unused show_shader_stage debug option
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38869>
2025-12-10 20:32:09 +00:00
Lionel Landwerlin
37789249a1 anv: fix internal representations of shaders
The shader assembly was only available when not hitting the cache.

Additionally the serialized shader code was also the relocated variant
which meant that it could differ from one run to the next. Instead
serialize the unrelocated code produced by the compiler.

With this change we now decode the copy of the ISA we have on the
host.

NIR dumps are only available for shaders not loaded from the cache
(much like the other drivers).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8f4c2bd566 ("anv: add runtime shader statistic support")
Acked-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38869>
2025-12-10 20:32:08 +00:00
Nanley Chery
fe372f3b1b anv: Don't allow STORAGE + CCS for Y_TILED mod
This can happen as a result of us adding on CCS to modifiers which don't
support it on gfx9-11.

Fixes image corruption seen with the following test:

   $ mpv av://lavfi:testsrc --config=no --vo=gpu-next --scale=ewa_lanczossharp --fs

Fixes: 01c4ea771c ("anv: Enable storage accesses with modifiers on gfx12+")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12910
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38855>
2025-12-10 20:09:09 +00:00
Caio Oliveira
7bd238fa5a brw: Properly set 'desc as register' for SEND in assembler
The non-split SEND case was missing setting this.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38876>
2025-12-10 19:46:52 +00:00
Marek Olšák
308da55f1a radv,radeonsi: use FRAG_RESULT_DUAL_SRC_BLEND
this is slightly nicer

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38604>
2025-12-10 19:16:46 +00:00
Marek Olšák
9a2f1be814 nir: add FRAG_RESULT_DUAL_SRC_BLEND and an option to use it
This is potentially nicer for some drivers. AMD drivers will use it.

mesa_frag_result_get_color_index will be used often.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38604>
2025-12-10 19:16:46 +00:00
Chia-I Wu
ddd0b0c3a8 panvk: rework calculate_task_axis_and_increment
We used to maximize threads_per_task, but that is ideal when the system
has a single gpu client. When there are multiple gpu clients, we want
smaller threads_per_task such that cores can be more fairly shared among
the clients.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37988>
2025-12-10 18:54:48 +00:00
Chia-I Wu
5fd32d79ee panvk: fix calculate_task_axis_and_increment
task_axis selects the dim of the global workgroup, not the dim of the
local workgroup.

v2: fix assert for dEQP-VK.compute.pipeline.basic.empty_workgroup*

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37988>
2025-12-10 18:54:48 +00:00
Chia-I Wu
546d73721b panvk: set compute_ep_limit on v12+
Set compute_ep_limit to max_tasks_per_core on v12+. It is generally a
good idea to queue as many tasks as possible to better utilize the
cores.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37988>
2025-12-10 18:54:48 +00:00
Chia-I Wu
bcd2e62ad0 panfrost: make RUN_COMPUTE.ep_limit configurable
Since v12, RUN_COMPUTE.ep_limit specifies the size of the compute task
queue.  RUN_COMPUTE stalls when there are more tasks in the queue than
the specified ep_limit.

Sensible values are 0 (treated as 4), 4, or 16 (max_tasks_per_core).

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37988>
2025-12-10 18:54:48 +00:00
Yiwei Zhang
c696ec3b73 venus: add missing VKAPI_ATTR/CALL
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14446
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38882>
2025-12-10 18:11:07 +00:00
Aaron Ruby
b17896f693 device-select-layer: Implement VkNegotiateLayerInterface::pfnGetDeviceProcAddr
This must be implemented for loaderLayerInterfaceVersion >= 2. The only
interface that's allowed to be set to null is pfnGetPhysicalDeviceProcAddr.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38270>
2025-12-10 17:36:21 +00:00
Pohsiang (John) Hsu
6173ff73c7 mediafoundation: remove unused templ and small code cleanup
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38857>
2025-12-10 17:13:34 +00:00
Pohsiang (John) Hsu
23516579a8 mediafoundation: remove unneeded memset (~34KB for hevc)
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38857>
2025-12-10 17:13:34 +00:00
Silvio Vilerino
c0039ce657 d3d12: Prefer video encode suballocated buffer mode for subregion notification mode
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38857>
2025-12-10 17:13:33 +00:00
Pohsiang (John) Hsu
d16b651fdd mediafoundation: add some end of function error logging for diagnosing error
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38857>
2025-12-10 17:13:33 +00:00
Pohsiang (John) Hsu
47dc4b90e4 mediafoundation: propagate PrepareForEncode error up.
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38857>
2025-12-10 17:13:33 +00:00
Pohsiang (John) Hsu
10138e5b42 mediafoundation: turn on slice auto on frames with dirty rect only
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38857>
2025-12-10 17:13:32 +00:00
Yonggang Luo
095c2acf01 meson: do not reconstruct ICD paths
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 of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20907/diffs?commit_id=b6a344f4baa1ee2c784ca74499dc9fe3b4519013

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38637>
2025-12-10 14:46:11 +00:00
Yonggang Luo
be4ad5c819 meson: Remove VK_ICD_FILENAMES totally from source tree.
This is a follow up of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> hk changes
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> for RADV changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38637>
2025-12-10 14:46:11 +00:00
Dylan Baker
938fb7703e anv/video: Cast intentional read past end of struct member to void*
Coverity notices that we read past the end of the array we're pointing
to, which is intentional, we want to copy additional members from the
source struct into the target pointer. As such, cast to a `void *`,
since this will make Coverity happy.

CID: 1649589
Fixes: 314de7af06 ("anv: Initial support for VP9 decoding")
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38438>
2025-12-10 14:18:59 +00:00
Tapani Pälli
c9bc373f7c crocus: add struct crocus_scissor_state to clamp values to 16bit
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 port of iris driver commit 193e494e6a to crocus.

Fixes: bc1a6b0a41 ("gallium: change pipe_scissor_state to 32 bit integer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14428
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38862>
2025-12-10 14:04:56 +00:00
Valentine Burley
c56543874c zink/ci: Document recent Turnip flakes
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38867>
2025-12-10 13:32:08 +00:00
Georg Lehmann
621465e417 nir/opt_uniform_subgroup: handle more trivial shuffles/votes
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38867>
2025-12-10 13:32:08 +00:00
Georg Lehmann
e648e551c1 nir/opt_uniform_subgroup: wire up mbcnt_amd path
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38867>
2025-12-10 13:32:08 +00:00
Georg Lehmann
5778436e99 nir/opt_uniform_subgroup: use nir_shader_intrinsics_pass
Nothing here needs the recursion of the full lower_instructions pass.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38867>
2025-12-10 13:32:08 +00:00
Georg Lehmann
5f28bb72a7 nir/divergence_analysis: fix swizzle_amd without fetch inactive
Fixes: ad5be40303 ("nir: add fetch inactive index to quad_swizzle_amd/masked_swizzle_amd")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38867>
2025-12-10 13:32:08 +00:00
Georg Lehmann
1fc38d8539 nir/opt_uniform_subgroup: fix swizzle_amd without fetch_inactive
Fixes: ad5be40303 ("nir: add fetch inactive index to quad_swizzle_amd/masked_swizzle_amd")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38867>
2025-12-10 13:32:08 +00:00
Georg Lehmann
e11d7f06d0 nir/opt_uniform_subgroup: don't try to optimize non trivial clustered reduce
Fixes: 535caaf3e0 ("nir: Optimize uniform iadd, fadd, and ixor reduction operations")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38867>
2025-12-10 13:32:08 +00:00
Valentine Burley
a265cdaa18 ci/deqp: Backport Android logcat commit
Instead of manually applying the patch, backport the version that landed
in main, which requires a cmake argument to enable.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38071>
2025-12-10 11:31:33 +00:00
Valentine Burley
4cbf5062b7 ci: Uprev GL & GLES CTS
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38071>
2025-12-10 11:31:33 +00:00
Valentine Burley
a65a7dbac9 ci: Uprev VKCTS
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38071>
2025-12-10 11:31:31 +00:00
Valentine Burley
3bb9880468 anv/ci: Increase timeout for nightly JSL job
This has been timing out for a while now.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38071>
2025-12-10 11:31:30 +00:00
Georg Lehmann
bb58ba2075 aco/optimizer: propagate salu fabs
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 5156 (5.28% of 97637) affected shaders:
Instrs: 12713219 -> 12694317 (-0.15%); split: -0.15%, +0.00%
CodeSize: 67099236 -> 67037588 (-0.09%); split: -0.13%, +0.04%
VGPRs: 352620 -> 352608 (-0.00%)
SpillSGPRs: 22032 -> 22031 (-0.00%)
Latency: 68288972 -> 68271858 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 13639078 -> 13633997 (-0.04%); split: -0.04%, +0.00%
VClause: 235194 -> 235186 (-0.00%); split: -0.01%, +0.00%
SClause: 249057 -> 249012 (-0.02%); split: -0.03%, +0.01%
Copies: 963813 -> 960529 (-0.34%); split: -0.36%, +0.02%
Branches: 321041 -> 321039 (-0.00%)
PreSGPRs: 303392 -> 303295 (-0.03%); split: -0.03%, +0.00%
VALU: 7134563 -> 7134533 (-0.00%); split: -0.00%, +0.00%
SALU: 1913802 -> 1899948 (-0.72%); split: -0.72%, +0.00%
VOPD: 19914 -> 19885 (-0.15%); split: +0.01%, -0.15%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38723>
2025-12-10 10:07:12 +00:00
Georg Lehmann
04037c7af3 aco/optimizer: propagate salu fneg
Foz-DB Navi48:
Totals from 23796 (24.37% of 97637) affected shaders:
MaxWaves: 638922 -> 638898 (-0.00%)
Instrs: 32968990 -> 32880147 (-0.27%); split: -0.28%, +0.01%
CodeSize: 174252352 -> 173922400 (-0.19%); split: -0.20%, +0.01%
VGPRs: 1396472 -> 1396592 (+0.01%)
SpillSGPRs: 63672 -> 63599 (-0.11%)
Latency: 201025393 -> 200966204 (-0.03%); split: -0.05%, +0.02%
InvThroughput: 37429702 -> 37411026 (-0.05%); split: -0.06%, +0.01%
VClause: 534241 -> 534115 (-0.02%); split: -0.05%, +0.02%
SClause: 831765 -> 831559 (-0.02%); split: -0.07%, +0.05%
Copies: 2404134 -> 2400539 (-0.15%); split: -0.29%, +0.14%
Branches: 728518 -> 728503 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 1337403 -> 1336846 (-0.04%); split: -0.04%, +0.00%
PreVGPRs: 1017490 -> 1017521 (+0.00%); split: -0.00%, +0.00%
VALU: 18319620 -> 18318960 (-0.00%); split: -0.01%, +0.00%
SALU: 5069557 -> 5001384 (-1.34%); split: -1.38%, +0.03%
VOPD: 80235 -> 80172 (-0.08%); split: +0.13%, -0.21%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38723>
2025-12-10 10:07:12 +00:00
Georg Lehmann
8b1340a52c aco/optimizer: validate uses
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38724>
2025-12-10 09:40:13 +00:00
Georg Lehmann
ad3add311c aco/optimizer: fix uses in to_uniform_bool_instr
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38724>
2025-12-10 09:40:13 +00:00
Erik Faye-Lund
3b4d2c41f0 pan: add support for float-formats
Unlike what the comment said here, V9 does in fact support a single
float-format, so let's allow that.

But also, V10 and later supports FP16 formats, but this incorrect check
made that not work. Enable the FP16 formats also while we're at it. We
don't need any additional checks here, because the 16-bit unorm formats
were also added in V10, so util_format_any_to_unorm() does the right
thing here.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38848>
2025-12-10 09:33:18 +01:00
Erik Faye-Lund
b925c4be4a pan: make S8_UINT code behave like the rest
There's no reason why the S8_UINT check should be written in a different
way than the other checks here; let's make this consistent.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38848>
2025-12-10 09:32:48 +01:00
Lionel Landwerlin
6e92720ece anv/brw: drop cs_prog_key::lower_unaligned_dispatch usage
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38837>
2025-12-10 07:44:31 +00:00
Lionel Landwerlin
c1197d88e2 vulkan/runtime: include unaligned dispatch bit in hashing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38837>
2025-12-10 07:44:31 +00:00
Jesse Natalie
0330b19b86 spirv2dxil: Move clip/cull merging from common passes to just spirv2dxil passes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise it gets run twice since it's part of vk_spirv_to_nir

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38465>
2025-12-10 05:16:34 +00:00
Marek Olšák
0c400fbed9 nir: give nir_lower_clip_cull_distance_array_vars a better name
also rename the file

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38465>
2025-12-10 05:16:34 +00:00
Marek Olšák
74995eb64d nir: split gathering array sizes from nir_lower_clip_cull_distance_array_vars
nir_lower_clip_cull_distance_array_vars was sneakily updating
shader_info::clip/cull_distance_array_size.

This moves the gathering into a new function
nir_gather_clip_cull_distance_sizes_from_vars.

v2: remove assertions that prevented nir_lower_clip_cull_distance_array_vars
    from being used with non-compact arrays

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38465>
2025-12-10 05:16:34 +00:00
Marek Olšák
bdcb7bc674 nir/gather_info: clear clip/cull_distance_array_size if the IO is not present
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38465>
2025-12-10 05:16:33 +00:00
Aitor Camacho
a03b686805 kk: Enable fragmentStoresAndAtomics
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Metal will prematurely discard fragments with side effects even if those
side effects happen before the discard. Work around this by making said
discards "optional".

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38741>
2025-12-10 01:44:09 +00:00
Jianxun Zhang
ff3589b460 anv: Enable compression on importing Android buffers (xe2)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Consolidate importing paths by using the new importing
function so that compressed buffer can be imported
correctly.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36825>
2025-12-09 14:16:43 -08:00
Jianxun Zhang
0c523b6661 anv: Use gralloc helper to get tiling
The helper gets tiling and modifier in a single step.
The later will be used in the coming changes.

Copy the changes introduced in
cf5c294df4.
Suggested-by: Juston Li <justonli@google.com>

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36825>
2025-12-09 14:16:42 -08:00
Jianxun Zhang
7dbff29de1 anv: Replace ANV_MAX_PLANES with ISL_MODIFIER_MAX_PLANES
As discussed in the reviews of cf5c294df4,
the 'plane' in this context means plane of a drm
modifier, so it makes sense to just use the new ISL
macro once it is available.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36825>
2025-12-09 14:16:42 -08:00
Jianxun Zhang
33074e3ebe isl: Add a macro for number of maximum planes of modifiers
We will need it in multiple places in the following changes.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36825>
2025-12-09 14:16:42 -08:00
Jianxun Zhang
fa8f98138a anv: And a new function to consolidate import paths
The new added function will be invoked on several paths
of importing Android native and hardware buffers.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36825>
2025-12-09 14:16:42 -08:00
Ian Forbes
4b63535d3c svga: Fix vertex-fallbacks Piglit test
This test was hitting an assert because gl_PrimitiveID is an input to the
FS that does not come from the VS which should be handled similar to
TGSI_SEMANTIC_FACE.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38834>
2025-12-09 21:49:21 +00:00
Ian Forbes
6beb92a0d4 svga: Enable GL_ARB_texture_mirror_clamp_to_edge
We've supported this via SVGA3D_TEX_ADDRESS_MIRRORONCE for years.
Lets enable it as it gets us slightly closer to GL 4.4.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38854>
2025-12-09 21:31:04 +00:00
Alyssa Rosenzweig
5ced623fdf nir: print nir_tex_instr::backend_flags if present
I was wondering where this was disappearing to.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38789>
2025-12-09 20:44:15 +00:00
Alyssa Rosenzweig
b5063953ca people: update Marek's email
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38789>
2025-12-09 20:44:15 +00:00
Dylan Baker
0735551b08 anv/video: Read the right source for memcpy
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I'm assuming this based off the `if` branch above, after reading the
code for bit that Coverity pointed out in that branch. It doesn't look
correct to start at the base pointer, which will be 0 initialized and
has 52 bits of zero padding, while the default values are 255.

Fixes: 314de7af06 ("anv: Initial support for VP9 decoding")
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38437>
2025-12-09 12:15:45 -08:00
Dylan Baker
26aba9dc9f anv/video: void cast array we intentionally read off the end of
Coverity notices we're reading off the end of the array here, which is
true. We also intend to do that because we want to read the next field as
well. Cast to a `void *` to help Coverity out.

CID: 1649593
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38437>
2025-12-09 12:15:35 -08:00
Benjamin Cheng
72b43c0595 radv/video: Always end ref pic modification list
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The app-provided arrays should always end with IDC_END, but when
overriding we need to end the list with IDC_END as well.

Fixes: 2e21eec921 ("radv/video: Fix num_ref_idx_l{0,1} related overrides")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14436
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38858>
2025-12-09 16:04:52 +00:00
Boris Brezillon
69a9ed4d9e panvk/csf: Use cs_vt_{start,end}()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Use the syntactic sugar for heap operations on the vertex/tiler queue.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38826>
2025-12-09 16:42:05 +01:00
Boris Brezillon
02b6942c91 panvk/csf: Make sure FINISH_FRAGMENTs are properly ordered
The spec requires FINISH_FRAGMENT calls to be issue in the exact same
order FINISH_TILING calls were, otherwise heap chunks that are still
used by in-flight IDVS/FRAGMENT jobs might be returned to the heap
leading to a UAF situation.

In order to guarantee FINISH_FRAGMENT ordering, we request the new
iterator scoreboard (the one to be used on the next RUN_FRAGMENT)
just before issuing our FINISH_FRAGMENT, and we select this next
iterator scoreboard as our signal scoreboard. This guarantees that the
next FINISH_FRAGMENT won't trigger until both the next RUN_FRAGMENT and
the current FINISH_FRAGMENT are done.

This new approach forces us to revisit the sequencing of our
issue_fragment() logic. Previously we were requesting a new scoreboard
before RUN_FRAGMENT, but now we're assuming the scoreboard has already
been claimed, either by the subqueue init logic (simple static assignment,
since all scoreboards are free at this time) or by the previous
issue_fragment() call.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38826>
2025-12-09 16:42:04 +01:00
Boris Brezillon
ff99e5289b panvk/csf: Prepare for more complex scoreboard transitions
Right now all we do is get the next available scoreboard, and set
it as the current iterator scoreboard, but the fragment queue is
about require something more involved to fix FINISH_FRAGMENT ordering
issue.

Provide a cs_iter_sb_update() block where everything between the
selection of a new scoreboard and the transition to this new
scorevoard is customizable. Implement cs_next_iter_sb() as a dummy
wrapper around this new construct.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38826>
2025-12-09 16:41:58 +01:00
Boris Brezillon
14391cc5c5 panvk/csf: Make sure we don't get the same iter SB assigned twice in a row
We are about to add sequences where we will do

	wait(cur_iter_sb),signal(next_iter_sb)

in some deferred operations. When that happens, the wait mask can't have
the signal sb set, otherwise the behavior is undefined.

On v11+, we have enough scoreboards to disallow the currently bound
endpoint SB from being returned on a NEXT_SB_ENTRY, so let's do that all
the time.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38826>
2025-12-09 16:41:47 +01:00
Boris Brezillon
ced586fabd pan/decode: Print defer mode in deferrable instructions
Knowing which defer mode is used is quite useful.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38826>
2025-12-09 16:41:47 +01:00
Boris Brezillon
97a10dfcae pan/cs: Rename cs_select_sb_entries_for_async_ops()
The name is misleading since it's only setting the endpoint scoreboard
on v11+. On v10, we shouldn't assume the "other" SB is always zero,
since we're passed the SB slot to use at init time (ls_sb_slot).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38826>
2025-12-09 16:41:47 +01:00
Boris Brezillon
728cd0d150 pan/cs: Fix bitop helpers
Source assignment is mixed up in some of them. While at it, make
source argument names consistent with the descriptor field names.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38826>
2025-12-09 16:41:47 +01:00
Boris Brezillon
afb66778d1 pan/cs: Fix cs_extract_tuple()
Fix cs_extract_tuple() and implement cs_extract{32,64}() as wrappers
around cs_extract_tuple().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38826>
2025-12-09 16:41:47 +01:00
Erik Faye-Lund
7b61b2eb61 docs/panfrost: remove some stray newlines
These were accidental when I split up the large article in to multiple
documents. Let's fix that up, so we don't end up repeating this for
future documents.

Fixes: 8248cc0bf4 ("docs/panfrost: move details to separate articles")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38738>
2025-12-09 15:18:39 +00:00
Pavel Ondračka
54ae9016a8 r300/ci: asan testing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36447>
2025-12-09 14:49:46 +00:00
Pavel Ondračka
2cca7d5d74 r300: fix contant remap table leak
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36447>
2025-12-09 14:49:46 +00:00
Pavel Ondračka
16ffa0a490 r300: fix locked_zbuffer leak
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36447>
2025-12-09 14:49:46 +00:00
Pavel Ondračka
31aea50093 r300: fix overflow in r300_draw_elements_immediate
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36447>
2025-12-09 14:49:46 +00:00
Pavel Ondračka
bf453aa004 r300: fix dummy_vs leak
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36447>
2025-12-09 14:49:46 +00:00
Zan Dobersek
f8363b8d25 driconf: use vk_dont_care_as_load workaround for Spilled!
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Unity's Vulkan backend used by Spilled! requires the vk_dont_care_as_load
workaround to achieve correct rendering. Observed on Turnip, in GMEM mode.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38863>
2025-12-09 07:48:32 +01:00
Calder Young
2fbc722dcf anv: Fix misplaced assertion in anv_scratch_pool_alloc
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Fixes: ee42a489 ("anv: Fix scratch pool buffer allocation sizes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38861>
2025-12-09 06:13:53 +00:00
Arcady Goldmints-Orlov
68bb5d9e49 kk: enable shaderClipDistance
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Since Metal doesn't pass clip distance into the fragment shader, we have to
do it ourselves. The CLIP_DIST0/1 varying slots are used to represent the
user-defined varyings we use to pass them from vertex to fragment and
a new intrinsic is added to represent the write to the built-in
clip_distance variable. Since the CLIP_DIST0/1 varying slots are not affected
by opt_varyings, there can be potential interface mismatches so the machinery
in msl_iomap.c is refactored to allow them to be output as a series of scalars
rather than vectors.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38839>
2025-12-08 23:09:53 -05:00
Aitor Camacho
6d6634e805 kk: Expose 4444 and ycbcr 2plane 444 formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Extensions:
- VK_EXT_4444_formats
- VK_EXT_ycbcr_2plane_444_formats

Features:
- formatA4R4G4B4
- formatA4B4G4R4
- ycbcr2plane444Formats

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38831>
2025-12-09 01:19:32 +00:00
Aitor Camacho
4a58046caa kk: Fix emulated format's swizzle
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38831>
2025-12-09 01:19:31 +00:00
Aitor Camacho
dd4a1a50f5 kk: Expose ASTC HDR formats
Extensions:
- VK_EXT_texture_compression_astc_hdr

Features:
- textureCompressionASTC_HDR

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38831>
2025-12-09 01:19:31 +00:00
Aitor Camacho
2112eb4aa4 kk: Match float formats to actual Metal features (union of Apple and Mac2)
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38851>
2025-12-09 01:02:52 +00:00
Aitor Camacho
d5b05d53e4 kk: Expose shaderImageGatherExtended
Limit gather offsets to hardware's limit [-8, 7].

Reviewed-By: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38846>
2025-12-08 23:49:01 +00:00
Yonggang Luo
9649eee307 meson: Use /Zc:enumTypes enables C++ conforming enum underlying type and enumerator type deduction
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The detail is at https://learn.microsoft.com/en-us/cpp/build/reference/zc-enumtypes?view=msvc-170

For example:

enum Enum {
    A = 'A',
    B = sizeof(A)
};

static_assert(B == 1); // previously failed, now succeeds under /Zc:enumTypes

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38639>
2025-12-08 22:47:13 +00:00
Rob Clark
6e3598177b freedreno/common: Add A840 and X2-85
Add support for A840 and X2-85.  Despite slice count, differences in
memory bus and clks, they are architecturally similar from the PoV of
the UMD.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:12 +00:00
Rob Clark
11364f4ee2 freedreno: gen8 support
Enable gen8 support.  Sysmem, gmem, and binning work.  DEQP gles2/3/31
tests are passing.

LRZ is not supported yet, and will follow later.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:12 +00:00
Rob Clark
469a19f66b freedreno/computerator: gen8 support
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:12 +00:00
Rob Clark
46dd4b166e freedreno/a6xx: Fix VSC_BIN_SIZE for gen8
It was missed that this register changed for larger bin sizes.   Use a
common bitset for all related gen8 regs, and change the field names for
earlier gens to match so the generated register packers dtrt.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:12 +00:00
Rob Clark
237e93aa45 freedreno/a6xx: Add gen8 query support
The RBBM_PIPESTAT_x regs moved around.  Re-work how we figure out the
appropriate reg offset to take this into account by using the templated
reg packers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:12 +00:00
Rob Clark
e15ac3b043 freedreno/a6xx: Drop log_pipeline_stats()
This was useful when we didn't have docs and had to figure out which
counter was which.  That is no longer an issue.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:12 +00:00
Rob Clark
a818287fd6 freedreno/registers: gen8 support
Co-developed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:11 +00:00
Rob Clark
6c39336f2f freedreno/registers: More gen8 prep
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:11 +00:00
Rob Clark
01041c858e freedreno/a6xx: Handle tess_bo size differences for gen8
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:10 +00:00
Rob Clark
222c005c01 freedreno/fdl: Fix gen8 buffer depth
Seems we need to program it to 1, otherwise all ssbo writes (and reads?)
end up in index 0.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:10 +00:00
Rob Clark
5310672706 freedreno/fdl: Fix gen8 TEX_LINE_OFFSET
It is in units of bits.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:10 +00:00
Rob Clark
4f6076f531 freedreno/registers: Add TPL1_MODE_CNTL bitfields
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:09 +00:00
Rob Clark
be6c181ae6 freedreno/registers: Fix gen8 UBWC array pitch
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:08 +00:00
Rob Clark
5c98f110da ir3: Add new cat3 instructions
b13 encodes alternate opcode meanings for new instructions with
otherwise the same encoding (ie. src precision implied by opc).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:08 +00:00
Rob Clark
aadd1dabde ir3: dp2acc is removed in gen8
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:08 +00:00
Rob Clark
9d3102048e ir3: Add new cat2 instructions
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:07 +00:00
Rob Clark
937625c391 ir3: Fix gen8 ldc encoding
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:06 +00:00
Rob Clark
e53c605adf ir3: Add mova.r encoding
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:06 +00:00
Rob Clark
688d62381c ir3: Use ldc.u in preamble
r63.u isn't a shared reg, so we weren't setting the .u bit on ldc.  But
in a preamble, we should be.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:05 +00:00
Rob Clark
d146a31ee1 ir3: Add mova .u bit
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:05 +00:00
Rob Clark
4bc01d11b0 ir3: Add cat3 flut src encoding
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:05 +00:00
Rob Clark
c35b5f9726 ir3: Add cat3 alt immed encoding
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:04 +00:00
Rob Clark
1c7c4b4807 ir3: Add cat1 (sat) bit
Appears to be present at least as far back as gen7.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:04 +00:00
Rob Clark
69e0536203 ir3: Add (eostsc)
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:03 +00:00
Rob Clark
fa5be473b8 ir3: Add disasm test macro for gen8
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:03 +00:00
Rob Clark
189e494249 ir3: Add (sy) before end of preamble when necessary
We need to ensure GPR writes completes before the end of the preamble
to avoid writes landing after another preamble has already started.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:02 +00:00
Rob Clark
a48e4b8340 ir3: Extract out helper for nop flags
Extract out a helper to add a flag to a nop, potentially re-using a
previous nop where possible.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:01 +00:00
Rob Clark
d1df3b4e39 ir3: Limit CS lock/unlock quirk
We don't need this universally for everything >= gen7.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:01 +00:00
Rob Clark
e00bff2513 ir3: Fix cat3 latency
The rule about only needing two cycles for 3rd src of cat3 instructions
only applies to variants of mad.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:01 +00:00
Rob Clark
02a4cc622d ir3: Fix gen8 instruction timings
non_alu is still 6.  But AFAICT none of this changes since a7xx so these
were probably wrong on a7xx as well.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:01 +00:00
Rob Clark
3e7f200e1f ir3: Skip non-bindless ldc warmups
Non bindless UBOs are pushed in cmdstream, so warmup instructions should
be unnecessary.  And cause hangs on gen8.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:01 +00:00
Rob Clark
d3e479b5c5 freedreno/registers: Fix gen8 swizzle enum
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:00 +00:00
Rob Clark
39bf9c0222 freedreno/registers: pm4 updates for gen8
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:00 +00:00
Rob Clark
fa45a48843 freedreno: Add gen8 chip template-fu
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:00 +00:00
Rob Clark
d786b6ad3e freedreno/drm-shim: Add a830
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:59 +00:00
Rob Clark
49c2271f26 freedreno/common: Add placeholder a8xx device
Enough to have a gpu-id so that cffdump, disasm tests, etc, function.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:59 +00:00
Rob Clark
aa112be635 freedreno/common: Make max tile dimensions a param
This value may differ between SKUs within a given generation.  So make
them parameters.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:59 +00:00
Rob Clark
96d6755e1f freedreno: Add gen8 device info
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:58 +00:00
Rob Clark
cb4a1134a9 freedreno/event: Extend event helpers for gen8
There are some new events, but existing ones look the same.  So I think,
at least for now, we can keep the same table for gen7 and gen8.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:58 +00:00
Rob Clark
f35867686d freedreno/lrz: Extend lrz fc helpers for gen8
The FC RAM is the same size as gen7.  Tbd if the metadata is also the
same.  So far we aren't enabling LRZ on gen8 yet, but need to do
something to make the compiler happy, so treat gen8 as it was the same
as gen7.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:58 +00:00
Rob Clark
ce4373ede5 freedreno/registers: Extend ncrb builder for new gens
We want to use the A7XX version for anything CHIP>=A7XX.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:58 +00:00
Rob Clark
b5d307ef03 freedreno: Add chip range template helpers
The c++ syntax for this isn't pretty.  But it is something we need in a
few places, so add some macros to hopefully make things easier on the
eyes.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:58 +00:00
Rob Clark
bcf4c8893c freedreno/registers: Fix GRAS_LRZ_CNTL definition
Two fields moved to GRAS_LRZ_CNTL2 on a7xx+.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:57 +00:00
Rob Clark
f47c3d554b freedreno/registers: Name HYSTERESIS regs
It looks like we'll need to program them for gen8.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:57 +00:00
Rob Clark
843ec5dbe7 freedreno/registers: Name RB_LRZ_CNTL2
We'll need this for LRZ flush sequence on gen8

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:56 +00:00
Rob Clark
5c1bcaca24 freedreno/registers: Rename SP_HLSQ_MODE_CNTL
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:55 +00:00
Rob Clark
30a0ac7c0f freedreno/registers: Fix a few field names
Give proper names to a few bitfields that we were already using.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:54 +00:00
Rob Clark
ccdd5eb49d freedreno/decode: Add extra indent levels
Now we start hitting an extra indent level.

Fixes: d7db333b0e ("freedreno/decode: Add gen8 support")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:53 +00:00
Rob Clark
e7a01c9c23 freedreno/decode: Print mode for compute shaders
Similar to draw packets, it is useful to be able to see the mode and
pipe.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:53 +00:00
Rob Clark
c026a8f105 freedreno/decode: Fix bindless descriptor dumping
We shouldn't be trying to calculate an offset from the bindless base reg
we looked up, as it already contains the array index.

We could lookup the index 0 reg offset, and calculate an offset from
there, but that breaks when the registers are not consecutive.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:52 +00:00
Rob Clark
f64e4a6d3e freedreno/a6xx: Fix debug comment
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:52 +00:00
Rob Clark
8480f32cfa freedreno/a6xx: Add helpers for preamble const loads
Consolidate the logic about which path to take in one place.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:51 +00:00
Rob Clark
bafcdbf375 freedreno/a6xx: Add helper to set render mode
Make it less awkward to deal with gen6/7 vs gen8 differences.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:51 +00:00
Rob Clark
b1218926bc freedreno/a6xx: Actually use lrz fast clear
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:50 +00:00
Rob Clark
d30a14b726 freedreno/a6xx: Be more precise about CP_SET_MARKER
Set the mode before we start emitting registers.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:50 +00:00
Rob Clark
e0b6f97b9c freedreno/a6xx: Split preamble for gmem vs sysmem
Possibly overkill currently, if we only preempt on bin boundaries.  But
might as well be complete in case that ever changes on the kernel side.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:49 +00:00
Rob Clark
701eb1ce8d freedreno/a6xx: Emit RB buffer setup for sysmem too
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:49 +00:00
Rob Clark
4ca78a296f freedreno/a6xx: Rework where we emit ccu cache cntl
We don't need to re-emit it each tile.  But we do need to setup the
preemption to restore us to GMEM mode in case we get preempted on a tile
boundary.

While we are at it, rename the function to something more sensible.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:48 +00:00
Rob Clark
2439606518 freedreno/a6xx: Drop fd6_emit_blit()
Now that we've corrected the event name (ie. CCU_RESOLVE to trigger the
resolve/unresolve engine) the helper name made less sense.  And it
doesn't really add any value.  So drop it.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:48 +00:00
Rob Clark
d7850b26b6 freedreno/a6xx: Drop emit_marker6()
For a6xx+ devcoredump+crashdec does a good job in finding the CP
position on a crash.  I don't really use the scratch regs for this
purpose anymore.  So lets just drop this.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:47 +00:00
Rob Clark
791cb33da5 freedreno/a6xx: Pass cs to fd6_clear_lrz()
Make it more obvious that all the clears go in the prologue.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:47 +00:00
Rob Clark
1a22daa157 freedreno: More ergonomic cs casting
Make it less awkward to bridge back to legacy cmdstream builder.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:46 +00:00
Rob Clark
a24f3efd98 freedreno/a6xx: Add RB_DBG_ECO_MODE helper
Avoid sprinkling the logic for blit vs non-blit values everywhere.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:46 +00:00
Rob Clark
56015d8cd9 freedreno/decode: Drop summary override for CRB
It is just normal reg writes, we shouldn't handle it specially or
surpress summary state if enabled.  In summary mode we shouldn't print
each individual register write, but just show the values at draw/etc
time.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:45 +00:00
Rob Clark
b8fd1e2f7c freedreno/a6xx: genx helper for additional template param
In a few cases we have a 2nd template param.  Add a helper for this so
adding new gens is less awkward.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:44 +00:00
Rob Clark
fb6dccc64c freedreno: flip template param order
Prep for next patch.  We need the per-gen CHIP template param to be
last.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:44 +00:00
Rob Clark
b2349354e3 freedreno/a6xx: Use with_crb() helper
Small cleanup that was missed when introducing the helper.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:44 +00:00
Rob Clark
392293ce48 freedreno/a6xx: Move VFD_RENDER_MODE emit
The other two regs with RENDER_MODE fields are already part of
set_bin_size().

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:43 +00:00
Rob Clark
9e0942d4d9 freedreno/registers: Move FLAGS_REGID
This field is only in SP_GS_OUTPUT_CNTL, and not the other regs that
re-use the same bitset.  So move it there.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:43 +00:00
Rob Clark
6233b5d841 freedreno/registers: Event cleanups
Cleanup variants ranges, and in a couple cases rename events to match
docs.  In some cases events are marked valid thru A5XX, simply to
indicate that they were removed at some unknown point before A6XX.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:42 +00:00
Rob Clark
eeaf438911 freedreno/registers: Convert events to hex
To match internal docs.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:40 +00:00
Rob Clark
74e77ce6a4 freedreno/crashdec: Log IBs to snapshot
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:39 +00:00
Rob Clark
8c372e8617 freedreno/crashdec: Dump cmdstream at end
With gen8 we need to decode more sections before we have enough CP reg
vals to decode cmdstream.  So simplify things by just moving it to the
end.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:11:39 +00:00
Danylo Piliaiev
40b21f115d tu: Add custom resolve tracepoints
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: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38451>
2025-12-08 20:44:47 +00:00
Connor Abbott
520e3f3a47 tu: Implement VK_EXT_custom_resolve
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38451>
2025-12-08 20:44:46 +00:00
Connor Abbott
ad84ae2719 tu: Implement VK_QCOM_subpass_shader_resolve
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38451>
2025-12-08 20:44:46 +00:00
Connor Abbott
7691f1b70d ir3: Support addr0 align of 8
At this point it isn't actually an alignment, but we need to multiply by
8 now because there are 2 vec4's per view for FDM driver params.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38451>
2025-12-08 20:44:45 +00:00
Connor Abbott
bd821b9a17 nir, tu: Add and use load_frag_coord_gmem_ir3
We used load_frag_coord_unscaled_ir3 for loading the fragment coord for
input attachments in GMEM, where the normal scaling for gl_FragCoord
shouldn't be used. However with custom resolve a different scaling will
apply to attachments in GMEM. Separate "unscaled" from "gmem" and rename
the NIR options, in preparation for this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38451>
2025-12-08 20:44:45 +00:00
Connor Abbott
cd1e784148 tu: Fix FragCoord offset when HW viewport offset is enabled
FragCoord seems to have the offset applied to it, so we don't need to
subtract it out. Fixes upcoming test
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.custom_resolve.monolithic.fdm_nonsubsampled_multiview_with_offset.

Fixes: b34b089ca1 ("tu: Use GRAS bin offset registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38451>
2025-12-08 20:44:45 +00:00
Connor Abbott
b2c685af42 tu: Fix GRAS_BIN_FOVEAT* programming with more than 1 layer
Similar to when patching load/store coordinates, we have to convert the
layer to the view, splatting view 0 to all layers when there is more
than 1 layer and FDM-per-layer is not enabled.

Fixes upcoming new test
dEQP-VK.renderpasses.*.custom_resolve.*.fdm_nonsubsampled_multilayer_with_offset.

Fixes: b34b089ca1 ("tu: Use GRAS bin offset registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38451>
2025-12-08 20:44:45 +00:00
Calder Young
ee42a48984 anv: Fix scratch pool buffer allocation sizes
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38840>
2025-12-08 20:09:57 +00:00
Yiwei Zhang
2de8981351 nir: suppress clang warnings for cooperative matrix lowering
This suppresses below compile warnings:
- warning: variable 'idx' is used uninitialized whenever 'if' condition
  is false [-Wsometimes-uninitialized]

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38835>
2025-12-08 19:36:05 +00:00
Natalie Vock
6d799ac283 aco: Add pass for spilling call-related registers
This is a post-RA pass that tracks registers that are preserved by the
ABI, but clobbered by shader code. The pass inserts scratch spills and
reloads in appropriate locations to ensure the register values at the
end of the shader are the same as they were at the start.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:55 +00:00
Natalie Vock
93a5919cee aco/util: Add aco::unordered_set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:55 +00:00
Natalie Vock
0cfabe0613 aco/lower_to_hw_instr: Add scratch size in call lowering
We did this in the preserved spiller previously, but let's move it here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:55 +00:00
Natalie Vock
7059068b61 aco/spill: Restore registers spilled by call immediately
Makes for better latency hiding if we're not short on registers
otherwise.

On top of RT function calls:
Totals from 7 (0.01% of 81072) affected shaders:

Instrs: 9084 -> 8980 (-1.14%)
CodeSize: 52564 -> 51976 (-1.12%)
SpillSGPRs: 244 -> 248 (+1.64%); split: -3.28%, +4.92%
SpillVGPRs: 360 -> 367 (+1.94%)
Latency: 138989 -> 135669 (-2.39%); split: -2.49%, +0.10%
InvThroughput: 35120 -> 35301 (+0.52%); split: -0.06%, +0.57%
VClause: 258 -> 241 (-6.59%)
SClause: 116 -> 117 (+0.86%)
Copies: 1290 -> 1311 (+1.63%)
Branches: 131 -> 119 (-9.16%)
VALU: 6125 -> 6143 (+0.29%); split: -0.20%, +0.49%
SALU: 920 -> 913 (-0.76%); split: -0.98%, +0.22%
VMEM: 1026 -> 989 (-3.61%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:55 +00:00
Natalie Vock
6616f25e43 aco/spill: Create linear VGPRs for spilling ABI-preserved SGPRs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:55 +00:00
Natalie Vock
6b2e766617 aco/ra: Handle linear VGPRs allocated by p_startpgm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:54 +00:00
Natalie Vock
761efe9163 aco/spill: Reset scratch_rsrc on calls
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:54 +00:00
Natalie Vock
369a3c0dca aco/spill: Handle calls
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:54 +00:00
Natalie Vock
ecc548cd37 aco: Record required call spills during live-var analysis
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:53 +00:00
Natalie Vock
8bc5fdef53 aco: Remove unused p_reload_preserved def
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38281>
2025-12-08 19:12:52 +00:00
Natalie Vock
8b7ad622ee aco/live_var_analysis: Count linear VGPRs as always preserved by calls
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37907>
2025-12-08 18:50:31 +00:00
Natalie Vock
f692ac76ca radv/rt: Use traversal vars for object origin/direction in ahit/isec
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We already did the work of transforming the ray data, no need to do it
multiple times.

Should theoretically be a lot better. However, none of the fossils
appear to use object-space ray data in anyhit/intersection shaders. :(

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38809>
2025-12-08 18:29:49 +00:00
Natalie Vock
a488203e85 radv/rt: Refactor and split radv_nir_rt_shader.c
This splits up radv_nir_rt_shader.c into several parts.
The first part is all ray traversal lowering for RT pipelines, located
at radv_nir_rt_traversal_shader.c. It implements building the traversal
loop, including inlined any-hit/intersection shaders (optionally as a
completely separate shader).

The second part is lowering for individual RT stages (right now,
monolithic vs. CPS-style separate compilation). Each lowering technique
lives in its own file (radv_nir_rt_stage_{monolithic,cps}.c).

Code shared between RT lowering techniques (shader inlining helpers and
storage lowering passes) gets moved into radv_nir_rt_stage_common.c.

One header, radv_nir_rt_stage.h, is the public interface for RT pipeline
stage lowering. Functions exposed to users (really just
radv_pipeline_rt.c) go there. The header for internal shared helpers is
radv_nir_rt_stage_common.c.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38809>
2025-12-08 18:29:49 +00:00
Ashley Smith
5681fabdc2 panfrost,panvk: Enable shader_realtime_clock on panthor 1.6
shader_realtime_clock requires a newer kernel version in order to enable
GLB_COUNTER_EN this change adds a check on this kernel functionality.

Remove GL_EXT_shader_realtime_clock from extensions as this now depends
on kernel version.

Fixes: e9c2c324 ("panvk: enable VK_KHR_shader_clock")
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37915>
2025-12-08 17:58:52 +00:00
Jesse Natalie
7130127e2a dzn: Suppress new MSVC warning by upconverting to uint64_t
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38838>
2025-12-08 17:28:36 +00:00
Jesse Natalie
55e833ae96 mesa: Cast bitmasks to 64-bit before negating
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38838>
2025-12-08 17:28:36 +00:00
Jesse Natalie
71dfcd3c96 zink: Fix 64-bit bitmask usage
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38838>
2025-12-08 17:28:36 +00:00
Jesse Natalie
dacc56ee53 u_threaded_context: Use 64-bit bitmask utils
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38838>
2025-12-08 17:28:36 +00:00
Valentine Burley
d966fde4f4 ci: Drop hardware-job prerequisite check jobs
Stop requiring the `rustfmt` and `yaml-toml-shell-py-test` jobs before
starting hardware jobs.
These prerequisites don't save meaningful resources, as the hardware jobs
are well-behaved nowadays, but they do create unnecessary friction for
users.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14409
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38786>
2025-12-08 16:59:45 +00:00
Janne Grunau
f912db3f8d util/driconf/asahi: Override GL renderer for web browsers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Several web sites block clients with "Apple" in the WebGL renderer
string if the reported OS is not one of Apple's.
This check seems to implemented via a 3rd party product which is slowly
rolled out over more web sites. Instead of playing whack-a-mole with
web sites in multiple browsers override the OpenGL renderer in mesa for
known browsers.

Backport-to: 25.3
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38845>
2025-12-08 16:23:54 +00:00
Patrick Lerda
6246b7be10 r600: improve cayman scissor 1x1 workaround
This change improves evergreen_apply_scissor_bug_workaround().
It provides a fully functional workaround for cayman.

Note: this was the last functionality which was working
properly on evergreen but not on cayman.

Here are the tests fixed:
spec/arb_framebuffer_no_attachments/arb_framebuffer_no_attachments-atomic/glscissor: fail pass
spec/arb_framebuffer_no_attachments/arb_framebuffer_no_attachments-query/glscissor: fail pass
deqp-gles31/functional/fbo/no_attachments/interaction/1x1ms0_default_2048x2048ms4: fail pass
deqp-gles31/functional/fbo/no_attachments/npot_size/1x1: fail pass

Fixes: 87a5b07f90 ("gallium/radeon: add R600/Evergreen/Cayman support to common viewport code")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38743>
2025-12-08 15:04:24 +00:00
Georg Lehmann
7f6bd8b003 nir/peephole_select: allow mbcnt_amd
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's just alu, so handle it like alu.

Foz-DB Navi21:
Totals from 3 (0.00% of 97591) affected shaders:
Instrs: 433 -> 426 (-1.62%)
CodeSize: 2408 -> 2388 (-0.83%)
Latency: 7520 -> 7925 (+5.39%)
InvThroughput: 857 -> 1009 (+17.74%)
Copies: 55 -> 43 (-21.82%)
Branches: 21 -> 17 (-19.05%)
SALU: 79 -> 76 (-3.80%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38828>
2025-12-08 10:52:48 +00:00
Georg Lehmann
005cc4110c nir/peephole_select: allow ballot
We can allow collapsing control flow around ballot if we update the ballot
condition like we do for discards.

ballot_relaxed needs no condition update, as the result bits are undefined
for inactive invocations.

Foz-DB Navi21:
Totals from 27 (0.03% of 97591) affected shaders:
Instrs: 2554506 -> 2554469 (-0.00%); split: -0.00%, +0.00%
CodeSize: 13765636 -> 13765684 (+0.00%); split: -0.00%, +0.00%
Latency: 14186667 -> 14186861 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 3542516 -> 3542595 (+0.00%); split: -0.00%, +0.00%
SClause: 52038 -> 52030 (-0.02%)
Copies: 209410 -> 208763 (-0.31%)
Branches: 83716 -> 83399 (-0.38%)
PreSGPRs: 2372 -> 2386 (+0.59%); split: -0.17%, +0.76%
VALU: 1701458 -> 1701482 (+0.00%)
SALU: 369884 -> 370107 (+0.06%); split: -0.00%, +0.07%
SMEM: 67643 -> 67634 (-0.01%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38828>
2025-12-08 10:52:48 +00:00
Georg Lehmann
077b654cc7 nir: don't sink alu that uses ballot(true)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Don't sink alu that uses ballot(true), as that can a local system value
and moving the alu then requires a new mov in the old location.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38829>
2025-12-08 09:07:54 +00:00
Dave Airlie
96662cd459 nak/cmat: free the type mapping hash table.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Just noticed this on review.

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38843>
2025-12-08 08:08:56 +10:00
Romaric Jodin
6b67ca2e8f pan/bi: Keep vectorized phis
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
When the source contains vectorized phis, keep them to avoid
generating unnecessary moves.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38772>
2025-12-06 07:22:47 +00:00
Faith Ekstrand
d3a890a58e pan/bi: Handle small vectors in bi_src_index()
bit_size <= 32 does not actually guarantee a single component, which
nir_src_as_uint() requires.  We could just check num_components == 1 but
it's easy enough to support any vector that fits in 32 bits.

Cc: mesa-stable
Reviewed-by: Romaric Jodin <rjodin@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38772>
2025-12-06 07:22:47 +00:00
Marek Olšák
a051d4ee6b nir/lower_io_vars: don't insert output stores for unrelated streams before emits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Before every emit_vertex(stream_id = n), we would insert stores for all
outputs, including outputs that are not meant for that stream.
Those stores would end up having no effect while potentially reducing
performance.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38100>
2025-12-06 02:27:46 +00:00
Jesse Natalie
0ac9ccb4b4 d3d12: Only try to compute scaled point size for stream 0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38100>
2025-12-06 02:27:46 +00:00
Arcady Goldmints-Orlov
0df8aa940c nir: Use nir_shader_intrinsics_pass in nir_lower_io_to_scalar
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38816>
2025-12-05 22:30:22 +00:00
Val Packett
e9ad86db08 tu: support driconf option force_vk_vendor
Some games refuse to start with an unknown (to them) GPU vendor. Enable
the usual way to override the vendor ID in this driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38795>
2025-12-05 22:05:35 +00:00
Marek Olšák
c0e6b0aca0 zink/ci: update fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:41 +00:00
Marek Olšák
ae36b9e345 radeonsi: enable 64K x 64K textures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:41 +00:00
Marek Olšák
6feb3e49f8 st/mesa: remove bogus framebuffer state assertions
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
f46b6042ab radeonsi: allow 64K viewports
max_hw_screen_offset was incorrect

Acked-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
f6bf120d02 radeonsi: reject textures that don't fit in the CPU address space
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
566c666d57 radeonsi: fix a few non-critical 64-bit integer overflows
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
07d2ab29b6 st/mesa: disallow the PBO upload fragment shader
It passes image_size to the shader as int32_t.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
bd839d4bfc st/mesa: don't use the PBO GetTexImage compute shader for 64K textures
I uses uint16_t for width/height.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
72a14518ae mesa: raise MAX_TEXTURE_LEVELS to 17 to allow 64K mipmap textures
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
610bdf5e9e mesa: bump MAX_TEXTURE_RECT_SIZE, MAX_RENDERBUFFER_SIZE
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:40 +00:00
Marek Olšák
24ba57259f mesa: remove MaxTextureMbytes, use the cap instead
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:39 +00:00
Marek Olšák
00f5f0980a mesa: use size_t for image address computations
For 64K x 64K textures.

The regular expressions used to find potentially overflowing multiplications:
    (width.*\*.*height|height.*\*.*width|stride.*\*.*height|height.*\*.*stride|row.*\*.*height|height.*\*.*row)
    (height.*\*.*depth|depth.*\*.*height|size.*\*.*depth|depth.*\*.*size)

A few things were authored by Pierre-Eric using static analysis to
detect potential overflows.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:39 +00:00
Marek Olšák
3dc2582172 mesa: merge mostly duplicated mesa_format_image_size & mesa_format_image_size64
One of them returned 32 bits, the other one returned 64 bits.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:38 +00:00
Marek Olšák
6507e8ec65 mesa: remove unused make_null_texture
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:37 +00:00
Marek Olšák
4fba07f74e mesa: remove unused mesa_store_cleartexsubimage, _mesa_store_compressed_teximage
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:37 +00:00
Marek Olšák
30b5d5f9b3 mesa: remove unused _mesa_total_texture_memory
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Pierre-Eric Pelloux-Prayer
88b6e46ee3 mesa: remove unused image debug code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Marek Olšák
4529693e72 gallium/u_blitter: change width/height parameters to 32-bit integer
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Marek Olšák
7621b2d56d gallium: declare pipe_resource::height0 as 32-bit integer for 64K textures
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Marek Olšák
3c6477812e gallium: change pipe_framebuffer_state width/height to 32-bit integer
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:36 +00:00
Marek Olšák
bc1a6b0a41 gallium: change pipe_scissor_state to 32 bit integer
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:35 +00:00
Marek Olšák
832594bbe2 panfrost: don't expose 32K textures because st/mesa doesn't support them
st/mesa only supports 16k for renderbuffers and rectangle textures,
and increasing that to 32k breaks panfrost.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:34 +00:00
Marek Olšák
193e494e6a iris: add struct iris_scissor_state because pipe_scissor_state will be changed
to use 32-bit integer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
2025-12-05 21:22:34 +00:00
Utku Iseri
5c63446b94 panfrost: add earlyzs FPK condition for v6-
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
While v7+ checks this on HW, older architectures depend on SW to do it.

Fixes: c43882ad54 ("panfrost: Allow pixels using discard to be killed")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38522>
2025-12-05 19:08:30 +00:00
Utku Iseri
43c06b5a7a panvk: set allow_forward_pixel_to_be_killed for draws
Setting this flag is valid as long as the fragment shader doesn't have
any side effects on v7+. v6 requires an extra check for earlyzs.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38522>
2025-12-05 19:08:30 +00:00
Job Noorman
a071e91725 ir3/legalize: run dbg nop/sync sched later
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Running nop sched before opt_jump runs into issues because at that
point, we might have branches like this:

getone x
jump y

which becomes this after nop sched:

(rpt5)nop
getone x
(rpt5)nop
jump y

and then opt_jump may remove the jump leaving the block without a
terminator. This in turn causes ir3_calc_reconvergence to calculate (jp)
incorrectly.

Sync sched is fine but let's keep the two together.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38833>
2025-12-05 18:46:16 +00:00
Nick Hamilton
a4b6158260 pvr: Fix missing frees in error exit paths
Fix for deqp:
  dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38827>
2025-12-05 17:35:35 +00:00
Nick Hamilton
ca1916804e pvr: Fix staging buffer realloc usage
Fix for deqp:
  dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38827>
2025-12-05 17:35:35 +00:00
Eric R. Smith
8d39ce7bce panfrost: add benchmarking documentation
Add some notes on getting reproducible benchmark numbers on
panfrost/panthor based SoCs.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38584>
2025-12-05 17:27:47 +00:00
Yiwei Zhang
d5bf0b0df7 pan: fix pan_blend_reads_dest to consider special min/max funcs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The min/max funcs are designed to operate solely on the source and
destination colors directly, without any scaling or multiplication by a
factor.

Test: dEQP-GLES3.functional.fragment_ops.blend.* pass with enabled FPK

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38824>
2025-12-05 16:26:12 +00:00
Aleksi Sapon
ea77f60c0e llvmpipe, virgl: update CI traces
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
cc1c0b7cf4 llvmpipe: lerp rounding test
Validate the results from the three previous commits.

Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
9745aab4cd llvmpipe: fix 64bit unpack on x86
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
c200b18e87 llvmpipe: use half-even rounding in lerp
This fixes a biases in texture linear sampling,
which can be very noticeable when strong lighting
is applied on mipmapped textures generated at
runtime using successive linear blitting.

More bits aren't actually needed for lerp and the
intrinsic rounding is wrong, so it is removed in
favour of a correct uniform codegen.

Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
34b34c2462 llvmpipe: use half-even rounding in norm and fixed mul
The accumulation of biased results leads to images
that are slighly too bright or dark. This is particularly
noticeable in specular highlights, which magnify errors
a lot.

Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aleksi Sapon
4f3de8b956 llvmpipe: doc fixes
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
2025-12-05 15:45:53 +00:00
Aitor Camacho
0104b3df41 kk: Expose shader storage image read/write without format
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Features:
- shaderStorageImageReadWithoutFormat
- shaderStorageImageWriteWithoutFormat

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38791>
2025-12-05 09:06:18 +00:00
Eric R. Smith
3ce6bcb9e8 panfrost: do not allow skipping of fragment shader when alpha-to-coverage
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When alpha to coverage is enabled we cannot allow the fragment shader to
be skipped, because the calculated alpha result is essentially a side
effect (it can cause some samples to be discarded).

This brings the OpenGL driver in line with panvk, which already has this
check in its version of fs_required().

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38794>
2025-12-05 07:55:21 +00:00
Marek Olšák
53014c0c1a winsys/amdgpu: protect driver stats changes by a mutex
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
64-bit reads are atomic (except 32-bit arch), but + and - require locking
or atomics, but 32-bit arch doesn't support 64-bit atomics.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38798>
2025-12-05 03:35:37 +00:00
Marek Olšák
0724428d55 winsys/amdgpu: retry the CS ioctl on -ENOMEM only if GDS OA is used
It's not needed otherwise.

The loop was also duplicated. This removes the second one.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38798>
2025-12-05 03:35:36 +00:00
Tomoki Imai
f56e70f230 lavapipe: Support VkDrmFormatModifierPropertiesList2EXT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This change add support VkDrmFormatModifierPropertiesList2EXT to
lavapipe driver. Previously VkDrmFormatModifierPropertiesListExt is
already supported and returns a list with one element but
VkDrmFormatModifierPropertiesList2EXT returns a empty list.

A lack of VkDrmFormatModifierPropertiesList2EXT becomes an issue
especially when the Vulkan Validation layers is enabled, it internally
uses VkDrmFormatModifierPropertiesList2EXT to confirm the
drmFormatModifierTilingFeatures is compatible to VkImageUsageFlagBits.
Without this patch it detects that the image is not compatible and
outputs warnings.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14414
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38822>
2025-12-05 01:45:56 +00:00
Job Noorman
0574bfd5f4 tu: add UBO lowering workaround for Yooka-Laylee
A vertex shader performs OOB UBO reads causing vertex corruption.
Disable UBO to const lowering to force bounds checking which fixes the
corruption.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38781>
2025-12-05 00:19:46 +00:00
Emma Anholt
66b157095c nir/shader_bisect: Allow passing in a --lo / --hi to continue a run.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Sometimes you fumble an answer, and would like to not restart from the
beginning (or just want to see the behavior of the script late in the run
if you're debugging it).  Pass in the last bad range, and you can keep
going.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38760>
2025-12-04 22:47:25 +00:00
Emma Anholt
4287bb761e nir/shader_bisect: Fix C code printing after review feedback changes.
When I added in the printed-shader and env var value both being tracked in
shaders[], it broke the C printing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38760>
2025-12-04 22:47:25 +00:00
Emma Anholt
fd6489c026 tu: Drop emitting of deprecated packing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:12 +00:00
Emma Anholt
ab6b2e4663 freedreno/registers: Restore reg definitions required by kernel.
Fixes missing bitset defines, introduced by bfdccc7563
("freedreno/registers: Mark functions as constexpr where possible").

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:12 +00:00
Emma Anholt
a001867e45 freedreno/registers: Simplify a bit of reg printing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:11 +00:00
Emma Anholt
b69f53816c freedreno/registers: Apply autopep8 to gen_header.py.
Nonstandard indentation was making my editor furious.  No changes needed
to be brought over from kernel 6.18 before I did.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:11 +00:00
Emma Anholt
09e758bcd0 tu: Convert remaining tu_cs_emit_pkt4()s to avoid deprecated reg definitions.
We can just pack a dummy value and pull the reg out of it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:10 +00:00
Emma Anholt
54652a4c39 tu: Use non-deprecated reg packing for RB_CLEAR_TARGET().
It only has the one variant, so no need to template the function yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:10 +00:00
Emma Anholt
c8abe7f3db tu: Pass around the new packing struct for GRAS_LRZ_CNTL.
This way we can use non-deprecated reg packing, and get the proper 8xx
register offset.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:10 +00:00
Emma Anholt
a3740003c2 tu: Use appropriate variant for HLSQ regs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:10 +00:00
Emma Anholt
7e027d5672 tu: Use proper reg packing in another place.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:10 +00:00
Emma Anholt
dae582ecc1 tu: Use appropriate variants for SP regs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:09 +00:00
Emma Anholt
298237b362 tu: Use appropriate variants for other GRAS regs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:09 +00:00
Emma Anholt
69cf144144 tu: use non-deprecated packing for GRAS_CL_ARRAY_SIZE.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:08 +00:00
Emma Anholt
c5bb86c8df tu: Use non-deprecated packing for SP_DITHER_CNTL.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:07 +00:00
Emma Anholt
08e17ff222 tu: Use a register pack for VPC_VARYING_LM_TRANSFER_CNTL_DISABLE[].
Prep for dropping deprecated pack support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:07 +00:00
Emma Anholt
6d8f08a678 tu: Use appropriate variants for GRAS_SU regs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:07 +00:00
Emma Anholt
7eb24634c3 tu: Only emit GRAS_SU_RENDER_CNTL and SP_RENDER_CNTL on >=a7xx.
These leaked into a6xx in c166c5100b ("tu/a750: Basic a750 support"),
and were caught by moving to the modern reg packing.  Emits the right GRAS
register for 8xx now, too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:06 +00:00
Emma Anholt
4aec44ea91 tu: Use appropriate chip variants for RB regs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:06 +00:00
Emma Anholt
247a0389d6 tu: Use appropriate chip variants for A2D reg packing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:05 +00:00
Emma Anholt
5d4598199e tu: Use appropriate chip variants for CONSERVATIVE_RAS_CNTL.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:05 +00:00
Emma Anholt
907dfeb732 tu: Use appropriate chip variants in PS setup.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:04 +00:00
Emma Anholt
b38bd7f868 tu: Use appopriate chip variants in SC scissor/viewport reg packing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:04 +00:00
Emma Anholt
249680b508 tu: Use appropriate chip variants for SP_CS reg packing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:03 +00:00
Emma Anholt
002fc56a0c tu: Use appropriate chip variants for VPC/PC reg packing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:03 +00:00
Emma Anholt
8ed98f7429 tu: Use appropriate chip variants for SC_BIN_CNTL reg packing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:02 +00:00
Emma Anholt
d335232fe5 tu: Use appropriate chip variants for VRS reg packing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:01 +00:00
Emma Anholt
08782fbdc3 tu: Use appropriate chip variants for LRZ reg packing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:01 +00:00
Emma Anholt
1f016974fa tu: Use appropriate chip variants for FOVEAT regs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:00 +00:00
Emma Anholt
5a6bfc1614 tu: Use non-deprecated names for scratch regs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:18:00 +00:00
Emma Anholt
f12a9b91c9 tu: Explicitly use 6XX scratch reg packing in perfcntrs_pass_cs_entries.
It looks like this will change in 8xx, but for now this gets us off of
deprecated reg packing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:58 +00:00
Emma Anholt
454c665552 tu: Move tu6_emit_gs() to use reg packing.
Gets us the right regs on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:58 +00:00
Emma Anholt
56e63dc5ed tu: Move VPC_SO_FLUSH_BASE to use reg packing.
Gets us the right reg on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:58 +00:00
Emma Anholt
4bc21cd77d tu: Convert tu_init_cmdbuf_start_a725_quirk() to non-deprecated packing.
We can just pass 7xx as the CHIP, rather than templating.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:58 +00:00
Emma Anholt
a7ffdd31c5 tu: Template tu_pipeline_builder_parse_rasterization_order() by CHIP.
This gets us the right reg on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:57 +00:00
Emma Anholt
fbcc32e990 tu: Template tu6_emit_vpc_varying_modes() by CHIP.
This gets us the right regs on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:57 +00:00
Emma Anholt
436f6059b4 tu: Template tu7_emit_subpass_shading_rate by CHIP.
This gets us the right regs on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:56 +00:00
Emma Anholt
99f31785a2 tu: Template tu6_emit_msaa() by CHIP.
This gets us the right regs on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:56 +00:00
Emma Anholt
22a8475151 tu: Template update_vsc_pipe by CHIP.
This lets us use non-deprecated reg packing, and fixes incorrect emitting
of 0D08 on 6xx that was introduced in 0cf27a7236 ("tu: Clear
`VSC_UNKNOWN_0D08` on A7XX")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:55 +00:00
Emma Anholt
17e47f4dff tu: Template fdm_apply_store_coords() by CHIP.
Gets the right regs on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:55 +00:00
Emma Anholt
339c3c7970 tu: Use non-deprecated reg packing in tu6_setup_streamout()'s CRBs.
This gets us the right registers on a8xx.  We can clean this up later with
the CRB builder.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:54 +00:00
Emma Anholt
7555600cc8 tu: Template tu_CmdBindIndexBuffer2KHR by CHIP.
This gets us the right reg on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:54 +00:00
Emma Anholt
2f3ebc4f46 tu: Template tu_CmdBindTransformFeedbackBuffersEXT by CHIP.
Gets the right regs for reg packing on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:54 +00:00
Emma Anholt
bfbc625f79 tu: Template tu_CmdBeginTransformFeedbackEXT() by CHIP.
Gets the right regs for reg packing on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:53 +00:00
Emma Anholt
b69aa77456 tu: Template r2d_coords by CHIP.
Gets us the right regs on 8xx

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:53 +00:00
Emma Anholt
b1a2757097 tu: Template tu7_emit_tile_render_begin_regs by CHIP.
Gets us the right reg on 8xx

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:52 +00:00
Emma Anholt
e6a3699bf3 tu: Template tu6_build_depth_plane_z_mode by CHIP.
Gets us the right reg on 8xx for GRAS_SU_DPETH_PLANE_CNTL.  I used a reg
pack function on the RB reg too, for consistency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:52 +00:00
Emma Anholt
00bf0907e4 tu: Use tu_cs_emit_regs() for SU_POLY_OFFSET setup.
This gets us the right regs on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:51 +00:00
Emma Anholt
35e5be2bed tu: Template tu6_emit_rt_workaround() by CHIP.
This lets us set the right registers on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:51 +00:00
Emma Anholt
4439101dd3 tu: Template tu6_emit_window_scissor by CHIP.
This lets us set the right registers on 8xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:50 +00:00
Emma Anholt
21e6c68bd1 tu: Use a register pack for VPC_PS_CNTL.
Prep for dropping deprecated pack support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38796>
2025-12-04 22:17:50 +00:00
Yiwei Zhang
b42d7c3809 ci: uprev virglrenderer
This brings in latest virglrenderer that supports recently added venus
extensions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38800>
2025-12-04 21:38:54 +00:00
Aitor Camacho
273f668520 wsi/metal: Fix blit_imate_to_image's pool selection for cmd buffer alloc
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 39a7d65113 ("wsi/metal: Backend addition for drivers built on top of Metal")

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38785>
2025-12-04 20:08:02 +00:00
Aitor Camacho
a547c6306a wsi/metal: Fix command buffer release at destroy
Fixes: 39a7d65113 ("wsi/metal: Backend addition for drivers built on top of Metal")

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38785>
2025-12-04 20:08:02 +00:00
José Roberto de Souza
49adffb0c0 iris: Rename iris_binding_table::sizes to iris_binding_table::surf_count
This better reflect the usage of this array.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38790>
2025-12-04 19:43:21 +00:00
José Roberto de Souza
e551c8d302 iris: Move code to emit push constants to its own function
This allow us to reduce a bit the size of iris_upload_dirty_render_state().

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38790>
2025-12-04 19:43:21 +00:00
José Roberto de Souza
3dda6b05e0 iris: Improve iris_emit_binding_tables()
Moving all 3 for loops into a single one and populating binding tables before
emit it, the last part has no side effect but when reading the code it makes
more sense to populate binding table then emit it.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38790>
2025-12-04 19:43:21 +00:00
José Roberto de Souza
d4658ddb73 iris: Move code to emit binding tables to its own function
This allow us to reduce a bit the size of iris_upload_dirty_render_state() and
in next patches some improvements to this new function will be done.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38790>
2025-12-04 19:43:21 +00:00
Aitor Camacho
5b039e0996 kk: Expose more features/extensions we already support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Extensions:
- VK_KHR_load_store_op_none
- VK_KHR_map_memory2
- VK_EXT_load_store_op_none

Features:
- fullDrawIndexUint32
- inheritedQueries
- shaderStorageImageExtendedFormats

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38783>
2025-12-04 18:21:02 +00:00
Aitor Camacho
2e62777e0d kk: Apply robustness only when requested
When lowering IO, we would always lower UBOs and SSBOs with robustness
enabled. This change only applies robustness if requested by the user.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38784>
2025-12-04 18:04:56 +00:00
Aitor Camacho
48555926ac kk: Guard writes after fragment demote
Required for M1 and M2 chips since they don't demote fragments.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38784>
2025-12-04 18:04:56 +00:00
Emma Anholt
9e145f33cb ir3: Drop old comment about ldg vectorization limitation.
We've looked at it again, and concluded that there's just no way that LDG
crossing a boundary could be OK in the components-are-read case but bad in
the components-are-not-read case, and this must have been papering over
something else.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38704>
2025-12-04 17:18:50 +00:00
Emma Anholt
24cd5088ca ir3: Perform vectorization on ldg/stg just like other memory access.
shader-db effect comes from (perhaps older vkd3d?) DX12 fossils.  It sure
cleans up BDA CTS testcases, too.

Totals:
MaxWaves: 22151808 -> 22485222 (+1.51%); split: +1.51%, -0.06%
Instrs: 397754007 -> 396485642 (-0.32%); split: -0.41%, +0.10%
CodeSize: 990135656 -> 916286528 (-7.46%); split: -7.64%, +0.00%
STPs: 234296 -> 218861 (-6.59%); split: -6.62%, +0.03%
LDPs: 171664 -> 155386 (-9.48%); split: -9.53%, +0.04%

Totals from 130513 (8.36% of 1560788) affected shaders:
MaxWaves: 1376826 -> 1710240 (+24.22%); split: +24.30%, -0.90%
Instrs: 57789492 -> 56521127 (-2.19%); split: -2.84%, +0.66%
CodeSize: 256430400 -> 182581272 (-28.80%); split: -29.51%, +0.01%
NOPs: 7619148 -> 8015627 (+5.20%); split: -2.42%, +7.79%
MOVs: 4971200 -> 3968352 (-20.17%); split: -21.62%, +1.37%
COVs: 683166 -> 661427 (-3.18%); split: -3.24%, +0.04%
Full: 2422659 -> 1886993 (-22.11%); split: -22.98%, +0.03%
(ss): 1410724 -> 1479394 (+4.87%); split: -3.24%, +8.43%
(sy): 611391 -> 674588 (+10.34%); split: -1.14%, +11.66%
(ss)-stall: 4930898 -> 5265129 (+6.78%); split: -3.37%, +10.29%
(sy)-stall: 24138107 -> 29357000 (+21.62%); split: -1.82%, +23.71%
STPs: 112159 -> 96724 (-13.76%); split: -13.83%, +0.07%
LDPs: 113355 -> 97077 (-14.36%); split: -14.43%, +0.07%
Preamble Instrs: 83269073 -> 46493442 (-44.16%); split: -45.32%, +0.01%
Early Preamble: 79 -> 87 (+10.13%)
Cat0: 8516132 -> 8878083 (+4.25%); split: -2.28%, +6.68%
Cat1: 5994766 -> 4973985 (-17.03%); split: -19.02%, +1.94%
Cat2: 22297064 -> 22240177 (-0.26%); split: -0.30%, +0.05%
Cat3: 13748284 -> 13748279 (-0.00%)
Cat6: 1337948 -> 780266 (-41.68%); split: -42.19%, +0.27%
Cat7: 3247729 -> 3252768 (+0.16%); split: -1.48%, +1.71%
Subgroup size: 9280960 -> 9524224 (+2.62%); split: +2.63%, -0.01%

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38704>
2025-12-04 17:18:49 +00:00
Yogesh Mohan Marimuthu
f27b2b8d77 winsys/amdgpu,ac: get eop and csa size,alignment from kernel query
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38647>
2025-12-04 16:34:21 +00:00
Yogesh Mohan Marimuthu
f322bc8631 ac: update amdgpu_drm.h for uq metadata query info
struct drm_amdgpu_info_uq_fw_areas is renamed to drm_amdgpu_info_uq_metadata.
query infor structure for compute and sdma is added.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38647>
2025-12-04 16:34:20 +00:00
Samuel Pitoiset
b13003133d radv: add radv_cmd_state::emitted_rt_pipeline
To stop abusing emitted_compute_pipeline for RT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38782>
2025-12-04 16:08:01 +00:00
Samuel Pitoiset
7d4c49a271 radv: decouple RT and compute dispatches paths
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38782>
2025-12-04 16:08:01 +00:00
Samuel Pitoiset
fa225de793 radv: constify radv_gfx12_emit_buffered_regs()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38782>
2025-12-04 16:08:00 +00:00
Samuel Pitoiset
e3aac0d11f radv: remove redundant buffered regs emission for dispatches on GFX12+
It's already called few lines above.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38782>
2025-12-04 16:08:00 +00:00
Samuel Pitoiset
069f60a4e7 radv: enable conservativeRasterizationPostDepthCoverage on GFX10+ when possible
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This seems to work just fine, except on NAVI21, NAVI22 and VANGOGH. It
might be the same issue as has_vrs_ds_export_bug but it's not documented
anywhere. That being said, the CTS tests that fail don't even export
depth or stencil from fragment shaders.

Do not enable this feature on these GPUs to be conservative.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38767>
2025-12-04 14:16:15 +00:00
Samuel Pitoiset
d1386e167e radv: add support for computeDerivativeGroupQuads on < GFX12
This was also supported by PAL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38771>
2025-12-04 13:56:47 +00:00
Christian Gmeiner
6a8460297a lavapipe: Advertise variableMultisampleRate
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Everything is in place to support this feature already.

Passes:
 dEQP-VK.pipeline.pipeline_library.multisample.variable_rate.*

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38693>
2025-12-04 10:33:53 +00:00
Karol Herbst
a255e2ca56 nir: add ACCESS to shared_uniform_block_intel
intel_nir_blockify_uniform_loads simply overwrites the intrinsic for
load_shared, which leads to messed up indicies, e.g:
  "base=0, access=volatile, align_mul=4, align_offset=0
became:
  "base=0, align_mul=4, align_offset=4"

Fixes: 0dd09a292b ("nir: add ACCESS_ATOMIC")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38801>
2025-12-04 10:01:52 +00:00
Eric Engestrom
21d21ac824 docs: add sha sum for 25.2.8
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/38806>
2025-12-04 08:53:39 +01:00
Eric Engestrom
da01adfd11 docs: add release notes for 25.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38806>
2025-12-04 08:53:39 +01:00
Eric Engestrom
ef057f7ca0 docs: update calendar for 25.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38806>
2025-12-04 08:53:39 +01:00
Icenowy Zheng
46b97da60b pvr: fix PVR_DEBUG=info when running w/o KHR_display
When running w/o KHR_display enabled, the display device node won't be
initlaized, and the information dump routine will terminate because of
this.

Fix this by not bailing out and not trying to print display device
compatible strings.

Fixes: 8825c91dcb ("pvr: Make display node optional")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38787>
2025-12-04 07:27:55 +00:00
Dylan Baker
a372d39609 docs: update calendar for 25.3.1
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/38804>
2025-12-04 06:33:28 +00:00
Dylan Baker
79b32de5bf docs: Add checksums for 25.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38804>
2025-12-04 06:33:28 +00:00
Dylan Baker
a9dd1954fa docs: add release notes for 25.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38804>
2025-12-04 06:33:28 +00:00
Pavel Ondračka
1642781673 r300/ci: update expectations
Fallout from 60e115dedf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38797>
2025-12-04 05:50:10 +00:00
Timothy Arceri
b75cd07265 util/driconf: add Cursemark workaround
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes gpu hang on radeonsi and corrupt rendering on iris.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14392
Cc: mesa-stable

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38777>
2025-12-03 23:58:15 +00:00
Connor Abbott
d5498240ac spirv: Remove view_index_is_input
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The last user was removed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38793>
2025-12-03 22:52:29 +00:00
Connor Abbott
63a38b945d tu: Call nir_lower_sysvals_to_varyings once
Remove the early call to nir_lower_sysvals_to_varyings. This guarantees
that we only call it after lower_system_values has replaced the
variables with intrinsics. It turns out that a sequence like this
doesn't work:

1. shader declares Layer builtin as a signed integer
2. nir_lower_sysvals_to_varyings turns it into a varying (but keeps the
  signed integer type)
3. nir_lower_input_attachments (or some other pass) creates a
  nir_load_layer_id intrinsic.
4. nir_lower_sysvals_to_varyings is called again, and when creating the
  varying variable it passes an unsigned type to
  nir_get_variable_with_location(), which asserts because there is
  already a signed integer variable.

By making lower_sysvals_to_varyings happen late for layer, we can avoid
this happening by lowering away the variable before (2).

Fixes: 5bbbf5cf9b ("tu: Set use_layer_id_sysval for nir_lower_input_attachments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38793>
2025-12-03 22:52:29 +00:00
Connor Abbott
4cfa188db6 tu: Stop setting view_index_is_input
glslang apparently emits ViewID as a signed integer. If other passes
generate a sysval then lower_sysvals_to_varyings() tries to create an
variable with unsigned type and asserts when the preexisting varying's
type doesn't match the type it expects. Just make ViewID a sysval and
lower it in lower_sysvals_to_varyings() to avoid this and simplify the
SPIR-V parser.

Fixes: 5bbbf5cf9b ("tu: Set use_layer_id_sysval for nir_lower_input_attachments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38793>
2025-12-03 22:52:28 +00:00
Marek Olšák
e14f8ee0e4 nir/has_divergent_loop: require divergence metadata, check all function impls
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
instead of forcing callers to call nir_divergence_analysis

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38597>
2025-12-03 20:14:18 +00:00
Faith Ekstrand
d0b83dd7ce pan: Move pan_compile_shader to pan_compiler.c
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:45 +00:00
Faith Ekstrand
e64736fba7 pan: Drop bifrost_shader_blend_info::format
It existed entirey to save us a switch statement.  It's very unlikely
that's worth pulling GENX API command stream stuff into the compiler.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:45 +00:00
Faith Ekstrand
3970548556 pan: Move PRINTF_BUFFER_SIZE to the compiler
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:44 +00:00
Faith Ekstrand
83f90b0760 pan/bi: Fix LD_VAR_BUF indirect offset calculations
We multiply by 16 correctly but then drop that in the case where vbase
is non-zero.  We typically lower FS input indirects so we don't see this
often but there are a few cases where they still sneak through.

Fixes: 0fcddd4d2c ("pan/bi: Rework varying linking on Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:44 +00:00
Faith Ekstrand
9f173bb066 panvk/jm: Delete panvk_varying_hw_format()
It's duplicated in panvk_vX_shader.c, which is where it's actually used.
This version is a dead artifact of the past.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:44 +00:00
Faith Ekstrand
cad5fb4370 pan/blend: Use flat inputs for blend shaders
There's nothing to interpolate here so there's no reason to use
nir_load_interpolated_input.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:44 +00:00
Faith Ekstrand
bdd4bea636 pan/genxml: Decode blend shaders on CSF
In order to decode blend shaders, we need to pass in the fragment binary
address because the blend pointer uses the same top 32 bits as the
fragment binary.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:43 +00:00
Gurchetan Singh
4f45e834ae gfxstream: fix logspam in TLS helper function
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Logspam has been reported in a gfxstream initialization
path.

Fixes: 4a30c6fd70 ("gfxstream: Use the Mesa common tss_* TLS helper functions")
Cc: mesa-stable

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38776>
2025-12-03 09:12:21 -08:00
Thong Thai
4f4745ebf3 frontends/va: get libva api version from va_version.h
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38773>
2025-12-03 16:01:38 +00:00
Samuel Pitoiset
ac37885fc8 vulkan: update spec to 1.4.335
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This renames rayTracingInvocationReorder because both NV and EXT use
the same name.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38779>
2025-12-03 14:47:00 +00:00
Marek Olšák
9b011a7344 amd: rename most GFX115x definitions for released chips
addrlib changes match the original code.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38718>
2025-12-03 13:29:07 +00:00
Gil Pedersen
858364be71 intel: Add PIPE_FORMAT_R10G10B10X2_UNORM support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This utilizes the RGBX format faking logic from e8cd7a30 to enable
PIPE_FORMAT_R10G10B10X2_UNORM renderer support using swizzling.

This format is needed for better HDR rendering support in the iris driver, to
support the Proton / Wine DXGI implementation, which requires an RGBA ordered
renderer for its Vulkan implementation. This in turn requires the Wayland
display to support both alpha and opaque formats. The check currently fails,
since only PIPE_FORMAT_R10G10B10A2_UNORM is exposed when Gallium (iris) is
the DRI Wayland renderer.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38616>
2025-12-03 11:22:38 +00:00
Peyton Lee
3652b29573 radeonsi/vpe: correct tone mapping parameters
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Video post-processing now supports explicit color standards.
Applications can pass different combinations of primaries,
transfer functions, and color matrices.

This is used to ensure correct mapping.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38764>
2025-12-03 10:34:41 +00:00
Aitor Camacho
62a97e87a6 docs,kk: Add KosmicKrisp environment variable documentation
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38460>
2025-12-03 10:29:26 +00:00
Aitor Camacho
df19ec3020 vulkan/wsi: Fix double destroy of present_id_timeline at swapchain create
Fixes: c888da3d48 ("vulkan/wsi: Add mechanism to wait for WSI semaphore unsignal.")

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38754>
2025-12-03 09:53:42 +00:00
Samuel Pitoiset
fda1262eed radv: reduce maxTexelBufferElements to 1<<29
It's the number of elements. RADV exposes VK_FORMAT_R64_{UINT,SINT}
formats for texel buffers, so the maximum is 1<<29 to fit in the
32-bit bounds checking.

Fixes KHR-GL46.texture_buffer_size_clamping.* with Zink and new VKCTS
dEQP-VK.texture.misc.max_elements.*.

Cc: mesa-stable.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38140>
2025-12-03 09:31:08 +00:00
Yiwei Zhang
bb19e30e0d venus: add VK_EXT_mesh_shader support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fills in the last piece for vkd3d-proton feature level 12_2.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38739>
2025-12-03 07:21:53 +00:00
Yiwei Zhang
6fb6a740d9 venus: sync protocol for VK_EXT_mesh_shader support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38739>
2025-12-03 07:21:53 +00:00
Lionel Landwerlin
86419dd519 brw: remove driver specific load_num_workgroup lowering
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: 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/38735>
2025-12-02 22:44:05 +00:00
Lionel Landwerlin
578d2f0daa anv: move load_num_workgroups tracking to driver
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/38735>
2025-12-02 22:44:04 +00:00
Lionel Landwerlin
e12e7e117c iris: lower load_num_workgroups
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/38735>
2025-12-02 22:44:03 +00:00
Calder Young
5bf3546cc6 anv: Use companion cmd buffer for CCS and MCS image barriers
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37627>
2025-12-02 22:22:24 +00:00
Calder Young
69f6966ae2 anv: Add shorthand for executing on the companion cmd buffer
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37627>
2025-12-02 22:22:24 +00:00
Calder Young
fe0aed2302 anv: Fix missing const qualifiers on some params in anv_blorp.c
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37627>
2025-12-02 22:22:24 +00:00
Ian Romanick
b16c169b6d vc4: Don't call nir_lower_flrp in vc4_optimize_nir
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's already called by st_nir_opts, so it shouldn't be necessary to do
it again here.

This is only compile tested.  I have not collected any shader-db or
fossil-db data.

Acked-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
956a09b990 broadcom/compiler: only lower flrp once
This is only compile tested.  I have not collected any shader-db or
fossil-db data.

v2: Drop the calls to nir_opt_constant_folding. The builder in
nir_lower_flrp will already take care of this.

v3: NIR_PASS_V is gone. Noticed by Marge.

Acked-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
d64ce23b08 elk: only lower flrp once
No shader-db changes on any Intel platform. Both Iris and Crocus use
st_nir_opts, which calls nir_lower_flrp before brw_nir_optimize. The
call still needs to exist for hasvk, but I don't collect fossil-db data
for hasvk.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Alyssa Rosenzweig
e4b8b758b1 brw: only lower flrp once
No shader-db changes on any Intel platform.

fossil-db:

Lunar Lake
Totals:
Instrs: 926275147 -> 926273376 (-0.00%); split: -0.00%, +0.00%
Cycle count: 106012190597 -> 106011255305 (-0.00%); split: -0.00%, +0.00%
Spill count: 3424180 -> 3424168 (-0.00%)
Fill count: 4877035 -> 4877017 (-0.00%)
Max live registers: 193918196 -> 193918122 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 49106544 -> 49106448 (-0.00%); split: +0.00%, -0.00%
Non SSA regs after NIR: 231281721 -> 231281719 (-0.00%)

Totals from 1705 (0.08% of 2020028) affected shaders:
Instrs: 926974 -> 925203 (-0.19%); split: -0.28%, +0.09%
Cycle count: 39024288 -> 38088996 (-2.40%); split: -2.77%, +0.37%
Spill count: 2229 -> 2217 (-0.54%)
Fill count: 2977 -> 2959 (-0.60%)
Max live registers: 183056 -> 182982 (-0.04%); split: -0.20%, +0.16%
Max dispatch width: 46880 -> 46784 (-0.20%); split: +0.07%, -0.27%
Non SSA regs after NIR: 263520 -> 263518 (-0.00%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
92e609f4fe glsl: Move flrp lowering out of the loop
Other lower_flrp Intel platforms had similar shader-db changes.

Lunar Lake
total instructions in shared programs: 17131619 -> 17131182 (<.01%)
instructions in affected programs: 59924 -> 59487 (-0.73%)
helped: 255 / HURT: 9

total loops in shared programs: 5336 -> 5334 (-0.04%)
loops in affected programs: 4 -> 2 (-50.00%)
helped: 2 / HURT: 0

total cycles in shared programs: 888274988 -> 888269628 (<.01%)
cycles in affected programs: 1753370 -> 1748010 (-0.31%)
helped: 182 / HURT: 94

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
4bbc29373a nir/lower_flrp: Check and set shader_info::flrp_lowered
No shader-db or fossil-db changes on any Intel platform.

v2: Return early if lowering_mask is zero. If the first call to
nir_lower_flrp has a lowering_mask of zero, later calls with non-zero
masks would not do any lowering. lp_bld_nir.c has this issue.

Suggested-by: Alyssa
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
341e2d3283 lavapipe: fp16 flrp must also be lowered
Prevents failures with fp16 in lavapipe and Zink on lavapipe when
"nir/lower_flrp: Check and set shader_info::flrp_lowered" is
applied. Lowering with an incomplete mask on the first call to
nir_lower_flrp will prevent later calls (with the complete mask) from
doing anything.

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Faith Ekstrand
f1debfccaf pan: Move pan_shader_compile() to pan_compiler.h
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
10e571aebd pan/compiler: Move pan_ir.h into pan_compiler.h
There is nothing IR about it.  It's really the compiler interface file,
so it should all go in pan_compiler.h.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
2d286ec80a pan/compiler: Move all NIR passe definitions to pan_nir.h
While we're at it, rename pan_lower_* to pan_nir_lower_* for consistency
with everything else.  The intention is that eventually this will be a
private header and drivers will stop calling these passes themselves.
However, that is a long way off so for now we'll just move them to the
sensibly named place.  Notably, pan_preprocess/optimize/postprocess_nir
stay in pan_compiler.h because those are intended to be external APIs
indefinitely.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
b7f45c66fe pan: Move pan_shader NIR helpers to pan_compiler.h
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
55ae25f2d7 pan: Move disassembly wrappers to a new pan_compiler.h
This is going to be where we put the compiler interface.  For now,
disassembly wrappers are as good a place to start as any.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
1f068d8c71 pan: Move pan_arch() to pan_model.h
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
4c9ec8fad2 pan: Add a central libpanfrost_compiler library
The only thing that only pulls in bifrost is our CL compiler for
pre-builts.  Everything that uses pan_shader.h pulls it in because
that's header-only and calls into both back-ends anyway.  Some day
we might want to figure out how to properly dead-code the midgard
compiler for Vulkan but today is not that day.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
013c94458e pan/bi: Add separate meson files for bifrost tests
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
b02bc53261 pan: Move util/* to compiler/
src/panfrost/util is all compiler stuff, we just put it in util/ so it
could be used by both midgard and bifrost.  We also rename all the files
to have a pan_nir prefix.  We'll rename the functions later.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
fa6c9b6805 pan: Move midgard to compiler/midgard
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:29 +00:00
Faith Ekstrand
0f923e7f60 pan: Move compiler to compiler/bifrost
It was this way for a while but then someone decided that we should try
to hide midgard and get it off the main path.  However, we still try to
present a unified interface to the GL driver.  The combination of these
two things means that those common compiler interfaces have to live
outside of panfrost/compiler which makes everything more awkward than
it needs to be.  We either need to move it back into src/gallium and
make abstracting across the two the GL driver's problem (which breaks
other tooling) or need to put both under src/panfrost/compiler.  The
midgard compiler can just as easily bitrot in panfrost/compiler/midgard.
The first step is moving the bifrost compiler.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:29 +00:00
Gurchetan Singh
57ae8eb70f android_stub: fix missing prototypes issues
When the compiler is configured to complain about missing
prototypes, the lack of prototypes can cause issues:

src/android_stub/cutils_stub.cpp:13:1:
   error: no previous prototype for function 'atrace_begin_body' [-Werror,-Wmissing-prototypes]
   13 | atrace_begin_body(const char * /*name*/)

Update cutils/trace.h to the version in android-16.0.0_r3 [1], and
add proper header includes to fix this.

[1] https://android.googlesource.com/platform/system/core.git/+/refs/tags/android-16.0.0_r3/libcutils/include/cutils/trace.h

Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38644>
2025-12-02 20:03:02 +00:00
Gurchetan Singh
1997987b58 util: fix error about missing include
When building with linux_glibc_x86_64 in AOSP, this is
observed.

src/util/u_debug_stack.h:66:4: error: unknown type name 'uint64_t'
   66 |    uint64_t start_ip;
      |    ^

Adding <stdint.h> fixes it.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38644>
2025-12-02 20:03:02 +00:00
Gurchetan Singh
5af6af9644 android_stub: add missing definition
Fixes:

android_stub/sync_stub.cpp:18:11: error: use of undeclared identifier 'NULL'
   18 |    return NULL;
      |           ^~~~

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38644>
2025-12-02 20:03:02 +00:00
Mel Henning
28d0ff419f nak/legalize: Use ConstTracker to skip some movs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Totals:
CodeSize: 4531122000 -> 4523280144 (-0.17%); split: -0.17%, +0.00%
Static cycle count: 2705057234 -> 2704474031 (-0.02%); split: -0.02%, +0.00%
Fills from reg: 203387 -> 203380 (-0.00%)

Totals from 132940 (67.55% of 196789) affected shaders:
CodeSize: 4119643920 -> 4111802064 (-0.19%); split: -0.19%, +0.00%
Static cycle count: 2273444838 -> 2272861635 (-0.03%); split: -0.03%, +0.00%
Fills from reg: 193909 -> 193902 (-0.00%)

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38173>
2025-12-02 19:35:29 +00:00
Mel Henning
4890e91f49 nak: DCE after legalize
This will be able to eliminate instructions if every use of an SSAValue
is eliminated by ConstTracker in legalize.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38173>
2025-12-02 19:35:29 +00:00
Mel Henning
61abcb2bc8 nak: Split LegalizeBuilder into its own type
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38173>
2025-12-02 19:35:29 +00:00
Mel Henning
7f9c827577 nouveau/headers: Use drf and cl906f.h in nv_push.h
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38761>
2025-12-02 19:16:50 +00:00
Mel Henning
8009bfbc01 nouveau/headers: Use drf defines in nv_push.c
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38761>
2025-12-02 19:16:50 +00:00
Mel Henning
b90053cf6b nouveau: Deduplicate drf.h
Rather than having two independent copies of the same header in two
different places, place a single copy in nouveau/headers. The two copies
did differ, but the one in nouveau/winsys matches the one in the kernel
and the only changes in the one in nvc0 are some removed defines and
changed whitespace.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38761>
2025-12-02 19:16:50 +00:00
Mel Henning
523d9f73b9 nouveau/headers: Use 906f defines for nv_push.c
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38761>
2025-12-02 19:16:50 +00:00
Yiwei Zhang
a71b4a4b95 venus: device create to filter promoted swapchain_maintenance1
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
WSI extensions are implemented on the Venus driver side, layering on top
of external memory extensions. So we have to filter out WSI extensions
during device creation, otherwise the headless driver on the venus
renderer side can fail the device creation with _EXTENSION_NOT_PRESENT.

Fixes: 11195eb8de ("vulkan: Add KHR_swapchain_maintenance1 promotions.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38763>
2025-12-02 17:12:24 +00:00
Dorinda Bassey
4ace478545 util/rust: Add handle type detection to descriptor API
This enhances the DescriptorType enum to include the
memory handle type (DMABUF vs SHM) alongside the size,
allowing consumers to differentiate between DMA-BUF and
shared memory file descriptors without redundant code.

Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38677>
2025-12-02 16:24:56 +00:00
Rob Clark
6b3f115c68 freedreno/registers: Fix definition of CP_COND_EXEC
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The "REF" comparision is a timestamp comparision with rollover.

Our current use of CP_COND_EXEC is still fine, but we should be more
clear about the comparision operation.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38755>
2025-12-02 14:05:22 +00:00
Lionel Landwerlin
36ba2672ca anv: reintroduce non independent sets dynamic descriptor optimization
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38678>
2025-12-02 13:25:20 +00:00
Lionel Landwerlin
104206fb0f vulkan/runtime: add an internal flag for independent sets
Shader objects are by definition I think independents.

But implementation like Anv would like to optimize dynamic descriptors
if possible. It's possible if the sets are not independent.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38678>
2025-12-02 13:25:20 +00:00
Lionel Landwerlin
0ca870c6f3 anv: fix broken ray tracing dynamic descriptors
We completely missed that handling.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e76ed91d3f ("anv: switch over to runtime pipelines")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14284
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38678>
2025-12-02 13:25:20 +00:00
Lionel Landwerlin
5c53c6e693 vulkan/runtime: track dynamic descriptor offsets for RT pipelines
Dynamic descriptors are mapped an array of offsets provided through
vkCmdBindDescriptorSets*() commands.

When pipelines are compiled with independent sets layouts, the
implementation might have to do additional runtime calculation to
figure out what offset in the contiguous array maps to what dynamic
descriptor in the pipeline layout.

For graphics pipelines you can always compute that information when
binding the shaders. There is always a limited amount of shaders (5
max).

For ray tracing pipelines, there could be lots of shaders to process
at every pipeline binding call. Besides there is no interface from the
runtime to the driver to list all the shaders used at the moment.

So do that tracking in the runtime and pass the information down to
the driver through the cmd_set_rt_state() vfunc.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 69a04151db ("vulkan/runtime: add ray tracing pipeline support")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38678>
2025-12-02 13:25:20 +00:00
Lionel Landwerlin
a4e9e660d4 brw/iris: remove fs key for coherent_fb_fetch
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: 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/38737>
2025-12-02 12:44:35 +00:00
Lionel Landwerlin
296325b787 anv: add 32-wide subgroup requirement heuristic
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13052
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Tested-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38705>
2025-12-02 10:30:21 +00:00
Romaric Jodin
0ad90e5a31 pan/va: Add missing 8bit widen swizzles
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36638>
2025-12-02 10:04:13 +00:00
Romaric Jodin
dc79d7af55 pan/bi: bi_alu_src_index: remove invalid assert
`comps <= (1 << subword_shift)` cannot be guarantee.

Here is an example:
```
        8x2   %27 = @load_ssbo (%26 (0x1000001), %4) (access=readonly|reorderable, align_mul=2, align_offset=0, offset_shift=0)
        8x2   %32 = ior %25, %31
        32    %34 = ult32 %33 (0x7), %12
        8x2   %35 = b32csel %34.xx, %27, %32
```
When processing `%34.xx` in `bi_emit_alu` (for `instr->src[0]`),
`comps` is computed from the instr definition (`%35`), but
`subword_shift` from the src bitsize.

In that case comps is greater than `1 << subword_shift`, but this is
supported by `bi_alu_src_index`.

This example is extracted from `dEQP-VK.spirv_assembly.type.vec2.i8.bit_field_insert_offset16_count16_comp`

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36638>
2025-12-02 10:04:13 +00:00
Romaric Jodin
6db607651a pan/bi: fix destination of v4i8 instruction returning only v2i8
When v4i8 instruction are using to compute a v2i8, it puts the 2
result values in b0 & b2, thus we need to swizzle the destination to
have them in b0 & b1 as expected by the consumer of the v2i8 produced.

example: dEQP-VK.spirv_assembly.type.vec2.i8.mul_frag

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36638>
2025-12-02 10:04:13 +00:00
Romaric Jodin
df0cef26f6 pan/bi: do not vectorize nir_op_f2fmp
Vectorizing it prevents optimisation related to the store
instruction. This is having negative impact from a shader-db
point-of-view.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36638>
2025-12-02 10:04:12 +00:00
Romaric Jodin
b4c2954503 pan/bi: do not vectorize nir_op_f2{i,u}8
Vectorizing nir_op_f2i8 and nir_op_f2u8 can lead other passes to
generate large vector (32x2) that are not supported:
----------------------------------
        16x2  %23 = fmul! %22, %21
        8x2   %24 = f2i8! %23
---- TRANSFORM TO ----------------
        16x2  %30 = fmul! %29, %28
        32x2  %31 = f2f32! %30
        16x2  %32 = f2i16! %31
        8x2   %33 = i2i8! %32
----------------------------------

examples:
- dEQP-VK.spirv_assembly.type.vec2.i8#mod_frag
- dEQP-VK.spirv_assembly.type.vec2.i8#rem_frag
- dEQP-VK.spirv_assembly.instruction.compute.convertftou#float16_to_uint8_max

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36638>
2025-12-02 10:04:12 +00:00
Romaric Jodin
40e3d8e0e6 pan/bi: improve vectorization of 8bit alu
Keep/make 2-element vector at least, and 4-element vector for
supported opcode.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36638>
2025-12-02 10:04:11 +00:00
David Rosca
2b2914d81f radv/video: Fix AV1 quantization map maxQIndexDelta value
Fixes: ae6ea69c85 ("radv: Implement VK_KHR_video_encode_quantization_map")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38745>
2025-12-02 09:44:35 +00:00
Tapani Pälli
b2b5e83894 anv: add vk_wsi_disable_unordered_submits and enable for GTK
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
See radv change 0d9d45db4e for further explanation.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14354
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38765>
2025-12-02 10:22:02 +02:00
Gurchetan Singh
6c1d993640 meson: add -Wgnu-pointer-arith to _trial_msvc
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In theory, this will prevent the warning in the future
in common code (which uses c_msvc_compat_args).

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38752>
2025-12-02 00:12:44 +00:00
Gurchetan Singh
14cfe14626 util: fix arithmetic on a pointer to void warning
Otherwise, the following error is observed:

src/util/cache_ops_x86_clflushopt.c:40:22:
   error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith]
   40 |    void *end = start + size;
      |                ~~~~~ ^
src/util/cache_ops_x86_clflushopt.c:44:9:
  error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith]
   44 |       p += cpu_caps->cacheline;
      |       ~ ^

This works with GNU extension enabled, but does lead to warnings
with Clang.

v2: Add to trial_c + trial_cpp checks (Erik)
v3: use c_msvc_compat_args to avoid fixing other instances of this issue (Erik)

Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38752>
2025-12-02 00:12:44 +00:00
Dylan Baker
3ad592ee4f docs/release-calendar: Shift 25.3 releases by one week
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
25.3.1 was planned for the day before the US Thanksgiving holiday, but
it slipped due to that holiday. The current plan puts 25.3.3 on
Christmas Eve, which will be missed for the same reason. To attempt to
fix this, I've updated the plan to move the missed release to this week,
with all releases re-aligned with that date. This moves the Christmas
Eve release to New Years Eve. We could possibly slip that by a week into
the new years as there is likely to be less work than normal done at
that time.

Due to the change in schedule I've removed one planned release, as we
should reach 25.3.Last and 26.0.1 at roughly the same time with one less
release.

Also update the last 25.2 release to match.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38757>
2025-12-01 22:56:49 +00:00
Gurchetan Singh
15983e6d0d gfxstream: more fixes for missing prototypes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes things like:

GfxStreamVulkanMapper.cpp:45:10:
error: no previous prototype for function 'chooseGfxQueueFamily'[-Werror,-Wmissing-prototypes]

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38751>
2025-12-01 14:07:18 -08:00
Kenneth Graunke
320f91a5ab intel/elk: Also disable output constant offset src folding
Same fix from brw.

Fixes: 9a56672f56 ("nir: add shader_info::disable_input/output_offset_src_constant_folding")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38758>
2025-12-01 20:10:37 +00:00
Silvio Vilerino
ec154eff64 mediafoundation: Copy and remove padding gaps in output IMFMediaBuffer if necessary
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38750>
2025-12-01 19:36:07 +00:00
Silvio Vilerino
dd30f0d7ac d3d12: Add video encode bitstream buffer full frame size check in get_feedback
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38750>
2025-12-01 19:36:07 +00:00
Pohsiang (John) Hsu
35874945b4 d3d12: Fix lack of flushing when encoding h264 with SVC
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Fixes: d9c2ccd5 ("d3d12: Video Encode - Do not flush on direct buffer maps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38750>
2025-12-01 19:36:07 +00:00
Silvio Vilerino
0313c81409 mediafoundation: Take m_EncoderLock only for work submission in ProcessInput
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38750>
2025-12-01 19:36:06 +00:00
Silvio Vilerino
9ce3dc81c8 mediafoundation: Remove redundant fence openings in ProcessInput
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38750>
2025-12-01 19:36:04 +00:00
Silvio Vilerino
3917a5d12a mediafoundation: Move dpb_buffer_manager::get_read_only_handle into d3d12 driver and cache resource
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38750>
2025-12-01 19:36:04 +00:00
Aitor Camacho
16c98f4f18 vulkan/cmd_queue: Use vk_strdup and free allocated string memory
Fixes: 9082715ab0 ("vk/cmd_queue: generate copies for string struct members")

Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38634>
2025-12-01 18:44:47 +00:00
Natalie Vock
a7a4abc8d8 radv: Move VMID reservation to vkCreateDevice
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
DXVK's DXGI implementation can create extra instances used for
enumerating physical devices besides the games' instance. When reserving
VMIDs for SPM, the DXGI instances may snatch the VMID reservation early,
making VMID reservation for the instance that actually needs it fail.
This starts being a problem on kernels 6.18+ where only one user may
reserve a VMID at a time.

Move reserving VMIDs to SQTT initialization inside vkCreateDevice so
that only the instances that actually create logical devices try
reserving VMIDs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38746>
2025-12-01 17:35:14 +00:00
Benjamin Cheng
fa1fd2413f radv/video: Fix force_integer_mv=1 on intra frame
According to AV1 spec, force_integer_mv=1 on intra frames. However, VCN
FW does not expect integer mv to be set unless screen content tools are
enabled. This also aligns the code to the radeonsi logic.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38716>
2025-12-01 17:12:00 +00:00
Sergi Blanch Torne
076a383437 Revert "ci: disable Collabora's farm due to maintenance"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit 7c36fc1b74.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38736>
2025-12-01 13:41:54 +00:00
Eric R. Smith
6735fe939a panvk: enable ycbcr on bifrost
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This also enables EXT_image_drm_format_modifier, which depends on
ycbcr.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38145>
2025-12-01 13:22:40 +00:00
Boris Brezillon
3f021404eb panvk/bifrost: Fix YCbCr texture/sampler array indexing
When the number of planes per descriptor is greater than one, the layout
used on Bifrost doesn't work. Fix that by making sure all plane
descriptors are contiguous in the texture/sampler table.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38145>
2025-12-01 13:22:38 +00:00
Eric R. Smith
e1a0f2260b panvk: fix ycbcr format issues on bifrost
When preparing the attribute buffer descriptor,  need to select the
correct plane index for multi-planar images (like ycbcr ones)

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38145>
2025-12-01 13:22:37 +00:00
Mary Guillemard
072ea76a47 nvk: Implement ISBE space sharing on vertex stage
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When a vertex shader does not load any input attributes after any store
of output attributes, we can enable bit 25 of SPH ("ISBE space sharing")

Effectively this seems to allow input and output attributes to live in
the same allocated space in ISBE and could improve occupancy.

Found while researching geometry passthrough and mesh shaders.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38729>
2025-12-01 10:53:53 +01:00
Aitor Camacho
60f6bd4761 kk: Clamp negative array indices to 0
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Required so that uint array formats don't incorrectly wrap to last array
slice instead of the first one. For some reason this only happens with
uint texture formats while int and float formats work as expected.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38713>
2025-12-01 09:09:58 +00:00
Samuel Pitoiset
5527b71bce ci: uprev VKCTS main to 211e452358f5cafd14bdd76d78342b62741e94aa
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/38651>
2025-12-01 08:21:38 +01:00
Sergi Blanch Torne
7c36fc1b74 ci: disable Collabora's farm due to maintenance
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Planned downtime in the farm:
* Start: 2025-12-01 08:00 UTC
* End: 2025-12-01 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38649>
2025-12-01 07:02:38 +00:00
Qiang Yu
2f6a034528 glsl: support barrier() for task and mesh shader
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It was ignored when translating glsl to nir.

Fixes: d52452a486 ("glsl: allow barrier builtin functions for mesh shader")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38692>
2025-12-01 02:33:00 +00:00
Benjamin Cheng
9e37969179 radv/video: Override direct_spatial_mv_pred to 1
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
VCN always uses spatial direct mode.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38686>
2025-11-30 15:37:46 +00:00
Benjamin Cheng
e5a9b1f28a radv/video: Support two L0 refs on VCN3+
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38686>
2025-11-30 15:37:45 +00:00
Benjamin Cheng
ab56ce154b radv/video: Fix H264/H265 reference selection
The order of pReferenceSlots is not well-defined by spec. Instead we
need to look at the RefPicList0/1 which provides slot indices.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38686>
2025-11-30 15:37:44 +00:00
Benjamin Cheng
2e21eec921 radv/video: Fix num_ref_idx_l{0,1} related overrides
Since we only support 1 L0/L1 ref, the default num refs in the PPS
should always be 0. With that there never any need to set the override
flag in the slice header (until more references are supported).
Also the ref pic list modifications should be clamped to the size of the
ref pic list.

This fixes an issue seen with dEQP-VK.video.encode.h264.i_p_b_13_*.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38686>
2025-11-30 15:37:44 +00:00
spencer-lunarg
9a497d6fc1 lavapipe: Check for VkCopyMemoryIndirectCommandKHR::size of zero
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Adds a bit of robustness to indirect memory copies

Signed-off-by: spencer-lunarg <spencer@lunarg.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38384>
2025-11-30 13:10:34 +00:00
Hans-Kristian Arntzen
d7cf200b49 vulkan/wsi: Add missing KHR_surface_maintenance1 promotions.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Weird that CTS did not catch that ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 11195eb8de ("vulkan: Add KHR_swapchain_maintenance1 promotions.")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38728>
2025-11-30 12:17:33 +01:00
Hans-Kristian Arntzen
11195eb8de vulkan: Add KHR_swapchain_maintenance1 promotions.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37157>
2025-11-30 10:30:53 +01:00
Hans-Kristian Arntzen
974dba2afe vulkan/wsi: Promote EXT_swapchain/surface_maintenance1.
No spec changes, just update the enums and types.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37157>
2025-11-30 10:30:52 +01:00
Yiwei Zhang
6b9c4535f9 venus: support VK_EXT_shader_uniform_buffer_unsized_array
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/38722>
2025-11-30 08:09:20 +00:00
Yiwei Zhang
918f81ff05 venus: support VK_EXT_shader_float8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722>
2025-11-30 08:09:20 +00:00
Yiwei Zhang
d1181b6cb7 venus: support VK_KHR_shader_untyped_pointers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722>
2025-11-30 08:09:20 +00:00
Yiwei Zhang
7949aeafaf venus: support VK_KHR_shader_bfloat16
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722>
2025-11-30 08:09:19 +00:00
Yiwei Zhang
219bb0e01e venus: support VK_KHR_cooperative_matrix
Tested with dEQP-VK.compute.pipeline.cooperative_matrix.* on anv with
INTEL_LOWER_DPAS=true

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722>
2025-11-30 08:09:19 +00:00
Yiwei Zhang
463ab89afb venus: sync latest protocol for more shader extensions support
Below are added:
- VK_KHR_cooperative_matrix
- VK_KHR_shader_bfloat16
- VK_KHR_shader_untyped_pointers
- VK_EXT_shader_float8
- VK_EXT_shader_uniform_buffer_unsized_array

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722>
2025-11-30 08:09:19 +00:00
Yiwei Zhang
5ca8113eb9 venus: sync protocol for sorted VkCommandTypeEXT enum defines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38722>
2025-11-30 08:09:19 +00:00
Calder Young
c0d809820f intel: Fix calculation of max_scratch_ids on fused devices
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The subslice IDs provided by the SR0.0 EU register are not adjusted to account
for fusing, so the upper bound max_scratch_ids can vary from device to device
depending on what specific slices were fused during manufacturing.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38689>
2025-11-29 15:10:29 +00:00
Georg Lehmann
d86f5f6bcb aco/optimizer: apply omod to pseudo scalar trans instructions
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 2062 (2.11% of 97637) affected shaders:
Instrs: 8061281 -> 8055482 (-0.07%); split: -0.07%, +0.00%
CodeSize: 42727968 -> 42696504 (-0.07%); split: -0.07%, +0.00%
Latency: 54739436 -> 54737749 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 10833704 -> 10833346 (-0.00%); split: -0.00%, +0.00%
VClause: 167276 -> 167275 (-0.00%)
SClause: 160183 -> 160163 (-0.01%); split: -0.02%, +0.01%
Copies: 684315 -> 683984 (-0.05%); split: -0.05%, +0.00%
PreSGPRs: 146747 -> 146746 (-0.00%)
VALU: 4377180 -> 4377168 (-0.00%); split: -0.00%, +0.00%
SALU: 1255321 -> 1251342 (-0.32%); split: -0.32%, +0.00%
VOPD: 16467 -> 16469 (+0.01%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:59 +00:00
Georg Lehmann
b82339d99e aco/optimizer: use new helpers for omod/clamp
Also resolves the old TODO about using omod for multiplication
with negative 0.5, 2.0 or 4.0.

Foz-DB Navi21:
Totals from 5680 (5.82% of 97591) affected shaders:
MaxWaves: 111976 -> 111974 (-0.00%)
Instrs: 12013419 -> 12003946 (-0.08%); split: -0.08%, +0.00%
CodeSize: 65379508 -> 65364884 (-0.02%); split: -0.04%, +0.02%
VGPRs: 375840 -> 375856 (+0.00%); split: -0.00%, +0.01%
Latency: 85804600 -> 85784850 (-0.02%); split: -0.03%, +0.01%
InvThroughput: 20705698 -> 20692571 (-0.06%); split: -0.07%, +0.00%
VClause: 269772 -> 269606 (-0.06%); split: -0.09%, +0.03%
SClause: 324997 -> 324934 (-0.02%); split: -0.03%, +0.01%
Copies: 963255 -> 963264 (+0.00%); split: -0.06%, +0.06%
Branches: 326691 -> 326688 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 345106 -> 345109 (+0.00%)
PreVGPRs: 317681 -> 317729 (+0.02%)
VALU: 8372681 -> 8363374 (-0.11%); split: -0.11%, +0.00%
SALU: 1456669 -> 1456589 (-0.01%); split: -0.01%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:59 +00:00
Georg Lehmann
69b5767eee aco/optimizer: use new helpers to create v_fma_mixlo_f16
Foz-DB Navi21:
Totals from 69 (0.07% of 97591) affected shaders:
Instrs: 45091 -> 45057 (-0.08%)
CodeSize: 244016 -> 243932 (-0.03%); split: -0.12%, +0.09%
VGPRs: 1792 -> 1680 (-6.25%)
Latency: 133496 -> 133572 (+0.06%); split: -0.03%, +0.09%
InvThroughput: 35383 -> 35338 (-0.13%)
Copies: 4050 -> 4048 (-0.05%)
VALU: 30172 -> 30138 (-0.11%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:58 +00:00
Georg Lehmann
ee28801eae aco/optimizer: use new helpers to apply insert
Foz-DB Navi21:
Totals from 505 (0.52% of 97591) affected shaders:
Instrs: 1438254 -> 1436780 (-0.10%); split: -0.11%, +0.01%
CodeSize: 8063364 -> 8054192 (-0.11%); split: -0.13%, +0.01%
Latency: 18596788 -> 18597262 (+0.00%); split: -0.01%, +0.01%
InvThroughput: 5213861 -> 5213061 (-0.02%); split: -0.02%, +0.01%
VClause: 37121 -> 37130 (+0.02%)
Copies: 174744 -> 175222 (+0.27%); split: -0.07%, +0.34%
Branches: 65722 -> 65718 (-0.01%)
VALU: 912967 -> 911074 (-0.21%); split: -0.21%, +0.00%
SALU: 251045 -> 251560 (+0.21%); split: -0.01%, +0.21%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:58 +00:00
Georg Lehmann
d60ce9ceef aco/optimizer: use new helpers to apply packed fsat
No Foz-DB changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:57 +00:00
Georg Lehmann
0a82c8cb13 aco/optimizer: back propagate modifiers through rcp
Foz-DB Navi21:
Totals from 5 (0.01% of 97591) affected shaders:
Instrs: 1473 -> 1468 (-0.34%)
CodeSize: 7664 -> 7660 (-0.05%)
Latency: 25897 -> 25863 (-0.13%)
InvThroughput: 2737 -> 2731 (-0.22%)
VALU: 1141 -> 1136 (-0.44%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:57 +00:00
Georg Lehmann
4442064449 aco/optimizer: use new helpers to apply neg/abs to output of instructions
Foz-DB Navi21:
Totals from 6765 (6.93% of 97591) affected shaders:
MaxWaves: 134398 -> 134408 (+0.01%)
Instrs: 9775725 -> 9768079 (-0.08%); split: -0.08%, +0.01%
CodeSize: 50785228 -> 50777880 (-0.01%); split: -0.02%, +0.01%
VGPRs: 445840 -> 445784 (-0.01%)
SpillSGPRs: 14483 -> 14476 (-0.05%)
Latency: 40232431 -> 40230284 (-0.01%); split: -0.04%, +0.03%
InvThroughput: 10339051 -> 10329846 (-0.09%); split: -0.09%, +0.00%
VClause: 186785 -> 186788 (+0.00%); split: -0.01%, +0.01%
SClause: 157106 -> 157116 (+0.01%); split: -0.00%, +0.01%
Copies: 746817 -> 745378 (-0.19%); split: -0.26%, +0.07%
Branches: 189298 -> 189211 (-0.05%); split: -0.06%, +0.01%
PreSGPRs: 346169 -> 346158 (-0.00%)
PreVGPRs: 370712 -> 370660 (-0.01%); split: -0.02%, +0.00%
VALU: 6847295 -> 6839753 (-0.11%); split: -0.11%, +0.00%
SALU: 1139960 -> 1139942 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:56 +00:00
Georg Lehmann
58f407702d aco/optimizer: handle gfx11+ vinterp as fma special case
No effect on its own, but will be important for output modifiers.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:56 +00:00
Georg Lehmann
37d3c63a12 aco/optimizer: add new helpers for applying output modifiers
To replace the old instr_mod_labels.

Foz-DB Navi21:
Totals from 683 (0.70% of 97591) affected shaders:
Instrs: 3341288 -> 3340447 (-0.03%); split: -0.03%, +0.00%
CodeSize: 18522460 -> 18520212 (-0.01%); split: -0.01%, +0.00%
Latency: 34359519 -> 34358772 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 9229621 -> 9229494 (-0.00%); split: -0.00%, +0.00%
Copies: 368383 -> 368260 (-0.03%); split: -0.04%, +0.00%
PreSGPRs: 48060 -> 48061 (+0.00%)
SALU: 543991 -> 543150 (-0.15%); split: -0.16%, +0.00%

Changes are caused by optimizing not(salu) without killed scc.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:56 +00:00
Georg Lehmann
fc29821d3b aco/optimizer: move med3 -> add_clamp opt later
Soon we will apply omod later,
when the combine_instruction reaches the multiplication with constant.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38658>
2025-11-29 08:27:55 +00:00
Georg Lehmann
39a61502e5 aco/opt_postRA: allow v_cmpx to clobber exec before nop split/create vector
Kind of ugly, but I really hate seeing this in every rt traversal loop:

image_bvh64_intersect_ray v[56:59], [v40, v41, v42, v47, v48, v49, v50, v51, v52, v53, v54, v55], s[44:47]
v_cmp_class_f32_e64 s57, 0xff800000, v12
s_and_b32 exec_lo, s57, exec_lo
s_cbranch_execz BB219

Foz-DB Navi21:
Totals from 3394 (3.48% of 97591) affected shaders:
Instrs: 9536259 -> 9533592 (-0.03%)
CodeSize: 51657072 -> 51640120 (-0.03%); split: -0.03%, +0.00%
Latency: 109493553 -> 109513317 (+0.02%); split: -0.01%, +0.02%
InvThroughput: 29125525 -> 29131876 (+0.02%); split: -0.00%, +0.02%
Copies: 815888 -> 818219 (+0.29%); split: -0.01%, +0.30%
Branches: 277451 -> 277449 (-0.00%)
SALU: 1217642 -> 1214976 (-0.22%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38697>
2025-11-29 08:02:24 +00:00
Marek Olšák
1f2d129bfa gallium: add a flag to finalize_nir to allow drivers to skip NIR opts
This could help achieve better compile times.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38600>
2025-11-29 07:29:05 +00:00
Marek Olšák
9294448fe1 nir/recompute_io_bases: report progress only if anything was changed
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
also preserve all metadata because it doesn't add/remove any instructions

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38599>
2025-11-29 05:00:40 +00:00
Marek Olšák
e6499fa73e nir/recompute_io_bases: move color input bases after all other inputs
This is related to the FS prolog.
It should have no effect on other drivers.

v2: make it optional via io_options

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38599>
2025-11-29 05:00:40 +00:00
Marek Olšák
18a338066b nir/recompute_io_bases: don't use safe iterators
the pass doesn't remove anything

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38599>
2025-11-29 05:00:40 +00:00
Faith Ekstrand
4711e5954e nir: Always use sysvals in lower_input_attachments()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The last holdouts of the var options are gone so we can just emit the
system values.  This is overall simpler as it confines all the sysval to
var logic to nir_lower_sysvals_to_varyings().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38562>
2025-11-29 00:50:34 +00:00
Faith Ekstrand
5bbbf5cf9b tu: Set use_layer_id_sysval for nir_lower_input_attachments
We can just use nir_lower_sysvals_to_varyings instead.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38562>
2025-11-29 00:50:33 +00:00
Faith Ekstrand
b02a98d7d8 microsof: Run lower_sysvals_to_varyings after lower_input_attachments
This lets us request system values from lower_input_attachments and just
lower them ourselves instead of asking it to create variables.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38562>
2025-11-29 00:50:32 +00:00
Faith Ekstrand
82280a7e86 nir: Support sysval intrinsics in lower_sysvals_to_varyings()
Since this is a downgrade path for drivers, it's useful to support both
forms of these common sysvals.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38562>
2025-11-29 00:50:32 +00:00
Faith Ekstrand
0c36c39103 spirv: Emit SYSTEM_VALUE_LAYER_ID for fragment shaders
We have nir_lower_sysvals_to_varyings() so we can just have that lower
it for the drivers who don't want a sysval.  Most have to support the
sysval version anyway for various lowering so making them all have to
support both is pretty annoying.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38562>
2025-11-29 00:50:32 +00:00
Faith Ekstrand
701a9c269e nir: Add LAYER_ID and VIEW_INDEX to nir_lower_sysvals_to_varyings()
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38562>
2025-11-29 00:50:31 +00:00
Marek Olšák
fa0bea5ff8 nir: remove nir_io_add_const_offset_to_base
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
nir_opt_constant_folding does it now.

Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38277>
2025-11-29 00:16:38 +00:00
Marek Olšák
726bbb352e nir/opt_constant_folding: add nir_io_add_const_offset_to_base behavior
We almost always call both passes next to each other.

The code is copied from nir_io_add_const_offset_to_base. No changes.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38277>
2025-11-29 00:16:38 +00:00
Marek Olšák
9a56672f56 nir: add shader_info::disable_input/output_offset_src_constant_folding
and set it where needed to prevent nir_opt_constant_folding from breaking
those drivers.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38277>
2025-11-29 00:16:38 +00:00
Marek Olšák
7330bca9db nir: handle load_fs_input_interp_deltas in nir_is_input_load
for nir_opt_constant_folding

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38277>
2025-11-29 00:16:37 +00:00
Marek Olšák
ffcbbeb54a nir/validate: don't require offset src to be 0 if constant
nir_opt_constant_folding does the folding, so this can be non-zero before
that.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38277>
2025-11-29 00:16:36 +00:00
Eric Engestrom
b87b83d15e broadcom/ci: update device count in ci-tron farm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38719>
2025-11-28 23:50:01 +01:00
Eric Engestrom
c09550e3c0 broadcom/ci: apply "Cannot open root device" reboot workaround to all rpi boards
The problem has been observed on rpi4 and rpi5 as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38719>
2025-11-28 23:43:07 +01:00
Marek Olšák
21cdbfa223 ac,radv: move opt_vectorize_callback to common code
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
radeonsi will use it.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38603>
2025-11-28 20:16:10 +00:00
Marek Olšák
2c9995a94f ac/nir: move aco_nir_op_supports_packed_math_16bit here
aco_nir_op_supports_packed_math_16bit currently can't be used by amd/common
because tests don't link with ACO, so linking would fail, but we want
to move the nir_opt_vectorize callback here that uses it.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38603>
2025-11-28 20:16:10 +00:00
Juan A. Suarez Romero
d95b43e07b broadcom/ci: remove ci-tron- prefix from nightly jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All the nighly jobs are run with CI-Tron, so no need to prefix them.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38715>
2025-11-28 18:09:09 +01:00
Juan A. Suarez Romero
50ba2a0e34 broadcom/ci: remove all baremetal nightly jobs
All those jobs will be executed using CI-Tron.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38715>
2025-11-28 18:09:09 +01:00
Yiwei Zhang
a6ade961b2 venus: implement VK_EXT_map_memory_placed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38706>
2025-11-28 16:38:26 +00:00
Yiwei Zhang
8adfdc3304 venus: add renderer support for placed mapping
Prepare for VK_EXT_map_memory_placed support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38706>
2025-11-28 16:38:25 +00:00
David Rosca
38090d5be0 radv/video: Drop casts from vk_find_struct*
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The macro itself does the cast.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38521>
2025-11-28 15:35:26 +00:00
David Rosca
32a02720a8 radv/video: Init session and update rate control in ControlVideoCoding
This eliminates the last state we kept in encode video session.
Also fixes changing encode resolution without reset.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38521>
2025-11-28 15:35:26 +00:00
David Rosca
a7fe0188d4 radv/video: Remove tile config and skip mode from video session state
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38521>
2025-11-28 15:35:25 +00:00
David Rosca
5d0d00e5f8 radv/video: Use radv_enc_aligned_coded_extent for session params overrides
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38521>
2025-11-28 15:35:25 +00:00
David Rosca
0fc4ead36f radv/video: Remove enc_session from video session state
It was only used to store aligned picture size. Add helper
function to get the aligned size and use it when needed.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38521>
2025-11-28 15:35:25 +00:00
Samuel Pitoiset
c3420ca932 Revert "radv: remove the workaround for DISPATCH_TASKMESH_INDIRECT_MULTI_ACE on GFX10.3"
This reverts commit 0391902eb5.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38711>
2025-11-28 15:34:53 +01:00
Georg Lehmann
653716b745 nir/opt_algebraic: create more bit test
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Helps hackends with has_bit_test more (i.e. ACO), but it
shouldn't hurt others either.

Foz-DB Navi21:
Totals from 1138 (1.17% of 97591) affected shaders:
Instrs: 5478747 -> 5476055 (-0.05%); split: -0.05%, +0.00%
CodeSize: 29850188 -> 29853140 (+0.01%); split: -0.04%, +0.05%
SpillSGPRs: 1406 -> 1401 (-0.36%)
Latency: 42324245 -> 42325921 (+0.00%); split: -0.01%, +0.01%
InvThroughput: 11396940 -> 11394048 (-0.03%); split: -0.04%, +0.01%
VClause: 142294 -> 142309 (+0.01%); split: -0.00%, +0.01%
SClause: 124412 -> 124411 (-0.00%); split: -0.00%, +0.00%
Copies: 572696 -> 572749 (+0.01%); split: -0.02%, +0.03%
Branches: 199932 -> 199929 (-0.00%)
PreSGPRs: 73372 -> 74970 (+2.18%)
PreVGPRs: 79514 -> 79511 (-0.00%)
VALU: 3628764 -> 3625744 (-0.08%); split: -0.08%, +0.00%
SALU: 818258 -> 818475 (+0.03%); split: -0.03%, +0.06%

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38700>
2025-11-28 13:25:24 +00:00
Valentine Burley
f9ef7e0f64 Revert "anv/ci: Run vkd3d job in parallel"
With the new vkd3d-proton uprev, a random crash has appeared when
running in parallel.

This reverts commit 45c9c61ad3.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38652>
2025-11-28 11:44:28 +00:00
Samuel Pitoiset
92a468f8f2 ci: uprev vkd3d
vkd3d-proton had an issue with its runner and few tests were excluded
by accident.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38652>
2025-11-28 11:44:28 +00:00
Erik Faye-Lund
60e115dedf mesa/st: do not drop binding prematurely
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
While it's true that we currently need to eventually fall back to
checking without the render-target binding, this should really be the
last resort. Because otherwise we might end up picking a format that
isn't possible to render to for a color-renderable internalformat.

In the long run, this code should be rewritten to check *properly* if
the internalformat is color-renderable or not *up front*, and not even
try to fall back. But we're currently missing proper helpers for this,
and reworking what we have is a fair bit of work.

So for now, let's just do what we currently do, but shuffle around the
order of testing things so we don't end up dropping unless we absolutely
have to.

Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38673>
2025-11-28 10:46:53 +00:00
Samuel Pitoiset
0391902eb5 radv: remove the workaround for DISPATCH_TASKMESH_INDIRECT_MULTI_ACE on GFX10.3
Only very old MEC firmwares are concerned, so let's remove it and
disable mesh shaders with those firmwares.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38691>
2025-11-28 10:21:30 +00:00
Christoph Pillmayer
262a427a51 pan/bi: Add missing 8bit widen swizzles
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38109>
2025-11-28 09:52:11 +00:00
Tapani Pälli
ba89826b75 anv: add furmark workaround layer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14274
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38410>
2025-11-28 09:26:41 +00:00
Timothy Arceri
d10036362f util/driconf: Add linux version of Penumbra fixes
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38563>
2025-11-28 08:49:55 +00:00
Job Noorman
233b77878d ir3/ra: try to allocate overlapping regs for shared subreg movs
This was implemented for vector RA but not for shared RA yet.

Totals from 1361 (0.77% of 176279) affected shaders:
Instrs: 1175437 -> 1170238 (-0.44%); split: -0.45%, +0.01%
CodeSize: 2300656 -> 2290258 (-0.45%)
NOPs: 221042 -> 220527 (-0.23%); split: -0.48%, +0.25%
MOVs: 30645 -> 30643 (-0.01%); split: -0.01%, +0.00%
COVs: 47425 -> 47016 (-0.86%)
(ss): 35953 -> 35890 (-0.18%); split: -0.21%, +0.03%
(sy): 20174 -> 20168 (-0.03%)
(ss)-stall: 124094 -> 123625 (-0.38%); split: -0.38%, +0.00%
(sy)-stall: 806166 -> 805832 (-0.04%); split: -0.06%, +0.02%
Preamble Instrs: 173151 -> 171299 (-1.07%)
Cat0: 250836 -> 250321 (-0.21%); split: -0.43%, +0.22%
Cat1: 78738 -> 78327 (-0.52%); split: -0.52%, +0.00%
Cat2: 386528 -> 382255 (-1.11%)

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38573>
2025-11-28 08:00:42 +00:00
Job Noorman
1fc49eb120 ir3/ra: try to allocate subreg movs earlier
Successful subreg allocations allow us to remove the instruction so it
makes sense to try this first before trying other allocation strategies.

Totals from 72 (0.04% of 176279) affected shaders:
Instrs: 144346 -> 144277 (-0.05%); split: -0.06%, +0.01%
CodeSize: 312174 -> 312182 (+0.00%); split: -0.01%, +0.01%
NOPs: 32438 -> 32443 (+0.02%); split: -0.07%, +0.09%
MOVs: 5923 -> 5934 (+0.19%)
COVs: 3039 -> 3000 (-1.28%)
(ss): 2967 -> 2968 (+0.03%)
(sy): 1831 -> 1830 (-0.05%)
(ss)-stall: 9113 -> 9128 (+0.16%)
(sy)-stall: 45844 -> 45858 (+0.03%); split: -0.03%, +0.06%
Cat0: 36136 -> 36141 (+0.01%); split: -0.06%, +0.08%
Cat1: 9010 -> 8982 (-0.31%); split: -0.37%, +0.06%
Cat2: 53533 -> 53487 (-0.09%)

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38573>
2025-11-28 08:00:42 +00:00
Samuel Pitoiset
5fd7af9e42 ac/surface: do not use tile swizzle for replayable/aliased FMASK surfaces
Otherwise the VA might change.

Fixes: 2bbc7d1db6 ("radv: move more surf_index logic to use_tile_swizzle")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38696>
2025-11-28 07:39:33 +00:00
Emma Anholt
2d441c10af ir3: Make the debug-print block numbers be the NIR block numbers.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We still have to fall back to our pointers-as-indices for things like the
preamble's block or old streamout (I'm presuming here that pointers will
always be much greater than the NIR block count, which seems safe enough
for debug).  This gives us nice printouts in debugoptimized builds, and
helps you correlate your ir3 back to NIR (which was helpful in the
hundreds of blocks in the shader I fixed in the previous commit).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38666>
2025-11-28 07:06:22 +00:00
Emma Anholt
a35f26a983 ir3: Fix incorrect use of predicated ifs on getlast.
The getlast lowering will generate new branches, violating the assumptions
of prede_sched().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38666>
2025-11-28 07:06:21 +00:00
Job Noorman
435db6fabe ir3: merge rpt groups after postsched
It often happens that postsched puts rpt groups back into an order that
allows them to be merged into a repeated instruction. Breaking up these
rpt groups before postsched loses this opportunity.

To fix this, change ir3_cleanup_rpt to not take the ip into account and
call ir3_merge_rpt after postsched.

Totals from 129238 (73.31% of 176279) affected shaders:
MaxWaves: 1834226 -> 1834248 (+0.00%); split: +0.00%, -0.00%
Instrs: 46484782 -> 46382869 (-0.22%); split: -0.69%, +0.48%
CodeSize: 95513914 -> 93871848 (-1.72%); split: -2.24%, +0.52%
NOPs: 8018516 -> 7939362 (-0.99%); split: -3.28%, +2.30%
MOVs: 1391770 -> 1408039 (+1.17%); split: -4.39%, +5.56%
COVs: 776518 -> 776182 (-0.04%); split: -0.06%, +0.02%
Full: 1473903 -> 1489694 (+1.07%); split: -0.76%, +1.83%
(ss): 1143180 -> 1146977 (+0.33%); split: -3.07%, +3.40%
(sy): 552487 -> 562122 (+1.74%); split: -1.83%, +3.57%
(ss)-stall: 4292082 -> 4259946 (-0.75%); split: -3.95%, +3.20%
(sy)-stall: 16573976 -> 17151457 (+3.48%); split: -2.41%, +5.89%
STPs: 16131 -> 16157 (+0.16%); split: -0.10%, +0.26%
LDPs: 19583 -> 19634 (+0.26%); split: -0.02%, +0.28%
Preamble Instrs: 9889595 -> 9887178 (-0.02%); split: -0.23%, +0.21%
Early Preamble: 103194 -> 103646 (+0.44%); split: +0.51%, -0.07%
Cat0: 8850422 -> 8769964 (-0.91%); split: -3.00%, +2.09%
Cat1: 2212326 -> 2226425 (+0.64%); split: -2.90%, +3.54%
Cat2: 17452525 -> 17448724 (-0.02%); split: -0.02%, +0.00%
Cat6: 501182 -> 501263 (+0.02%); split: -0.00%, +0.02%
Cat7: 1293844 -> 1262010 (-2.46%); split: -4.17%, +1.71%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38576>
2025-11-28 06:41:32 +00:00
Job Noorman
e8dbed2be4 ir3: don't use list_head for rpt groups
To link together instructions in a rpt group we currently (ab)use
list_head. This is a bit of a hack because we don't actually have a
list_head that points to the first instruction without being embedded in
an instruction itself (the way list_head is supposed to be used).
Instead, the list_head embedded in the first instruction of a rpt group
also serves as the one pointing to the list. In order make a distinction
between the first and last instruction (for which the main list_head
would usually be used), we rely on the fact that (currently)
instructions in a rpt group are emitted in order which means that later
instructions have a larger serialno than earlier ones.

In order to make all this less hacky, and to lift the restriction of
needing instructions to be emitted in order, replace the list_head with
explicit rpt_next/rpt_prev pointers which link the instructions together
in a doubly but non-circular linked list.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38576>
2025-11-28 06:41:32 +00:00
Emma Anholt
2cf0ba35bc ir3: Drop the vector splitting and simplify ir3_nir_lower_64b_global().
There's no need to generate the separate memory accesses, when
nir_lower_mem_access_bit_sizes() has already done so.  Also, the way the
64b address is handled changed in 2490ecf5fc ("ir3: ingest global
addresses as 64b values from NIR")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38688>
2025-11-28 06:14:00 +00:00
Emma Anholt
997c500cc4 ir3: Drop ir3_nir_lower_64b_intrinsics
Our 64-bit memory load/stores are already split to 32 bits by
nir_lower_mem_access_bit_sizes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38688>
2025-11-28 06:14:00 +00:00
Emma Anholt
f8901bddac ir3: Drop use of nir_lower_wrmasks().
It gets done by nir_lower_mem_access_bit_sizes that's called right after.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38688>
2025-11-28 06:13:59 +00:00
Emma Anholt
959520e227 tu: Add a loop count to VK_pipeline_executable_properties.
This will improve the report-fossil summaries I'm looking at for loop
unrolling, by showing me that loop count changed.  With a followup change
for my report-fossil to bring over behavior from GL report.py where we
ignore other counters when loop count changes (yeah, you expected to
increase instruction counts, it's fine), we go from:

    Totals:
    Instrs: 73000 -> 73242 (+0.33%)
    CodeSize: 142250 -> 142506 (+0.18%)
    NOPs: 13896 -> 13964 (+0.49%)
    MOVs: 2440 -> 2438 (-0.08%)
    Full: 1489 -> 1490 (+0.07%)
    (ss): 1742 -> 1754 (+0.69%)
    (ss)-stall: 7226 -> 7354 (+1.77%)
    Number of hardware loops: 79 -> 78 (-1.27%)
    [...]

    Totals from 1 (0.60% of 168) affected shaders:
    Instrs: 184 -> 426 (+131.52%)
    CodeSize: 288 -> 544 (+88.89%)
    NOPs: 80 -> 148 (+85.00%)
    MOVs: 9 -> 7 (-22.22%)
    Full: 11 -> 12 (+9.09%)
    (ss): 14 -> 26 (+85.71%)
    (ss)-stall: 58 -> 186 (+220.69%)
    Number of hardware loops: 2 -> 1 (-50.00%)
    [...]

     PERCENTAGE DELTAS                              Shaders   Instrs   CodeSize    NOPs      MOVs      Full [...]
     app_name               168       +0.33%    +0.18%    +0.49%    -0.08%    +0.07%    +0.69%    +1.77%    [...]
     -------------------------------------------------------------------------------------------------------[...]
     All affected           1        +131.52%  +88.89%   +85.00%   -22.22%    +9.09%   +85.71%   +220.69%   [...]
     -------------------------------------------------------------------------------------------------------[...]
     Total                  168       +0.33%    +0.18%    +0.49%    -0.08%    +0.07%    +0.69%    +1.77%    [...]

to:

    Totals:
    Number of hardware loops: 79 -> 78 (-1.27%)

    Totals from 1 (0.60% of 168) affected shaders:
    Number of hardware loops: 2 -> 1 (-50.00%)

     PERCENTAGE DELTAS      Shaders Number of hardware loops
     app_name               168              -1.27%
     ---------------------------------------------------------
     All affected           1                -50.00%
     ---------------------------------------------------------
     Total                  168              -1.27%

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38667>
2025-11-28 05:42:50 +00:00
Emma Anholt
24d9592118 tu: Avoid buffer overflows during inline uniform block updates.
At the last round of the "remaining > 0" loop, we'd deref of the end of
binding layout in setting up pointers for the next loop.  We don't need
these values that were getting updated at this point.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38684>
2025-11-28 05:18:21 +00:00
Emma Anholt
da5a555e40 tu: Fix buffer overflow optimizing MSRTT.
i is a subpass number, j is the attachment number we're trying to turn
into an attachment.

Fixes: f6c7f16322 ("tu: Implement VK_EXT_multisampled_render_to_single_sampled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38684>
2025-11-28 05:18:21 +00:00
Emma Anholt
89da258e71 tu: Fix leak of compute shader pipeline->base.executables_mem_ctx;
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14358
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38684>
2025-11-28 05:18:21 +00:00
Emma Anholt
d9486c33f2 tu: Fix leak of MSTRSS temporaries.
Fixes: f6c7f16322 ("tu: Implement VK_EXT_multisampled_render_to_single_sampled")
Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14358
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38684>
2025-11-28 05:18:21 +00:00
Aleksi Sapon
cef4102548 nir, vk: fix MSVC unused variable warning
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38663>
2025-11-28 01:52:12 +00:00
Mohamed Ahmed
dcaf64102f nvk: Move non-sparse image plane VA allocation to bind time
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is done in preparation of compression enablement to avoid allocating a VA
and then delete it later because compressed images use the memory object VA and
not the image plane VA. This guarantees we never put the image in an invalid
state and saves us an alloc and free in case of compressed images.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38702>
2025-11-28 00:30:30 +00:00
Mohamed Ahmed
21165c7972 nil, nvk: Add plumbing for compression
This lays the groundwork for enabling compression by adding a way to pass in
whether the image will be compressed or not from NVK to NIL.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38702>
2025-11-28 00:30:30 +00:00
Faith Ekstrand
02b4647a1c nvk: Add a dedicated_image to nvk_device_memory
Also refactor the dedicated image handling a tiny bit to make the next
bit easier.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38702>
2025-11-28 00:30:29 +00:00
Mohamed Ahmed
9bd51ce508 nvk/nvkmd: Fix alignments
Previously, there was some mixing up of alignments between the alignment
provided by the caller, and the minimum alignment we have (4KiB). Additionally,
there was some redundant aligning being done to data already passed in aligned.
This didn't matter because we were always using 4K pages anyways due to kernel
limitations. However, this now needs fixing to allow for larger page support.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38702>
2025-11-28 00:30:29 +00:00
Mohamed Ahmed
88b92dc3d3 nouveau/winsys: Retrieve and store the PTE kind in the nouveau_ws_bo
Previously, for imports we wouldn't carry over the PTE kind with the import,
which worked fine up till now. However, compression depends on the PTE kind
being correct otherwise there will be a mismatch between both sides.

The GEM info object we get from the kernel already has the PTE kind embedded in
the tile flags object, so all we have to do is retrieve it and store in the bo
object, and then the lower layers can retrieve the kind from the bo directly.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38702>
2025-11-28 00:30:29 +00:00
Mohamed Ahmed
3af0ee04a5 nouveau/winsys: Store the nouveau kernel version
This is so we can enable features needing kernel support based on whether the
detected kernel driver supports them or not by checking for the version in
nvkmd.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38702>
2025-11-28 00:30:29 +00:00
Mel Henning
7a492e102f nvk: Use the OS page size in nvk_AllocateMemory
In bccb9fe091 ("nvk/nvkmd: nouveau uses the OS page size"),
the alignment size was narrowed to the OS page size in
nvkmd_nouveau_alloc_tiled_mem. This makes the same change
for nvk_AllocateMemory.

This is being done in preparation for large page support, which will
be more picky about alignments.

Reviewed-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38702>
2025-11-28 00:30:29 +00:00
Christian Gmeiner
ab86088438 etnaviv: Defer GPU state reset until first draw call
Currently, GPU state is reset immediately after each flush and during
context creation, even when the next command might be a simple BLT/RS
operation that doesn't require the full GPU rendering pipeline.

This patch introduces lazy GPU state reset by:
- Adding a needs_gpu_state_reset flag to track when reset is needed
- Setting the flag to true after flush instead of immediately resetting
- Only performing the actual reset in etna_draw_vbo() when rendering

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36565>
2025-11-27 23:06:28 +00:00
Christian Gmeiner
55447790c4 etnaviv: rs: Move RS_SINGLE_BUFFER control to per-operation basis
Move RS_SINGLE_BUFFER from global context initialization to individual
RS operations, enabling it before each operation and disabling it
immediately after. The same pattern is seen in traces from the binary
blob driver.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36565>
2025-11-27 23:06:28 +00:00
Christian Gmeiner
d7fff632cd lavapipe: Trivially expose VK_GOOGLE_user_type extension
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There's nothing for the driver to do; it's all handled in spirv_to_nir.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38574>
2025-11-27 20:52:17 +00:00
Yiwei Zhang
73e8d6533e docs: add VK_KHR_robustness2 and supported drivers
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/38690>
2025-11-27 19:51:28 +00:00
Yiwei Zhang
78029a2773 venus: enable promoted VK_KHR_robustness2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38690>
2025-11-27 19:51:28 +00:00
Yiwei Zhang
6ba742e334 venus: sync to latest protocol for v1.4.334
This also includes enabling the promoted VK_KHR_robustness2.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38690>
2025-11-27 19:51:28 +00:00
Yonggang Luo
9d3d15f871 util,wgl: Replace usage of putenv with os_unset_option,os_set_option
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:34 +00:00
Yonggang Luo
168042fb05 gfxstream: os_set_option can be used on windows now
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:34 +00:00
Yonggang Luo
0a32d5e6fd treewide: Use regexp to replace usage of setenv with os_set_option.
setenv\((.*), 1\);
=>
os_set_option($1, true);

setenv\((.*), 0\);
=>
os_set_option($1, false);

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:34 +00:00
Yonggang Luo
1825715623 treewide: Use regexp to replace usage of unsetenv with os_unset_option.
unsetenv\((.*)\);
=>
os_unset_option($1);

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:33 +00:00
Yonggang Luo
d277dfdd76 treewide: Replace the usage of setenv manually and #include "util/os_misc.h" when needed
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:33 +00:00
Yonggang Luo
5ab8148f23 util: Update os_get_option* comments to match os_set_option
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:32 +00:00
Yonggang Luo
2771eb39fd util: Add function os_unset_option/os_set_option for latter use
It's will be used to replace SetEnvironmentVariableA,putenv on windows
and putenv,setenv on non-windows

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:32 +00:00
Yonggang Luo
123a66fc43 util,asahi,vulkan,panfrost: Replace the remaining usage of getenv with os_get_option
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:32 +00:00
Tapani Pälli
95938823f4 compiler/glsl: validate input blocks with opaque/booleans
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Commit adds a check for booleans/opaque types inside interfaces,
there is existing check for "regular varyings".

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14338
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38613>
2025-11-27 17:40:15 +00:00
Caterina Shablia
a338694c50 panvk: report support for sparseResidencyImage2D
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37483>
2025-11-27 17:05:43 +00:00
Caterina Shablia
5326c45174 panvk/csf: implement sparse image non-opaque binds
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37483>
2025-11-27 17:05:43 +00:00
Caterina Shablia
c87bdde596 panvk: align rows and layers of sparse resident images
When laying out a sparse partially-resident image we need to align
rows of ordered blocks to a mapping granularity in bytes (i.e. the
page size) and array layers to a multiple of sparse block size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37483>
2025-11-27 17:05:43 +00:00
Caterina Shablia
7421b38521 panvk: sparse partially-resident image -related queries
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37483>
2025-11-27 17:05:43 +00:00
Caterina Shablia
bd9aeeec0a pan/lib: introduce row_align_B and array_align_B constraints
To implement sparse partially-resident images, we need to be able
to express mapping in terms of rectangles of texel blocks.

With row_align_B we can constrain the rows of ordered blocks to
start at mapping boundary (i.e. page size) and using array_align_B
we can ensure that each subresource starts at a multiple of
whatever sparse block size we decide to use.

Not setting each of these fields is the same as setting them to 1.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37483>
2025-11-27 17:05:42 +00:00
Caterina Shablia
dbf20eb49f panvk: move sparse blackhole stuff to panvk_sparse.{c,h}
While we're at it also add the SPDX header to panvk_sparse.c
because I forgor to do that when it was first being added.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37483>
2025-11-27 17:05:42 +00:00
Lionel Landwerlin
515d8f8e3a brw: fix sample mask flag emission
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's also used for testing helper invocations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e3328dfa2f ("brw: only initialize sample mask flag if needed")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38699>
2025-11-27 15:59:35 +00:00
Pierre-Eric Pelloux-Prayer
671e943c9b mesa: fix function prototype
Replace void* by GLvoid* and add GLAPIENTRY to match the gl_API.xml
version.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14164
Fixes: ae75b59cb5 ("glthread, tc: Fix buffer release with glthread and tc")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38029>
2025-11-27 16:22:45 +01:00
Leon Perianu
bff723e50c pvr: pvr_pds_fragment_program_create fix allocation callback usage
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The staging buffer is persistent until the destruction of the pvr_pipeline
object, so we should set the allocation scope to PVR_ALLOC_SCOPE_OBJECT instead
of PVR_ALLOC_SCOPE_COMMAND.

Also did the same change in the function pvr_pds_coeff_program_create_and_upload
for the staging buffer, because that buffer is also destroyed at pipeline destruction.

Fixes dEQP-VK.api.object_management.single_alloc_callbacks.graphics_pipeline.

Signed-off-by: Leon Perianu <leon.perianu@imgtec.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Tested-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38662>
2025-11-27 13:18:31 +00:00
Juan A. Suarez Romero
b9b9c676e1 v3d/ci: update expected results
Some failures in OpenCL tests were fixed due commit a643681d.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38694>
2025-11-27 11:59:39 +00:00
Danylo Piliaiev
297c5b5de3 freedreno: Update A7XX_RB_UNKNOWN_8E09 to be in line with blob
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All A7XX GPUs seem to have A7XX_RB_UNKNOWN_8E09=0x7 according to
blob v819.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38680>
2025-11-27 11:27:03 +00:00
Job Noorman
bcd81c8172 freedreno/computerator: add option to print raw disassembly
It is sometimes useful to see the raw hex values of what instructions
are assembled to, similar to the output of shaders in cffdump. Add an
option for this to computerator.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37595>
2025-11-27 10:27:27 +00:00
Job Noorman
e413615d55 ir3: add ir3_disasm_options struct
We want to add some disassembly options in the future. Add new
ir3_shader_disasm_options function that takes options from a new
ir3_disasm_options struct in which we can add options later. The
original ir3_shader_disasm becomes a wrapper for the new function to not
have to update all call sites now.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37595>
2025-11-27 10:27:27 +00:00
Marek Olšák
166afc592b gallium/hud: don't fclose stdout for GALLIUM_HUD=...,stdout
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes printf doing nothing after the context is destroyed and recreated.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38601>
2025-11-27 03:21:12 +00:00
Yonggang Luo
6356efc4e0 gfxstream: Use os_get_option_dup(VK_DRIVER_FILES)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
As the return value os_get_option should be immediately consumed.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38687>
2025-11-27 10:20:52 +08:00
Yonggang Luo
d668c0ad42 gfxstream: Use VK_DRIVER_FILES instead of VK_ICD_FILENAMES as VK_ICD_FILENAMES is deprecated for a while.
This is a prepare for remove VK_ICD_FILENAMES in source tree.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38687>
2025-11-27 10:20:48 +08:00
Calder Young
09e8a54087 anv: Fix ray query shadow stack buffer size
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38685>
2025-11-26 22:49:52 +00:00
Sagar Ghuge
d8447fd392 vulkan/runtime: Account for pipeline libraries stage count
Don't excludes stages coming from pipeline libraries. This caused valid
group indices referring to library stages to be dropped, leading to
mismatched stage_count.

Fixes: e05a9b77b6 ("vulkan/runtime: split rt shaders hashing from compile")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38669>
2025-11-26 22:17:57 +00:00
Marek Olšák
e47be4f37b st/mesa: call nir_opt_intrinsics slightly later
It makes more progress after nir_lower_atomics_to_ssbo.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38598>
2025-11-26 16:24:06 -05:00
Marek Olšák
2ea30edc70 st/mesa: call nir_opt_intrinsics for the GL_SELECT shader
radeonsi may assert that this pass makes no progress. This is one place
that should call the pass.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38598>
2025-11-26 16:24:04 -05:00
Marek Olšák
eea5959a22 nir/lower_io_passes: call nir_opt_undef to eliminate undef output stores
If we do it here, we won't have to call nir_recompute_io_bases later again.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38598>
2025-11-26 16:23:49 -05:00
Roland Scheidegger
88ae1f8533 llvmpipe: optimize the centroid implementation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All things related to selecting the position when no sample is covered
isn't actually dependent on fragment shader loop iteration, in fact
it's not even dependent on the shader invocation, only the sample mask
(which is from jit context, not from shader key, otherwise could just
precalculate all of it). And certainly there's no need for all the extra
per-sample selects.
Just calculate it once at interpolation context init. LLVM should be able
to easily toss out (as with the previous version) all extra code done at
interpolation init if centroid interpolation isn't actually used.
(Although the code didn't turn out as simple as I hoped...)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38664>
2025-11-26 19:12:17 +00:00
Roland Scheidegger
9fb4b1e6dc llvmpipe: implement strict d3d11 rules for centroid interpolation
D3D11 is pretty strict about how to do centroid interpolation.
In particular, llvmpipe didn't honor these rules when no sample was
covered for a pixel (relevant for helper pixels), in this case llvmpipe
selected the position of the sample with the highest index (just due to
initialization, not really by choice).
Given that helper pixels are only really used for derivative calculations,
and derivatives are generally sketchy with centroid interpolation, this
seems quite a lot of work, but I suppose it could be useful if the state
sample mask has only 1 sample set (since these d3d11 rules then guarantee
that even with centroid the derivatives are actually useful as the
interpolation will be done at the position defined by the sample specified
in the sample mask, regardless if that sample is covered by the primitive
or not).
Other APIs might technically not need this (they tend to not even define
at which position centroid interpolation is done, other than it must be
inside the primitive), but it shouldn't really hurt them neither.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38664>
2025-11-26 19:12:17 +00:00
Samuel Pitoiset
930cab7702 radv: fix fbfetch output with ESO
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes a real issue when ESO uses fbfetch output because this
was determined after instead of before.

This solution isn't the most elegant one but binding graphics shaders
earlier would require more work. Let's just handle this specific corner
case for now.

This fixes
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.custom_resolve.shader_objects.fragment_region*
on some GPUs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38617>
2025-11-26 17:47:07 +00:00
Samuel Pitoiset
6569acbdf2 radv: make sure to reset uses_fbfetch_output for NULL fragment shaders
To prevent useless decompression passes if a previously bound FS was
using fbfetch output.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38617>
2025-11-26 17:47:07 +00:00
Ian Romanick
0c089a5c32 brw: Eliminate duplicate fills
When the register allocator decides to spill a value, all reads of that
value are filled. This can result in cases where the same value is
filled many times in a single block. In those cases, the result of an
earlier fill may still be available when a later fill occurs.

This optimization replaces the later fill with a move from the result of
the earlier fill.

v2: Use FIXED_GRF for register overlap tests. Since this is after
register allocation, the VGRF values will not tell the whole truth.

v3: Use brw_transform_inst. Suggested by Caio. Add
brw_scratch_inst::offset instead of storing it as a source. Suggested by
Lionel.

v4: In intervening spill to the same location also invalidates the
value. 🤦

v5: Don't eliminate a fill if its destination partially overlaps the
preceeding fill destination. Fixes failures in cooperative matrix CTS.

shader-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
total instructions in shared programs: 17249903 -> 17249653 (<.01%)
instructions in affected programs: 35550 -> 35300 (-0.70%)
helped: 20 / HURT: 0

total cycles in shared programs: 893092398 -> 893101836 (<.01%)
cycles in affected programs: 2501720 -> 2511158 (0.38%)
helped: 6 / HURT: 14

total fills in shared programs: 1901 -> 1776 (-6.58%)
fills in affected programs: 1757 -> 1632 (-7.11%)
helped: 20 / HURT: 0

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 929949528 -> 926770338 (-0.34%)
Cycle count: 105126671329 -> 104851299099 (-0.26%); split: -0.28%, +0.02%
Fill count: 6520785 -> 5021518 (-22.99%)

Totals from 54281 (2.69% of 2018922) affected shaders:
Instrs: 239616289 -> 236437099 (-1.33%)
Cycle count: 22051883404 -> 21776511174 (-1.25%); split: -1.33%, +0.08%
Fill count: 6406295 -> 4907028 (-23.40%)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37827>
2025-11-26 17:20:13 +00:00
Ian Romanick
d2e3707ecc brw: Eliminate redundant fills and spills
When the register allocator decides to spill a value, all writes to that
value are spilled and all reads are filled. In regions where there is
not high register pressure, a spill of a value may be followed by a fill
of that same file while the spilled register is still live. This
optimization pass finds these cases, and it converts the fill to a move
from the still-live register.

The restriction that the spill and the fill must have matching NoMask
really hampers this optimization. With the restriction removed, the pass
was more than 2x helpful.

v2: Require force_writemask_all to be the same for the spill and the fill.

v3: Use FIXED_GRF for register overlap tests. Since this is after
register allocation, the VGRF values will not tell the whole truth.

v4: Use brw_transform_inst. Suggested by Caio. The allows two of the
loops to be merged. Add brw_scratch_inst::offset instead of storing it
as a source. Suggested by Lionel.

v5: Add no-fill-opt debug option to disable optimizations. Suggested by
Lionel.

v6: Move a calculation outside a loop. Suggested by Lionel.

v7: Check that spill ranges overlap instead of just checking initial
offset. Zero shaders in fossil-db were affected, but some CTS with
spill_fs were fixed (e.g.,
dEQP-VK.subgroups.arithmetic.compute.subgroupmin_uint64_t_requiredsubgroupsize).
Suggested by Lionel.

v8: Add DEBUG_NO_FILL_OPT to debug_bits in
brw_get_compiler_config_value(). Noticed by Lionel.

shader-db:

Lunar Lake
total instructions in shared programs: 17249907 -> 17249903 (<.01%)
instructions in affected programs: 10684 -> 10680 (-0.04%)
helped: 2 / HURT: 0

total cycles in shared programs: 893092630 -> 893092398 (<.01%)
cycles in affected programs: 237320 -> 237088 (-0.10%)
helped: 2 / HURT: 0

total fills in shared programs: 1903 -> 1901 (-0.11%)
fills in affected programs: 110 -> 108 (-1.82%)
helped: 2 / HURT: 0

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total instructions in shared programs: 19968898 -> 19968778 (<.01%)
instructions in affected programs: 33020 -> 32900 (-0.36%)
helped: 10 / HURT: 0

total cycles in shared programs: 885157211 -> 884925015 (-0.03%)
cycles in affected programs: 39944544 -> 39712348 (-0.58%)
helped: 8 / HURT: 2

total fills in shared programs: 4454 -> 4394 (-1.35%)
fills in affected programs: 2678 -> 2618 (-2.24%)
helped: 10 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 930445228 -> 929949528 (-0.05%)
Cycle count: 105195579417 -> 105126671329 (-0.07%); split: -0.07%, +0.00%
Spill count: 3495279 -> 3494400 (-0.03%)
Fill count: 6767063 -> 6520785 (-3.64%)

Totals from 43844 (2.17% of 2018922) affected shaders:
Instrs: 212614840 -> 212119140 (-0.23%)
Cycle count: 19151130510 -> 19082222422 (-0.36%); split: -0.39%, +0.03%
Spill count: 2831100 -> 2830221 (-0.03%)
Fill count: 6128316 -> 5882038 (-4.02%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 1001375893 -> 1001113407 (-0.03%)
Cycle count: 92746180943 -> 92679877883 (-0.07%); split: -0.08%, +0.01%
Spill count: 3729157 -> 3728585 (-0.02%)
Fill count: 6697296 -> 6566874 (-1.95%)

Totals from 35062 (1.53% of 2284674) affected shaders:
Instrs: 179819265 -> 179556779 (-0.15%)
Cycle count: 18111194752 -> 18044891692 (-0.37%); split: -0.41%, +0.04%
Spill count: 2453752 -> 2453180 (-0.02%)
Fill count: 5279259 -> 5148837 (-2.47%)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37827>
2025-11-26 17:20:13 +00:00
Ian Romanick
b7f5285ad3 brw: Add fill and spill opcodes for LSC platforms
These opcodes are emitted during register allocation instead of the
scratch reads and writes that were previously emitted. These
instructions contain additional information (i.e., the instruction
encodes the scratch offset) that enable optimizations to be added
later.

The fill and spill opcodes are lowered to scratch reads and writes
shortly after register allocation. Eventually this lower may have some
optimizations (e.g., reuse previous address calculations for successive
spills).

v2: Add brw_scratch_inst::offset instead of storing it as a
source. Suggested by Lionel.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37827>
2025-11-26 17:20:12 +00:00
Ian Romanick
2215003d95 brw: Add OPT macro to brw_shader.cpp like brw_opt.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37827>
2025-11-26 17:20:11 +00:00
Ian Romanick
1f42ff530c brw: Return the new register from brw_lower_vgrf_to_fixed_grf
...and make the function public.

v2: s/struct brw_reg/brw_reg/. Suggested by Lionel.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37827>
2025-11-26 17:20:11 +00:00
Ian Romanick
243a3a4ca7 brw: Don't pass compressed to brw_lower_vgrf_to_fixed_grf
The parameter is never used. It's recalculated in the function.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37827>
2025-11-26 17:20:10 +00:00
Ian Romanick
1fc2f52d36 brw: Force allow_spilling when spill_all is set
This ensures that g0 is reserved for spilling since there is going to be
spilling.

Fixes: 8bca7e520c ("intel/brw: Only force g0's liveness to be the whole program if spilling")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37827>
2025-11-26 17:20:09 +00:00
Ian Romanick
042417a72e brw: Don't spill_all on internal shaders
Basically all of the internal shaders (e.g., from blorp) will fail
assertions if there is any scratch space used.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37827>
2025-11-26 17:20:09 +00:00
Alyssa Rosenzweig
e3328dfa2f brw: only initialize sample mask flag if needed
This is a refinement of 7c129d9365 ("intel/brw/xe2+: Keep PS sample mask in the
f1.0 register whether or not kill is used."). Rather than always insert this
move, do so only when we'll actually read the register: for memory writes and
for discards. This deletes an instruction from piles of fragment shaders.

shader-db on LNL:

total instructions in shared programs: 17134031 -> 17042706 (-0.53%)
instructions in affected programs: 9065743 -> 8974418 (-1.01%)
helped: 65045
HURT: 0
helped stats (abs) min: 1.0 max: 3.0 x̄: 1.40 x̃: 1
helped stats (rel) min: <.01% max: 50.00% x̄: 3.06% x̃: 1.64%
95% mean confidence interval for instructions value: -1.41 -1.40
95% mean confidence interval for instructions %-change: -3.10% -3.03%
Instructions are helped.

total cycles in shared programs: 885172098 -> 884835306 (-0.04%)
cycles in affected programs: 590294230 -> 589957438 (-0.06%)
helped: 53636
HURT: 4500
helped stats (abs) min: 2.0 max: 1126.0 x̄: 8.02 x̃: 4
helped stats (rel) min: <.01% max: 50.00% x̄: 1.24% x̃: 0.24%
HURT stats (abs)   min: 2.0 max: 7706.0 x̄: 20.77 x̃: 6
HURT stats (rel)   min: <.01% max: 82.06% x̄: 1.09% x̃: 0.54%
95% mean confidence interval for cycles value: -6.15 -5.43
95% mean confidence interval for cycles %-change: -1.10% -1.02%
Cycles are helped.

LOST:   385
GAINED: 47

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38665>
2025-11-26 16:53:36 +00:00
Connor Abbott
aa9435f5d1 tu: Set 8E09 once
This was set the same for GMEM and sysmem render passes. Set it in the
beginning instead. Following the blob, only set it for BR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38581>
2025-11-26 16:30:34 +00:00
Connor Abbott
76c5fb50ac tu: Set GRAS_MODE_CNTL once
Don't set it before the render pass, that's unnecessary. In the future
we may want to move this to the FS state object, as the blob does, but
for now don't set it unnecessarily.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38581>
2025-11-26 16:30:34 +00:00
Connor Abbott
d63581a246 tu: Stop setting GRAS_LRZ_CB_CNTL before GMEM render passes
This register is now written later when setting up the LRZ image.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38581>
2025-11-26 16:30:31 +00:00
Connor Abbott
e173c3d8f3 tu: Stop setting RB_CCU_DBG_ECO_CNTL to 0 for GMEM passes
I can't find any evidence that the blob ever did this on a740 or a750.
Doing this breaks subsequent sysmem render passes and would force an
otherwise-unnecessary WFI with custom_resolve.

Fixes: 062e90f19b ("freedreno: Move RB_CCU_DBG_ECO_CNTL to raw_magic_regs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38581>
2025-11-26 16:30:26 +00:00
Lionel Landwerlin
5324712952 anv: remove errors on format queries
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's pretty spammy and since the whole purpose of queries is to report
support, why bother with errors?

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/38661>
2025-11-26 16:06:57 +00:00
David Rosca
15e02eb6ab frontends/va: Use util_dynarray for decode slice data buffers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38241>
2025-11-26 15:49:59 +00:00
Corentin Noël
3b086706fe ci: Uprev crosvm and virglrenderer
Update to their latest commit on time.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38570>
2025-11-26 15:04:25 +00:00
Dmitry Osipenko
25881c701a virgl: Support new resource-layout command
Support new vrend command that queries layout of a backing GBM buffer
for a giver vrend resource. Use it for querying stride/modifier of a
PIPE_SHARED resource, passing this info down to WSI for exported resources.
Now venus is able to import vrend resources, making gamescope work in KMS
mode on QEMU. Virgl doesn't use stride/modifier info of winsys when it
imports classic vrend resources, hence this change only affects venus
context when it imports virgl WSI buffers.

Based on initial version of resource-layout command from Daniel Stone.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Yiwei Zhang <zzyiwei@gmail.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37646>
2025-11-26 14:43:12 +00:00
Dmitry Osipenko
29b64d6636 virgl: Implement resource_create_with_modifiers
The .resource_create_with_modifiers() callback became required after
7d1a32fafd for venus to work in KMS mode. This fixes GBM buffer
allocation failure for vkmark-kms and fixes implicit modifier not
working on host when using Intel i915 driver for running Steam with
gamescope-kms on guest. Note that KMS support for venus on QEMU never
worked before, hence this is not regression fix.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37646>
2025-11-26 14:43:12 +00:00
Karol Herbst
d06aff2243 nak/cmat: use movm
Sadly I don't see an obvious way to use it for int8 matrices, therefore
the code is a bit of a mess right now.

It allows us to vectorize load/stores more often as we can simply
transpose row/col major matrices when needed.

And the movm optimization is also only enabled for 16 bit types, even
though we _could_ do it for 32 bit. It's not clear yet if using it for 32
bit types is an overall advantage or not.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37998>
2025-11-26 14:09:37 +00:00
Karol Herbst
626c6b35f0 nak: add Movm
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37998>
2025-11-26 14:09:37 +00:00
Karol Herbst
c4f07f3d79 nir: mark cmat_load_shared_nv as CAN_ELIMINATE
It's just a special load shared and has no side effects.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37998>
2025-11-26 14:09:35 +00:00
Karol Herbst
6e89dc33fe nak/cmat: add optimisation to cmat load/store to do 32-bit load for f16vec2
Initial idea and code from Dave, but this is a complete rewrite of the
patch.

The Matrix layouts contain groups of values, for int8 we have vec4 groups,
for fp16, fp32 and int32 we have vec2s. With this we load and store them
as vectors getting rid of a bunch of address calculation.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37998>
2025-11-26 14:09:35 +00:00
Karol Herbst
79b3386810 nak/cmat: add alignment info to matrix load/stores
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37998>
2025-11-26 14:09:34 +00:00
Iago Toral Quiroga
a643681dd5 broadcom/compiler: use nir_opt_uub
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Shows performance improvement on aztec/aztec_high

fps_avg  helped:  gl_aztec.trace:       6.37 -> 6.45 (1.26%)
fps_avg  helped:  gl_aztec_high.trace:  4.29 -> 4.33 (0.93%)

And a significant instruction count reduction in the affected
shaders. But some shaders show a huge reduction.

gles_aztec/274.shader_test MESA_SHADER_COMPUTE: 1375 -> 1196 (-13.02%)
gles_aztec_high/499.shader_test MESA_SHADER_COMPUTE: 1375 -> 1196 (-13.02%)
master-of-orion/1253.shader_test MESA_SHADER_FRAGMENT: 305 -> 262 (-14.10%)
blender/7.shader_test MESA_SHADER_FRAGMENT: 12389 -> 10455 (-15.61%)
master-of-orion/1256.shader_test MESA_SHADER_VERTEX: 170 -> 131 (-22.94%)

total instructions in shared programs: 14679696 -> 14675496 (-0.03%)
instructions in affected programs: 196683 -> 192483 (-2.14%)
helped: 430
HURT: 8
Instructions are helped.

total uniforms in shared programs: 6775582 -> 6775495 (<.01%)
uniforms in affected programs: 21155 -> 21068 (-0.41%)
helped: 48
HURT: 2
Uniforms are helped.

total max-temps in shared programs: 2709673 -> 2709710 (<.01%)
max-temps in affected programs: 403 -> 440 (9.18%)
helped: 2
HURT: 16
Max-temps are HURT.

Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38642>
2025-11-26 13:32:39 +00:00
Jose Maria Casanova Crespo
4234e7eed0 broadcom/compiler: enable umul24 and imul24 ALU opcodes
For umul24 we expose the operation as UMUL24_RTOP0 so we can identify
the difference between umul24 as part of a sequence generated from an
imul as "multop+umul24" and a simple umul24 where rtop will always be 0.

For umul24_rtop0 instructions we relax the scheduling restrictions,
so they don't need to be serialized like the multop+umul24 ops. But
we maintain the read dependency with the last_rtop.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38642>
2025-11-26 13:32:39 +00:00
Timur Kristóf
29dff2fd75 radv: Check RADV_PERFTEST=sparse for image formats and sparse queue
Without this, we will report some image formats as unsupported
and the dedicated sparse binding queue won't work
when sparse support is enabled using RADV_PERFTEST=sparse

Fixes: dd90c76cea12 ("radv: Advertise sparse features pre Polaris with perftest flag")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38676>
2025-11-26 13:12:27 +00:00
David Rosca
1884b03a10 radeonsi/vcn: Fix maybe uninitialized warning
Backport-to: 25.3
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38545>
2025-11-26 12:22:06 +00:00
Erik Faye-Lund
e119091e7d panfrost/ci: remove some out-of-date xfails
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These are failing in nightly builds. Seems we forgot to update these
xfails when fixing the problem.

Fixes: a6bf07e7c2 ("dri: avoid sending too many present reuqests when app start or pause"
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38675>
2025-11-26 12:55:41 +01:00
Samuel Pitoiset
f14e0d9f09 radv: add radv_hide_rebar_on_dgpu and enable for Red Dead Redemption 2
RDR2 VRAM memory management when resizable BAR is enabled seems
incorrect because it keeps allocating VRAM without freeing anything.

This introduces a drirc option to emulate a fake carveout of 256MiB to
workaround this game bug. This also adjust memory budgets by
distributing it between visible and invisible because AMDGPU reports
the same value for both when REBAR is enabled.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12091
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38627>
2025-11-26 10:12:45 +00:00
Samuel Pitoiset
9cca79d8f8 radv: fix resetting descriptor pool since the new descriptor sets allocator
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
RADV uses low VAs.

This fixes rendering issues and eventually GPU hangs with Detroit.

Fixes: 849d41dbf8 ("radv: implement a new descriptor sets allocator")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38650>
2025-11-26 09:09:13 +00:00
Icenowy Zheng
54077d9893 pvr: fix cleaning up failed CreateDevice
When running the Vulkan CTS test
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic ,
the driver sometimes crashes because of cleaning up sequences try to do
pvr_suballoc_bo_free() on bo's that is never initialized (thus old stale
value remains as pointer).

Fix the issues that lead to wild pointers access (a wrong cleanup
sequence and trying to free bo's that fails to be allocated).

The CTS test still fails here with "Allocations still remain, failed on
index 4274", but at least it does not crash now.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38506>
2025-11-26 08:52:27 +00:00
Icenowy Zheng
ab9e148bfb pvr: enable samplerMirrorClampToEdge feature
This is forgotten when advertising the corresponding extension, which
leads to inconsistency, thus fail of
dEQP-VK.api.info.vulkan1p2.feature_extensions_consistency CTS testcase.

Enable the corresponding feature too. I ran all CTS tests with
"mirror_clamp_to_edge" in name, which are all skipped with NotSupported
before (because of the feature being not advertised), and gain
3695/11140 Pass with the remaining ones still NotSupported (no Fail).

This also makes the feature extension consistency CTS testcase Pass too.

Fixes: 4d34c07b7a ("pvr: advertise VK_KHR_sampler_mirror_clamp_to_edge")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38653>
2025-11-26 08:35:46 +00:00
Alyssa Rosenzweig
1574a71438 nir/lower_wrmasks: clean up & deprecate pass
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The usual pass modernization with the twist that I don't want new drivers
actually using it (-:

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38533>
2025-11-26 03:20:39 +00:00
Alyssa Rosenzweig
2c2dd835af nir/lower_wrmasks: drop callback
All drivers use the same callback and it is unlikely that new drivers will use
this pass since it has better replacements today (lower_mem_bit_sizes for
memory, and it never worked for I/O). This should discourage as much.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38533>
2025-11-26 03:20:39 +00:00
Alyssa Rosenzweig
5515160b55 nir/lower_wrmasks: drop support for I/O
nir_lower_wrmasks as-is is broken for semantic I/O, since semantic I/O is slot
based and nir_lower_wrmasks is purely byte-based. No drivers use it as such, and
no drivers should. Remove the support so people don't think it works. This came
up in !38482.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38533>
2025-11-26 03:20:39 +00:00
Aitor Camacho
bdaff0b457 kk: Handle memory coherency for textures and buffers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
M1 chips are more restrictive than M2 and above. We need to enforce memory
coherency when needed through "coherent" for buffer memory and
"memory_coherence_device" for textures. Without these the memory operations
are not visible to other threads.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38595>
2025-11-26 02:26:21 +00:00
Faith Ekstrand
3aa4be52f3 poly: Make all heap allocations atomic
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All non-atomic allocations are on pretty slow paths where we only have a
single invocation running.  This means they're technically thread-safe
(assuming only a single queue) but it also means the perf of a single
allocation doesn't matter much.  However, as a bunch of things are
becoming helpers that may or may not be run in parallel for things like
multi-draw, it becomes harder to know when non-atomic is safe.  We're
probably better off using atomic allocations everywhere.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:28 +00:00
Faith Ekstrand
ed0998ca98 poly: Generalize unroll_restart() to arbitrary workgroup/subgroup sizes
The original asahi code assumed a subgroup size of 32 and a workgroup
size of 32 * 32 = 1024.  This makes doing ctz(ballot(b)) across an
entire workgroup an almost trivial operation.  On panfrost, we won't be
so blessed unless we choose a workgroup size of 16 * 16 = 256.  It's
also not clear that we want to use workgroups at all and we may better
off sticking to just subgroup parallelism and cutting out memory
bandwidth by more than half.  With the new code, the only requirement
should be that the subgroup size is a power of two (this is always true)
and that the workgroup size is an even multiple of the subgroup size.

Even though the new code looks way more complicated, thanks to the magic
of NIR constant folding, it should all fold down to the original code on
asahi and something even smaller if one opts to go for a single subgroup.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:28 +00:00
Faith Ekstrand
d9f795e6d0 poly,asahi: Pull restart unrolling into libpoly
The interface here intentionally doesn't handle multi-draw.  It's
intended that the caller will sort that out in whatever way they want to
handle multi-draw dispatches.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:28 +00:00
Faith Ekstrand
ddff3700a4 poly/asahi: Pull a bunch of vertex_id_for helpers into poly/prim.h
There's nothing really CL-specific about any of these.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:27 +00:00
Faith Ekstrand
27b2290abe poly: Move vs_grid to poly_vertex_params
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:26 +00:00
Faith Ekstrand
70a1a4013f agx: Use the new poly param helpers
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:26 +00:00
Faith Ekstrand
5b677db712 hk: Use the new poly param helpers
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:25 +00:00
Faith Ekstrand
96421876d7 poly: Add helpers for filling out poly_vertex_params
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:25 +00:00
Faith Ekstrand
fd844e0ad4 poly: Add helpers for filling out poly_geometry_params
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:24 +00:00
Faith Ekstrand
ad30ebccb6 poly,asahi: Put the indirect draw directly in the geometry params
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:24 +00:00
Faith Ekstrand
fcb107accb poly: Fetch the index size from a sysval
On asahi, we can still specialize based on the shader key and get
everything folded.  But this gives drivers the option to make it
dynamic if they wish.

Co-authored-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:23 +00:00
Faith Ekstrand
05aaa7df65 nir: Improve comments for a couple poly intrinsics
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:22 +00:00
Faith Ekstrand
735b4ec9c7 poly: Add a poly_nir_lower_sysvals() pass
There are a few sysvals which exist just so we can specialize them based
on shader keys or linking.  In the case where we can't specialize them,
this provides a pass which loads them from the appropriate poly_*_param
struct.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:22 +00:00
Faith Ekstrand
349219df6a poly: Rename poly_nir_lower_gs.h to poly_nir.h
It has all the poly NIR things so it should have a more generic name.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:21 +00:00
Faith Ekstrand
9ccac4e047 asahi: Reorder state uploads in agx_draw_patches()
The important bit here is that we move agx_update_vs() to before we
build up the poly_*_params so we have access to the final linked vertex
shader.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:21 +00:00
Faith Ekstrand
5f5054a195 SQUASH: poly,asahi: Move the output mask to poly_vertex_state
It makes more sense here along with the output buffer.  I think this
should be squashed with the previous commit (and not sure it works
without).

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:20 +00:00
Faith Ekstrand
05723bfa35 poly,asahi: Fetch directly from poly_vertex_state::output_buffer in GS
We have access to the poly_vertex_state from the GS so we might as well
use it.  Asahi uses a single poly_vertex_state for VS and TCS and just
assumes the tessellator stalls before we update it for TCS.  If a driver
wants to use two separate poly_vertex_state buffers, it will be the
driver's responsibility to make the system values return the right one.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:19 +00:00
Faith Ekstrand
89fbb9cf84 poly,asahi: Move vertex_output_buffer to poly_vertex_param
Instead of having the vertex output buffer be a system value and
something the driver needs to manage, put it in poly_vertex_param.  We
already need to have it somewhere GPU-writable so we can write it from
indirect setup kernels.  Instead of manually allocating 8B all over the
place just to hold this one pointer, stick it in poly_vertex_param.
This also lets us get rid of a NIR intrinsic.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:18 +00:00
Faith Ekstrand
8950efc006 hk: Expose the vertex param buffer to other stages
For vertex shaders, it comes from the preamble.  For geometry and
tessellation shaders it comes straight from the root table.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:17 +00:00
Faith Ekstrand
a96fd8f0a7 asahi: Upload vertex and geom/tess params together
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:16 +00:00
Faith Ekstrand
f36465d574 poly,asahi: Rename poly_ia_state to poly_vertex_params
We're about to put more than just input assembly data in there so the
name will make a lot more sense.  Also, add a comment to make it more
clear that this buffer applys to both VS and TES.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:16 +00:00
Faith Ekstrand
4716858a51 poly,asahi: Rename poly_tess_args to poly_tess_params
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
2025-11-25 23:20:14 +00:00
Kenneth Graunke
3182deaae1 brw: Combine output stores for TCS outputs even when unlinked
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise we get a lot of individual x/y/z stores to tesslevels when
we should really just be storing the whole thing at once.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:44:03 +00:00
Kenneth Graunke
7e02738b63 brw: Drop check for legacy tess levels from remap_patch_urb_offsets
The newly rewritten remap_tess_levels_legacy will have already lowered
anything it cares about to URB intrinsics.  So the generic remapping
pass won't see them, as it operates on generic input/output intrinsics.

This also drops some of the callback boilerplate we needed temporarily.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:44:03 +00:00
Kenneth Graunke
d95a9714c2 brw: Rewrite legacy tess level remapping
This unifies the dynamic (SSO) and fixed (linked together) versions.
We emit piles of NIR as if we were doing the dynamic version, but
replace the tess config field access with constant values.  It all
should optimize away back to something reasonable.  We lower these
directly to URB read/write intrinsics.

It also rewrites the dynamic version to directly read/write the URB
rather than going through temporaries.  The old version was broken
in that tessellation control shader invocations can technically use
the shared output area for cross-invocation data sharing with barriers,
although doing so using the built-in tesslevel patch outputs is very
unlikely.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:44:03 +00:00
Kenneth Graunke
ee407481c2 brw: Switch to URB intrinsics for TCS inputs
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:44:02 +00:00
Kenneth Graunke
943b2acf02 brw: Switch to NIR URB intrinsics for TES inputs
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:44:01 +00:00
Kenneth Graunke
c0d69b2faf brw: Switch to NIR URB intrinsics for TCS outputs
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:44:01 +00:00
Kenneth Graunke
9aff3cac3c brw: Add infrastructure for lowering to URB intrinsics
Based on earlier code by Lionel Landwerlin.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:44:00 +00:00
Kenneth Graunke
13acc889af brw: Use io_sem.location instead of base to get varying slots
Alyssa noted we can be using semantic IO here rather than relying on
bases not having been remapped.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:59 +00:00
Kenneth Graunke
96d331766a brw: Generalize read_attribute_payload_intel to handle more cases
We were using this for indirect loads of the shader input thread
payload, but there's no reason we can't use it for constant access
too.  In this case we can just MOV from the ATTR file directly
without a special opcode that turns into MOV_INDIRECT later.

We also allow it to load multiple components now.  This is useful
for say, returning vec4 pushed inputs.  And, we allow it in more
stages than just the fragment stage.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:59 +00:00
Kenneth Graunke
792762617a brw: Rename read_attribute_payload_intel to load_attribute_payload_intel
We're going to change the intrinsic to a load(...) which puts "load" in
the name.  Also, it's just more consistent with our usual terminology.

We also rename the corresponding backend opcode so they remain matched.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:58 +00:00
Kenneth Graunke
0f7590af81 brw, anv, iris: Switch to reversed patch header layouts
These are a ton more convenient.  When the TCS and TES were linked
together, the legacy layouts were a hassle, but didn't impose any
significant cost.  With unlinked TCS and TES, the legacy layouts
involve significant runtime code for scrambling the data, whereas
the reversed layouts are substantially less overhead.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:57 +00:00
Kenneth Graunke
7d1dfc3468 brw: Lower tesslevel vars to vectors even for unlinked TCS/TES
st/nir lowers this for iris, and brw_link_shaders lowers this for anv,
but for unlinked tessellation control / evaluation shaders, the lowering
was not happening for TCS.

Just do it unconditionally when lowering TCS outputs and TES inputs.
This lets the remapping code just assume vectors all the time, rather
than getting single component stores with nir_intrinsic_component set
(which came from nir_lower_io lowering compact arrays).

This also requires changes to the dynamic unlinked TCS/TES lowering to
temporaries, which needs to use vectors rather than arrays with this
change.  That code is going away in future patches anyway, but this
keeps it going for now to avoid interim breakage.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:56 +00:00
Kenneth Graunke
7736e693b1 brw: Pass devinfo into remap_patch_urb_offsets
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:56 +00:00
Kenneth Graunke
4dc6413de8 brw: Rename remap_non_header_patch_values to remap_patch_values
See rationale in the previous patch.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:56 +00:00
Kenneth Graunke
2b51963b8c brw: Remap tesslevels before other patch remapping
We now call remap_tess_levels before remap_non_header_patch_urb_offsets.
The latter already excludes tess levels anyway, so the order shouldn't
matter.

This paves the way for remap_tess_levels to skip handling some header
values in certain cases, because with reversed layouts, many of them no
longer need any special handling and we can just let the generic pass
handle them.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:56 +00:00
Kenneth Graunke
e8669a8333 brw: Rework the tess level remapping interface
Just have a single remap_tess_levels that does either the
statically-known-primitive or the dynamic (unlinked) mode.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:56 +00:00
Kenneth Graunke
1995c879a9 brw: Flip the TESS_LEVEL_INNER/OUTER vue map slot assignments
Our current legacy patch header layout handling doesn't actually care
which is which slot, and remaps everything to its correct spot anyway.

For using the newer "reversed" patch header layouts, it will be more
convenient to have outer as slot 0, and inner as slot 1, as that just
works with no special remapping needed for both quads and triangles
(but unfortunately isolines are still a pain).

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:56 +00:00
Kenneth Graunke
e5c1d00faf brw: Pass devinfo to brw_nir_lower_tes_inputs
This will be useful for using reversed patch header layouts.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:56 +00:00
Kenneth Graunke
a1c7ae9d15 brw: Implement URB handle intrinsics for TCS and TES stages
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:56 +00:00
Lionel Landwerlin
e290f9641d brw: Implement load/store URB intrinsics
These work the same regardless of stage.

v2 (Ken): Rebase, move from mesh to all stages, add reorderable load
          variant, allow channel masks to be non-constant even on Xe2.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:55 +00:00
Lionel Landwerlin
0d8ee4ed23 brw: use default builder for urb handle adjustment
Be consistent with lowering that happens after, so that it gets a full
vector register and can stride into it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:55 +00:00
Kenneth Graunke
f1ab64ad74 nir: add new intrinsics to load/store from URB on intel
We add several new intrinsics for accessing URB handles:

- load_urb_output_handle_intel
- load_urb_input_handle_intel
- load_urb_input_handle_intel_indexed

The latter is used by stages like TCS and GS where each input control
point has a unique handle.  The index is which ICP to read from.  The
others are for most stages, where all inputs or outputs are accessed
via a single handle.

Then we have URB load and store operations, split for Xe2+ (URB via LSC)
and earlier (HDC OWord messages):

- load_urb_vec4_intel
- load_urb_lsc_intel
- store_urb_vec4_intel
- store_urb_lsc_intel

The legacy vec4 variants take a handle and a 128-bit OWord offset as
sources.  Additionally, stores take a set of channel enables to mask
off and avoid writing vec4 components.  We don't use the WRITE_MASK
const-index as our channel enables are not required to be constant.

The Xe2+ LSC variants are simpler.  Handles are byte offsets into the
URB memory region, and offsets are expressed in bytes.  So we simply
add them into a single "address" source.  We don't support writemasks
here, as they aren't really necessary with the better addressability.
(Plus, the store_cmask operations work significantly differently than
the previous HDC OWord messages).  We will lower disjoint writemasks
to multiple stores.

Based on earlier code by Lionel Landwerlin.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
2025-11-25 22:43:54 +00:00
Joshua Ashton
8916b8a7f4 vulkan/wsi: Handle 0xFFFFFFFF special case in vk_wsi_force_swapchain_to_current_extent driconf
Current extent can be 0xFFFFFFFF (-1) which indicates there is no current extent, and the swapchain will inherit that of which the application provides.

Check this before applying the hack.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31134>
2025-11-25 22:10:38 +00:00
Marek Olšák
5ee9a76058 nir: fix a typo in NIR_PASS_ASSERT_NO_PROGRESS for non-debug builds
Fixes: 4e834b4321 - nir: add NIR_PASS_ASSERT_NO_PROGRESS

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38608>
2025-11-25 21:38:50 +00:00
Marek Olšák
d9d3f6703c ac,winsys/amdgpu: report why ac_query_gpu_info failed
only these case were not reporting anything

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38602>
2025-11-25 21:17:35 +00:00
Marek Olšák
1c3e7e4ca0 ac: document RELEASE_MEM limitation with PS_DONE/CS_DONE on gfx6-11
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38602>
2025-11-25 21:17:35 +00:00
Felix DeGrood
406e6e094a anv/rt: avoid out of bound access by clamping global id
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: Felix DeGrood <felix.j.degrood@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: cff9d82c66 ("anv/rt: rewrite encode.comp for better performance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38636>
2025-11-25 19:59:42 +00:00
Lionel Landwerlin
b1e74a1bb1 anv: shrink image opaque data
Noticed renderdoc complaining about our size :

RDOC 692028: [18:08:18]          vk_core.cpp(2272) - Warning -
VkPhysicalDeviceDescriptorBufferPropertiesEXT.imageCaptureReplayDescriptorDataSizeis too large at 32
(must be <= 16), can't support capture of VK_EXT_descriptor_buffer

Since we only need 2 pointers (main + private), we can shrink this to
16bytes. The 1/2 planes have a relative offset from the base.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38625>
2025-11-25 19:38:53 +00:00
Benjamin Cheng
6aabc3d5d2 ac/parse_ib: Implement VCN dec message parsing
This makes the IB dumps more useful for decode, as most of the actual
decode command is within the message buffers.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38631>
2025-11-25 19:17:12 +00:00
Karol Herbst
28060c1e05 nvk/ci: add broken coop matrix CTS tests to skips
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38657>
2025-11-25 18:50:19 +00:00
Danylo Piliaiev
580ce1c911 tu: Handle mismatch in mip layouts for reinterpreted compressed images
If the threshold of the linear mipmap fallback for compressed
format is reached at a different mipmap level than the
size-compatible non-compressed formats the image can be viewed as,
then we have to disable the fallback. Otherwise, for some levels,
texels would be read from the wrong locations due to the tiling
mismatch.
NOTE: Prop driver falls back to LINEAR in this case.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38655>
2025-11-25 18:25:57 +00:00
Danylo Piliaiev
e347f82aeb freedreno/layout: Use blocks for linear mipmap fallback where possible
Starting from at least A6XX gen3 there is an option for compressed
formats to have linear fallback threshold in compressed blocks, instead
of threshold in raw texels. However, proprietary driver doesn't enable
it on A6XX, so to be safe we also enable it only on A7XX.

Additionaly, clarify what the linear fallback threshold is really about.
It's about tiling, not strictly about UBWC.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38655>
2025-11-25 18:25:57 +00:00
Rob Clark
654b0dd548 freedreno: Remove use of FDL_MIN_UBWC_WIDTH
fdl6_layout_image() already has the fallback-to-linear check.  And with
gen8 this is no longer a fixed constant.  So lets just consolidate all
the logic in fdl layout helper.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38655>
2025-11-25 18:25:57 +00:00
Aitor Camacho
c6ad0f781a kk: Force attachment load as temp solution to preserve attachment
Attachment preserve is not correctly handled due to multiple issues:
 - No knowledge that we need to do that from render pass
 - Setting VkEvent from command buffers break MTLRenderPass
 - Pipeline barriers break MTLRenderPasses
 - vkCmdBeginRendering and vkCmdEndRendering don't account for it

Need to handle all those above first before we can have efficient
MTLRenderPasses implemented.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38612>
2025-11-25 17:49:53 +00:00
Aitor Camacho
fa420a8649 kk: Remove mem leaks in cmd buf destroy and residency set creation
Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38629>
2025-11-25 17:33:50 +00:00
Gurchetan Singh
4f9d7c3385 gfxstream: codegen: don't generate custom protocols in function table
vulkan_gfxstream.h contains custom protocols not found
in vk.xml (vk_gfxstream.xml).

gfxstream_vk_entrypoints.h is codegen by Mesa common code,
and it does not accept the custom XML.

So avoid generating implementations for them:

guest/vulkan_enc/gfxstream_guest_vk_autogen_impl/gen/func_table.cpp:5321:1:
note: declare 'static' if the function is not intended to be
      used outside of this translation unit
 5321 | void gfxstream_vk_CollectDescriptorPoolIdsGOOGLE(
      | ^
      | static
fatal error: too many errors emitted, stopping now [-ferror-limit=]

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38632>
2025-11-25 09:12:15 -08:00
Gurchetan Singh
169f571f4f gfxstream: delete createImmutableSamplersFilteredImageInfo
This function is not used.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38632>
2025-11-25 09:12:10 -08:00
Gurchetan Singh
b6df034363 gfxstream: make functions static when needed
Fixes errors like:

ResourceTracker.cpp:62:6: error: no previous prototype for function 'zx_handle_close'
                          [-Werror,-Wmissing-prototypes]

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38632>
2025-11-25 09:12:06 -08:00
Gurchetan Singh
0a231dfb40 gfxstream: silence non-null Clang check on Android
Workaround:

src/gfxstream/guest/connection-manager/GfxStreamConnectionManager.cpp:82:51:
error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
   82 |     tss_set(gfxstream_connection_manager_tls_key, nullptr);
      |                                                   ^~~~~~~

Ultimately, the Bionic headers look wrong.  Passing NULL to tss_set
is completely legit.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38632>
2025-11-25 09:11:35 -08:00
Lionel Landwerlin
7e72d392d7 brw: switch to load_(pixel_coord|frag_coord_z|frag_coord_w) intrinsics
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Allows us to better determine if we need Z/W payload delivery.

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/36392>
2025-11-25 15:50:48 +00:00
Natalie Vock
b7f011e653 radv/rt: Correctly copy culling flags when updating to separate AS
This was missing and led to the field being uninitialized.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38488>
2025-11-25 15:25:21 +00:00
Natalie Vock
bc1eea90b9 radv/rt: Keep updated nodes always active
In updateable AS, we keep all nodes active even if they're
degenerate/NaN, because too many games ignore API rules about not
making inactive nodes active (and some vendor tips outright advise this
behavior). We also need to match this by keeping everything active in
the update side. The ALWAYS_ACTIVE macro has been long removed and
replaced by VK_BVH_BUILD_FLAG, too. Since updating only happens to
updateable AS, don't even check for the flag, just implement the
always-active handling.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38488>
2025-11-25 15:25:21 +00:00
Lionel Landwerlin
6d3be477ab anv: enable application shader printfs with debug option
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/38638>
2025-11-25 14:18:42 +00:00
Lionel Landwerlin
4c3bf04dd0 anv: enable mesh/task shader hashes
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/38638>
2025-11-25 14:18:42 +00:00
Lionel Landwerlin
4b9aa9dc91 nir/lower_printf: fix missing singleton add
If we're using the singleton, we need to add to it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38638>
2025-11-25 14:18:42 +00:00
Lionel Landwerlin
d24633023f nir/lower_printf: fix array alignment
The pointer arithmetic doesn't need a 4byte alignment, otherwise
everything is broken.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38638>
2025-11-25 14:18:42 +00:00
Lionel Landwerlin
67faf6dfbd spirv: fix printf generation
Not having the uses_printf will drop the printf info in serialization.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38638>
2025-11-25 14:18:42 +00:00
Lionel Landwerlin
6940b8fcd7 nir: fix lower_printf with no arguments
SPIRV generated printf with no arguments have an undef source (not the
expected deref).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38638>
2025-11-25 14:18:42 +00:00
Lionel Landwerlin
c2c815afd9 nir: print out number of printfs
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/38638>
2025-11-25 14:18:42 +00:00
Thong Thai
b4e7c13ef4 meson: add libva wrap and fallback option
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Allow for Mesa to be built with VAAPI support, without having to install
libva headers first.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38271>
2025-11-25 13:37:49 +00:00
Georg Lehmann
f5eb3fe9cb aco/optimizer: optimze cndmask(a, b, not(c)) to cndmask(b, a, c)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Can happen with nir_op_bitz/b2f/b2i.

Foz-DB Navi48:
Totals from 3465 (4.20% of 82419) affected shaders:
Instrs: 7534077 -> 7527637 (-0.09%); split: -0.09%, +0.01%
CodeSize: 40017384 -> 39993008 (-0.06%); split: -0.07%, +0.01%
Latency: 38593071 -> 38582815 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 8519291 -> 8518620 (-0.01%); split: -0.01%, +0.00%
VClause: 151669 -> 151662 (-0.00%); split: -0.02%, +0.02%
SClause: 155781 -> 155772 (-0.01%); split: -0.01%, +0.01%
Copies: 628453 -> 628531 (+0.01%); split: -0.01%, +0.02%
Branches: 180429 -> 180430 (+0.00%)
PreSGPRs: 182855 -> 182801 (-0.03%)
VALU: 4315173 -> 4315241 (+0.00%); split: -0.00%, +0.00%
SALU: 992125 -> 986876 (-0.53%); split: -0.53%, +0.00%
VOPD: 15827 -> 15838 (+0.07%); split: +0.23%, -0.16%

Foz-DB Navi21:
Totals from 3341 (4.06% of 82387) affected shaders:
MaxWaves: 61924 -> 61950 (+0.04%)
Instrs: 6640276 -> 6635078 (-0.08%); split: -0.08%, +0.00%
CodeSize: 35932788 -> 35913760 (-0.05%); split: -0.06%, +0.00%
VGPRs: 205512 -> 205456 (-0.03%)
Latency: 40201463 -> 40194285 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 12379144 -> 12378028 (-0.01%); split: -0.01%, +0.00%
VClause: 151556 -> 151563 (+0.00%); split: -0.01%, +0.01%
SClause: 157470 -> 157472 (+0.00%); split: -0.00%, +0.01%
Copies: 645034 -> 644947 (-0.01%); split: -0.02%, +0.01%
Branches: 192070 -> 192071 (+0.00%)
PreSGPRs: 173368 -> 173311 (-0.03%)
VALU: 4554790 -> 4554782 (-0.00%); split: -0.00%, +0.00%
SALU: 881251 -> 876087 (-0.59%); split: -0.59%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:19 +00:00
Georg Lehmann
752f1fb4ae aco/optimizer: extend existing patterns to handle b2f/b2i(not(a))
The next commit will optimize b2f(not(a)) and b2i(not(a)),
so handle those in other patterns to prevent regressions.

No Foz-DB changes on its own.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:19 +00:00
Georg Lehmann
c538f47f03 aco/optimizer: create ff0/bcnt0
Foz-DB Navi21:
Totals from 1 (0.00% of 82387) affected shaders:
Instrs: 350 -> 347 (-0.86%)
CodeSize: 1800 -> 1788 (-0.67%)
Latency: 2427 -> 2421 (-0.25%)
SALU: 80 -> 77 (-3.75%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:18 +00:00
Georg Lehmann
0f7a1ce23e aco/optimizer: some more mul opts
Foz-DB Navi48:
Totals from 1650 (2.00% of 82419) affected shaders:
Instrs: 975716 -> 970609 (-0.52%); split: -0.53%, +0.00%
CodeSize: 4986260 -> 4982916 (-0.07%); split: -0.09%, +0.02%
Latency: 2795394 -> 2793211 (-0.08%); split: -0.09%, +0.01%
InvThroughput: 620892 -> 620914 (+0.00%); split: -0.00%, +0.01%
VClause: 18773 -> 18729 (-0.23%)
SClause: 13219 -> 13218 (-0.01%)
Copies: 53619 -> 53620 (+0.00%); split: -0.01%, +0.01%
VALU: 592094 -> 592096 (+0.00%); split: -0.00%, +0.00%
SALU: 96586 -> 93532 (-3.16%); split: -3.17%, +0.00%

Foz-DB Navi21:
Totals from 1647 (2.00% of 82387) affected shaders:
Instrs: 1104100 -> 1100149 (-0.36%); split: -0.36%, +0.00%
CodeSize: 5631092 -> 5637668 (+0.12%); split: -0.00%, +0.12%
Latency: 3503029 -> 3501621 (-0.04%); split: -0.05%, +0.01%
InvThroughput: 1088494 -> 1088495 (+0.00%); split: -0.00%, +0.00%
VClause: 20898 -> 20885 (-0.06%)
Copies: 72641 -> 72635 (-0.01%); split: -0.02%, +0.01%
VALU: 725593 -> 725592 (-0.00%); split: -0.00%, +0.00%
SALU: 139046 -> 135175 (-2.78%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:17 +00:00
Georg Lehmann
92dbf42379 aco/optimizer: use cndmask for neg(b2i)
Foz-DB Navi48:
Totals from 1310 (1.59% of 82419) affected shaders:
Instrs: 1337622 -> 1338677 (+0.08%); split: -0.00%, +0.08%
CodeSize: 7039828 -> 7043996 (+0.06%); split: -0.00%, +0.06%
Latency: 7783135 -> 7782526 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 1587987 -> 1586644 (-0.08%)
Branches: 24320 -> 24318 (-0.01%)

Foz-DB Navi21:
Totals from 334 (0.41% of 82387) affected shaders:
Instrs: 666102 -> 666094 (-0.00%)
CodeSize: 3599748 -> 3599724 (-0.00%)
Latency: 6873870 -> 6873868 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 2151773 -> 2151780 (+0.00%); split: -0.00%, +0.00%
Branches: 17419 -> 17411 (-0.05%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:17 +00:00
Georg Lehmann
0e4d4aeef7 aco/optimizer: add some bitop combining
Foz-DB Navi48:
Totals from 53 (0.06% of 82419) affected shaders:
Instrs: 172843 -> 172769 (-0.04%); split: -0.06%, +0.01%
CodeSize: 937308 -> 936924 (-0.04%); split: -0.04%, +0.00%
Latency: 454652 -> 454823 (+0.04%); split: -0.01%, +0.05%
InvThroughput: 89833 -> 89812 (-0.02%); split: -0.06%, +0.03%
PreSGPRs: 2926 -> 2929 (+0.10%)
PreVGPRs: 2920 -> 2919 (-0.03%); split: -0.07%, +0.03%
VALU: 76638 -> 76556 (-0.11%)
SALU: 37856 -> 37859 (+0.01%); split: -0.01%, +0.01%
VOPD: 10943 -> 10936 (-0.06%)

Foz-DB Navi21:
Totals from 59 (0.07% of 82387) affected shaders:
Instrs: 1047744 -> 1047578 (-0.02%)
CodeSize: 5641948 -> 5640780 (-0.02%)
Latency: 5116816 -> 5116957 (+0.00%); split: -0.00%, +0.01%
InvThroughput: 1274035 -> 1274023 (-0.00%); split: -0.00%, +0.00%
VClause: 30744 -> 30745 (+0.00%)
PreSGPRs: 3329 -> 3333 (+0.12%)
PreVGPRs: 4130 -> 4129 (-0.02%); split: -0.05%, +0.02%
VALU: 689731 -> 689562 (-0.02%)
SALU: 162830 -> 162833 (+0.00%); split: -0.00%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:16 +00:00
Georg Lehmann
ee0354e0f1 aco/optimizer: use new helpers for bitwise n2 opts
Foz-DB Navi48:
Totals from 604 (0.73% of 82419) affected shaders:
Instrs: 2759878 -> 2758431 (-0.05%); split: -0.06%, +0.01%
CodeSize: 14801888 -> 14793412 (-0.06%); split: -0.06%, +0.01%
SpillSGPRs: 6237 -> 6233 (-0.06%)
Latency: 23509766 -> 23507853 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 7471297 -> 7471008 (-0.00%); split: -0.00%, +0.00%
Branches: 104979 -> 104977 (-0.00%)
PreSGPRs: 51506 -> 51408 (-0.19%); split: -0.20%, +0.01%
VALU: 1351564 -> 1351561 (-0.00%); split: -0.00%, +0.00%
SALU: 537430 -> 536266 (-0.22%); split: -0.23%, +0.01%
VOPD: 3834 -> 3833 (-0.03%)

Foz-DB Navi21:
Totals from 739 (0.90% of 82387) affected shaders:
Instrs: 2489644 -> 2488228 (-0.06%); split: -0.06%, +0.00%
CodeSize: 13930192 -> 13915972 (-0.10%); split: -0.11%, +0.00%
SpillSGPRs: 980 -> 976 (-0.41%)
Latency: 25027553 -> 25027845 (+0.00%); split: -0.01%, +0.01%
InvThroughput: 8591377 -> 8591097 (-0.00%); split: -0.00%, +0.00%
SClause: 78380 -> 78382 (+0.00%)
Copies: 275433 -> 275393 (-0.01%); split: -0.02%, +0.01%
Branches: 113718 -> 113716 (-0.00%)
PreSGPRs: 48377 -> 48260 (-0.24%); split: -0.27%, +0.03%
VALU: 1589250 -> 1589240 (-0.00%)
SALU: 420348 -> 418962 (-0.33%); split: -0.34%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:15 +00:00
Georg Lehmann
758fe79ad5 aco/optimizer: use new helpers for v_sub opts
Foz-DB Navi48:
Totals from 1315 (1.60% of 82419) affected shaders:
Instrs: 1339446 -> 1339428 (-0.00%)
CodeSize: 7049636 -> 7049596 (-0.00%)
Latency: 7790708 -> 7790698 (-0.00%)
InvThroughput: 1588815 -> 1588807 (-0.00%)
VALU: 826831 -> 826821 (-0.00%)

Foz-DB Navi21:
Totals from 344 (0.42% of 82387) affected shaders:
Instrs: 692048 -> 692040 (-0.00%); split: -0.00%, +0.00%
Latency: 6987086 -> 6987066 (-0.00%)
InvThroughput: 2174789 -> 2174762 (-0.00%)
Copies: 57845 -> 57850 (+0.01%)
VALU: 475761 -> 475748 (-0.00%)
SALU: 93692 -> 93697 (+0.01%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:14 +00:00
Georg Lehmann
e42be7536c aco/optimizer: use new helpers for remaining add opts
Foz-DB Navi48:
Totals from 373 (0.45% of 82419) affected shaders:
Instrs: 542269 -> 542186 (-0.02%); split: -0.06%, +0.04%
CodeSize: 2872728 -> 2867204 (-0.19%); split: -0.21%, +0.02%
Latency: 3174435 -> 3174634 (+0.01%); split: -0.01%, +0.01%
InvThroughput: 828783 -> 828600 (-0.02%); split: -0.03%, +0.01%
SClause: 11954 -> 11955 (+0.01%)
Copies: 49104 -> 49110 (+0.01%)
PreSGPRs: 15422 -> 15420 (-0.01%)
VALU: 262635 -> 262641 (+0.00%)

Foz-DB Navi21:
Totals from 426 (0.52% of 82387) affected shaders:
Instrs: 624744 -> 624754 (+0.00%); split: -0.00%, +0.00%
CodeSize: 3382728 -> 3385664 (+0.09%); split: -0.00%, +0.09%
Latency: 3841693 -> 3842101 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 1132036 -> 1132065 (+0.00%); split: -0.00%, +0.00%
VClause: 14008 -> 14011 (+0.02%)
Copies: 73104 -> 73114 (+0.01%); split: -0.00%, +0.02%
PreSGPRs: 19504 -> 19502 (-0.01%)
SALU: 131431 -> 131443 (+0.01%)

Foz-DB Polaris10:
Totals from 812 (1.31% of 61894) affected shaders:
Instrs: 610178 -> 609219 (-0.16%); split: -0.21%, +0.05%
CodeSize: 3142404 -> 3147304 (+0.16%); split: -0.02%, +0.17%
VGPRs: 38380 -> 38376 (-0.01%)
Latency: 8312085 -> 8307755 (-0.05%); split: -0.12%, +0.07%
InvThroughput: 3929970 -> 3924631 (-0.14%); split: -0.15%, +0.01%
VClause: 15714 -> 15632 (-0.52%); split: -0.67%, +0.15%
SClause: 14509 -> 14510 (+0.01%); split: -0.02%, +0.03%
Copies: 70197 -> 70388 (+0.27%); split: -0.61%, +0.89%
PreSGPRs: 26409 -> 26404 (-0.02%); split: -0.02%, +0.00%
PreVGPRs: 30448 -> 30436 (-0.04%)
VALU: 408184 -> 407068 (-0.27%); split: -0.29%, +0.01%
SALU: 95726 -> 95959 (+0.24%); split: -0.30%, +0.54%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:13 +00:00
Georg Lehmann
adc55b1a1e aco/optimizer: use new helpers for v_and opt
Foz-DB Navi48:
Totals from 465 (0.56% of 82419) affected shaders:
Instrs: 372721 -> 372083 (-0.17%); split: -0.18%, +0.01%
CodeSize: 2004568 -> 2003332 (-0.06%)
Latency: 3664162 -> 3660745 (-0.09%); split: -0.10%, +0.00%
InvThroughput: 892042 -> 890994 (-0.12%); split: -0.12%, +0.01%
Copies: 35552 -> 35549 (-0.01%)
VALU: 171781 -> 171333 (-0.26%); split: -0.28%, +0.02%
SALU: 87946 -> 87949 (+0.00%)
VOPD: 48 -> 49 (+2.08%)

Foz-DB Navi21:
Totals from 191 (0.23% of 82387) affected shaders:
Instrs: 139340 -> 139178 (-0.12%); split: -0.13%, +0.02%
CodeSize: 798660 -> 798284 (-0.05%)
Latency: 1672750 -> 1673194 (+0.03%); split: -0.06%, +0.08%
InvThroughput: 634847 -> 634651 (-0.03%); split: -0.06%, +0.03%
Copies: 16372 -> 16366 (-0.04%); split: -0.04%, +0.01%
VALU: 79668 -> 79506 (-0.20%); split: -0.23%, +0.03%
SALU: 38233 -> 38236 (+0.01%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:13 +00:00
Georg Lehmann
7bc6d8e2ad aco/optimizer: add more v_add_lshl_u32 opts
No Foz-DB changes on Navi21.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:12 +00:00
Georg Lehmann
6a1caabd64 aco/optimizer: use new helpers for v_add_lshl_u32
Foz-DB Navi48:
Totals from 357 (0.43% of 82419) affected shaders:
Instrs: 244419 -> 243608 (-0.33%); split: -0.34%, +0.01%
CodeSize: 1302584 -> 1304188 (+0.12%); split: -0.00%, +0.13%
VGPRs: 21240 -> 21216 (-0.11%)
Latency: 1226165 -> 1225651 (-0.04%); split: -0.06%, +0.02%
InvThroughput: 162432 -> 161940 (-0.30%); split: -0.30%, +0.00%
Copies: 16607 -> 16610 (+0.02%)
PreSGPRs: 14082 -> 14135 (+0.38%)
PreVGPRs: 15917 -> 15914 (-0.02%)
VALU: 136308 -> 135699 (-0.45%)
SALU: 24415 -> 24418 (+0.01%)
VOPD: 333 -> 334 (+0.30%)

Foz-DB Navi21:
Totals from 319 (0.39% of 82387) affected shaders:
Instrs: 255434 -> 254831 (-0.24%)
CodeSize: 1375792 -> 1378164 (+0.17%)
VGPRs: 15360 -> 15344 (-0.10%)
Latency: 1405956 -> 1405181 (-0.06%)
InvThroughput: 174402 -> 173816 (-0.34%)
Copies: 25892 -> 25891 (-0.00%)
PreSGPRs: 14129 -> 14132 (+0.02%)
PreVGPRs: 12457 -> 12454 (-0.02%)
VALU: 139630 -> 139032 (-0.43%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:12 +00:00
Georg Lehmann
7108dac637 aco/optimizer: use new helpers for s_lshl<n>_add_u32
Foz-DB Navi48:
Totals from 7654 (9.29% of 82419) affected shaders:
Instrs: 6170479 -> 6174536 (+0.07%); split: -0.07%, +0.13%
CodeSize: 32489580 -> 32500100 (+0.03%); split: -0.07%, +0.10%
SpillSGPRs: 4253 -> 4224 (-0.68%); split: -0.71%, +0.02%
Latency: 60472662 -> 60489681 (+0.03%); split: -0.02%, +0.04%
InvThroughput: 9218099 -> 9218149 (+0.00%); split: -0.01%, +0.01%
VClause: 121094 -> 121089 (-0.00%); split: -0.01%, +0.00%
SClause: 178092 -> 179830 (+0.98%); split: -0.55%, +1.53%
Copies: 424495 -> 423756 (-0.17%); split: -0.57%, +0.40%
Branches: 120352 -> 120353 (+0.00%); split: -0.01%, +0.01%
PreSGPRs: 334391 -> 333381 (-0.30%); split: -0.33%, +0.02%
VALU: 3349394 -> 3349323 (-0.00%); split: -0.00%, +0.00%
SALU: 957913 -> 957149 (-0.08%); split: -0.25%, +0.17%
VOPD: 9177 -> 9179 (+0.02%); split: +0.03%, -0.01%

Foz-DB Navi21:
Totals from 7649 (9.28% of 82387) affected shaders:
Instrs: 6144605 -> 6143005 (-0.03%); split: -0.06%, +0.04%
CodeSize: 32685976 -> 32672380 (-0.04%); split: -0.08%, +0.04%
SpillSGPRs: 3079 -> 3067 (-0.39%); split: -0.42%, +0.03%
Latency: 64979945 -> 65002741 (+0.04%); split: -0.02%, +0.05%
InvThroughput: 14754398 -> 14754230 (-0.00%); split: -0.01%, +0.01%
VClause: 132336 -> 132357 (+0.02%); split: -0.02%, +0.03%
SClause: 190229 -> 191340 (+0.58%); split: -1.01%, +1.60%
Copies: 511915 -> 511287 (-0.12%); split: -0.44%, +0.32%
Branches: 157156 -> 157154 (-0.00%); split: -0.01%, +0.01%
PreSGPRs: 345761 -> 344826 (-0.27%); split: -0.33%, +0.05%
VALU: 3856887 -> 3856928 (+0.00%); split: -0.01%, +0.01%
SALU: 1001190 -> 1000362 (-0.08%); split: -0.22%, +0.14%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:10 +00:00
Georg Lehmann
d9919c3e10 aco/optimizer: optimize add(mad_u32_u16(a, b, 0), c)
Foz-DB Navi48:
Totals from 104 (0.13% of 82419) affected shaders:
Instrs: 3554243 -> 3553555 (-0.02%); split: -0.02%, +0.00%
CodeSize: 18836004 -> 18830572 (-0.03%); split: -0.03%, +0.00%
Latency: 19288034 -> 19287208 (-0.00%); split: -0.01%, +0.00%
InvThroughput: 3527510 -> 3526925 (-0.02%); split: -0.02%, +0.00%
VClause: 89526 -> 89522 (-0.00%); split: -0.02%, +0.01%
SClause: 62484 -> 62492 (+0.01%); split: -0.00%, +0.01%
Copies: 266415 -> 266404 (-0.00%); split: -0.04%, +0.03%
Branches: 102123 -> 102125 (+0.00%)
VALU: 1987067 -> 1986531 (-0.03%); split: -0.03%, +0.00%
SALU: 471348 -> 471346 (-0.00%); split: -0.00%, +0.00%

Foz-DB Navi21:
Totals from 228 (0.28% of 82387) affected shaders:
Instrs: 3069693 -> 3068317 (-0.04%); split: -0.05%, +0.00%
CodeSize: 16582476 -> 16574920 (-0.05%); split: -0.05%, +0.00%
Latency: 20038755 -> 20030986 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 4742546 -> 4738245 (-0.09%); split: -0.10%, +0.00%
VClause: 93157 -> 93135 (-0.02%); split: -0.03%, +0.01%
Copies: 265019 -> 264959 (-0.02%); split: -0.04%, +0.02%
VALU: 2025352 -> 2023897 (-0.07%); split: -0.07%, +0.00%
SALU: 447385 -> 447375 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:10 +00:00
Georg Lehmann
0359c8a901 aco/optimizer: use new helpers for v_add_u32 opts
Foz-DB Navi48:
Totals from 1554 (1.89% of 82419) affected shaders:
Instrs: 5154325 -> 5151499 (-0.05%); split: -0.08%, +0.02%
CodeSize: 27310012 -> 27318708 (+0.03%); split: -0.01%, +0.05%
VGPRs: 97236 -> 97200 (-0.04%); split: -0.05%, +0.01%
Latency: 34121873 -> 34120894 (-0.00%); split: -0.02%, +0.01%
InvThroughput: 6735276 -> 6730418 (-0.07%); split: -0.08%, +0.01%
VClause: 130106 -> 130090 (-0.01%); split: -0.05%, +0.04%
SClause: 90439 -> 90449 (+0.01%); split: -0.00%, +0.01%
Copies: 382920 -> 382401 (-0.14%); split: -0.18%, +0.05%
Branches: 130089 -> 130091 (+0.00%)
PreSGPRs: 67745 -> 67743 (-0.00%); split: -0.01%, +0.00%
PreVGPRs: 72710 -> 72674 (-0.05%)
VALU: 2941866 -> 2938129 (-0.13%); split: -0.13%, +0.00%
SALU: 651032 -> 651779 (+0.11%); split: -0.02%, +0.14%
VOPD: 2446 -> 2393 (-2.17%); split: +0.70%, -2.86%

Foz-DB Navi21:
Totals from 1534 (1.86% of 82387) affected shaders:
MaxWaves: 32481 -> 32479 (-0.01%)
Instrs: 4732755 -> 4730039 (-0.06%); split: -0.06%, +0.00%
CodeSize: 25305728 -> 25313148 (+0.03%); split: -0.00%, +0.03%
VGPRs: 84424 -> 84448 (+0.03%)
SpillVGPRs: 2420 -> 2419 (-0.04%)
Scratch: 180224 -> 179200 (-0.57%)
Latency: 36843383 -> 36846269 (+0.01%); split: -0.01%, +0.02%
InvThroughput: 9252495 -> 9238142 (-0.16%); split: -0.17%, +0.02%
VClause: 146629 -> 146671 (+0.03%); split: -0.02%, +0.05%
SClause: 94502 -> 94512 (+0.01%); split: -0.00%, +0.01%
Copies: 403672 -> 403592 (-0.02%); split: -0.09%, +0.07%
Branches: 141145 -> 141137 (-0.01%)
PreSGPRs: 70003 -> 70001 (-0.00%); split: -0.01%, +0.00%
PreVGPRs: 70835 -> 70800 (-0.05%)
VALU: 3114513 -> 3111338 (-0.10%); split: -0.10%, +0.00%
SALU: 651177 -> 651925 (+0.11%); split: -0.02%, +0.13%
VMEM: 271263 -> 271261 (-0.00%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:09 +00:00
Georg Lehmann
715b9214da aco/optimizer: use new helpers for xor opts
Foz-DB Navi48:
Totals from 26 (0.03% of 82419) affected shaders:
Instrs: 180854 -> 180787 (-0.04%)
CodeSize: 948640 -> 948832 (+0.02%); split: -0.01%, +0.03%
Latency: 527883 -> 527858 (-0.00%); split: -0.03%, +0.02%
InvThroughput: 149480 -> 149379 (-0.07%); split: -0.07%, +0.00%
PreVGPRs: 1502 -> 1503 (+0.07%)
VALU: 84220 -> 84168 (-0.06%)

Foz-DB Navi21:
Totals from 26 (0.03% of 82387) affected shaders:
Instrs: 150984 -> 150929 (-0.04%)
CodeSize: 800404 -> 800552 (+0.02%); split: -0.00%, +0.02%
Latency: 541067 -> 540854 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 182046 -> 181983 (-0.03%); split: -0.04%, +0.00%
Copies: 11324 -> 11322 (-0.02%)
PreVGPRs: 1568 -> 1569 (+0.06%)
VALU: 96977 -> 96923 (-0.06%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:08 +00:00
Georg Lehmann
3ba783e716 aco/optimizer: use new helpers for v_or opts
Foz-DB Navi48:
Totals from 1518 (1.84% of 82419) affected shaders:
Instrs: 6575669 -> 6575601 (-0.00%); split: -0.01%, +0.01%
CodeSize: 35135060 -> 35136020 (+0.00%); split: -0.00%, +0.01%
VGPRs: 99660 -> 99648 (-0.01%)
Latency: 47912874 -> 47910876 (-0.00%); split: -0.01%, +0.00%
InvThroughput: 9913228 -> 9912959 (-0.00%); split: -0.00%, +0.00%
VClause: 151572 -> 151567 (-0.00%); split: -0.01%, +0.00%
SClause: 133112 -> 133109 (-0.00%); split: -0.00%, +0.00%
Copies: 577835 -> 577837 (+0.00%); split: -0.01%, +0.01%
PreSGPRs: 84939 -> 84898 (-0.05%)
PreVGPRs: 75892 -> 75891 (-0.00%)
VALU: 3520300 -> 3520176 (-0.00%); split: -0.00%, +0.00%
SALU: 1026499 -> 1026529 (+0.00%); split: -0.00%, +0.01%
VOPD: 6830 -> 6850 (+0.29%); split: +0.31%, -0.01%

Foz-DB Navi21:
Totals from 1508 (1.83% of 82387) affected shaders:
Instrs: 5053785 -> 5053710 (-0.00%); split: -0.00%, +0.00%
CodeSize: 27603768 -> 27604048 (+0.00%); split: -0.00%, +0.00%
Latency: 44447441 -> 44444474 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 11666771 -> 11666371 (-0.00%); split: -0.00%, +0.00%
SClause: 121429 -> 121435 (+0.00%); split: -0.00%, +0.01%
Copies: 496693 -> 496642 (-0.01%); split: -0.02%, +0.01%
PreSGPRs: 72106 -> 72071 (-0.05%)
PreVGPRs: 69819 -> 69818 (-0.00%)
VALU: 3294641 -> 3294547 (-0.00%); split: -0.00%, +0.00%
SALU: 799012 -> 799014 (+0.00%); split: -0.01%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:08 +00:00
Georg Lehmann
88f7e3fff3 aco/optimizer: parse pseudo alu instructions
For combining, it's easier to handle these like their respective alu.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38530>
2025-11-25 11:49:07 +00:00
Valentine Burley
8a1ea724b4 egl: Disable kopper on Android
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Kopper is not supported on Android, and attempting to use it breaks zink
on the platform.

Disable kopper automatically when running on Android, fixing zink without
`LIBGL_KOPPER_DISABLE`.

Fixes: 3294cad341 ("egl: Rename dri2_detect_swrast() and also detect kopper")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14331
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38626>
2025-11-25 10:04:51 +00:00
Timur Kristóf
4a76ed16d9 radv: Advertise sparse features pre Polaris with perftest flag
RADV_PERFTEST=sparse is a new option to enable experimental
support for sparse features when they aren't enabled by default:

- gfx6 supports sparse, albeit with a reduced feature set
- gfx7 supports 3D images (with non-standard block shape)
  and unaligned mip sizes
- gfx8 supports the same feature set as gfx7

(Polaris behaves more stable than other gfx8, so we had
already enabled it by default on Polaris for a long time.)

We pass all dEQP-VK.*sparse* tests on gfx6-8 when running on
a single thread however it may cause hangs or failures
when executing the tests on multiple parallel jobs.

We plan to enable this by default when we deem it stable enough.
Until then, users can already test some games that use it.
Note, at the moment there are some unsolved problems in the
amdgpu kernel driver regarding sparse bindings on these GPUs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38553>
2025-11-25 10:39:21 +01:00
Timur Kristóf
f00abaa1d4 ac/gpu_info: Add different sparse features
The following sparse features are not supported by all GPUs, so
keep track of their support individually:
has_sparse_image_3d
has_sparse_image_standard_3d
has_sparse_unaligned_mip_size

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38553>
2025-11-25 10:38:45 +01:00
Timur Kristóf
c15f9e7022 ac/surface: Use ADDR_TM_PRT_TILED_THIN1 on GFX6-8
Don't use ADDR_TM_PRT_2D_TILED_THIN1 because it is not supported
on CI/VI according to CiLib::HwlOverrideTileMode, and it is also
missing from SiLib::HwlOverrideTileMode.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38553>
2025-11-25 10:38:45 +01:00
Timur Kristóf
292460670a ac/gpu_info: Fix determining when CP DMA supports sparse
Change has_cp_dma_with_null_prt_bug to cp_dma_supports_sparse
to know when CP DMA supports sparse. CP DMA doesn't support
sparse on any gfx6-9 chip.

Sources:
- d2669628 already documented this on gfx6 in 2018
- e259f405 added a radeonsi workaround for gfx9 in 2023
- 235f70e4 added a radv workaround for Polaris in 2025

Now RADV will use compute copy and fill for sparse resources
on all gfx6-9 chips (previously only did on Polaris and newer).

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38553>
2025-11-25 10:38:45 +01:00
Timur Kristóf
cd72ce3213 ac/gpu_info: Rename has_sparse_vm_mappings to has_sparse
No functional changes. Just simplify the name.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38553>
2025-11-25 10:38:44 +01:00
Kenneth Graunke
e49418744a brw: Set extended_bindless_surface_offset to true for Gfx12.5+
anv sets device->uses_ex_bso on verx10 >= 125 and then sets the
compiler->extended_bindless_surface_offset to that.

iris was not setting anything.  However, LSC_ADDR_SURFTYPE_SS used for
scratch on Gfx12.5 is bindless, and Xe2 uses ExBSO for all UGM access,
so we need to be setting this.

Just set it in the compiler so both drivers have it set.

Fixes piglit arb_tessellation_shader-tes-gs-max-output -small -scan 1 50
on iris.

Fixes: 80c89909f3 ("brw: fixup immediate bindless surface handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38645>
2025-11-25 08:21:30 +00:00
Samuel Pitoiset
24d14313f6 radv: enable VRS for flat shading on GFX11+
RADV_DEBUG=novrsflatshading can be used to disable it if needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38527>
2025-11-25 07:52:52 +00:00
Samuel Pitoiset
92eaf7c0f5 radv: implement VRS for flat shading on GFX11+
For features parity compared to GFX10.3

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38527>
2025-11-25 07:52:52 +00:00
Samuel Pitoiset
90f761a7d5 radv: add a new dirty state for the VRS surface state on GFX11+
Unlike GFX10.3, on GFX11+ VRS override is part of PA_SC_VRS_OVERRIDE_CNTL
which also controls whether the VRS surface is enabled or not. This
new dirty state will allow us to re-emit that state without re-emitting
the complete framebuffer for VRS flat shading.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38527>
2025-11-25 07:52:52 +00:00
Samuel Pitoiset
af461de026 radv: fix per-submit RGP captures on video queues
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
SQTT user data packets aren't supported either.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38575>
2025-11-25 07:30:10 +00:00
Faith Ekstrand
e4e619d685 vulkan/drm-syncobj: Stop returning early waiting for sync files
In the WAIT_ALL case in spin_wait_for_sync_file(), we were returning the
moment we saw the first success.  However, this isn't a wait-all, it's a
bad wait-any.  We should instead just continue on to check the next sync
until we've ensured that every sync in the array has a sync file.  The
only reason this wasn't blowing up in our face is because it only
affects non-timeline drivers (pretty rare these days) and because most
of the places where we use WAIT_PENDING on non-timeline drivers is to
guard a sync file export and those typically have only a single sync in
the array.

Cc: mesa-stable
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38635>
2025-11-25 06:08:07 +00:00
Tapani Pälli
21f646d196 drirc: set intel_disable_threaded_context for Amnesia The Bunker
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14084
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38567>
2025-11-25 05:40:10 +00:00
Tapani Pälli
4daabf76b4 drirc/iris: add drirc to disable threaded context
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38567>
2025-11-25 05:40:10 +00:00
Dmitry Baryshkov
10d3d7bb36 freedreno/ci: correct rules for a618-gles-asan
The a618-gles-asan job is not a turnip job, so turnip rules don't apply
to it. Change it to use GL-related set of rules.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38643>
2025-11-25 05:15:35 +00:00
Rob Clark
cccdbbc360 freedreno: Fix internal VBO reference leak
It appears that this extra ref is no longer needed.  And not dropped
anywhere.

Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14315
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38643>
2025-11-25 05:15:35 +00:00
Dmitry Baryshkov
99a806420a freedreno/ci: update fails / flakes list for a750-gl-cl job
Update the lists in the hope of making nightly builds pass for msm.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38564>
2025-11-25 04:41:18 +00:00
Dmitry Baryshkov
ebe722f88a freedreno/ci: mark egl_chromium_sync_control tests as passing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Mark spec@egl_chromium_sync_control jobs as passing after the commit
a6bf07e7c2 ("dri: avoid sending too many present reuqests when app
start or pause").

Fixes: a6bf07e7c2 ("dri: avoid sending too many present reuqests when app start or pause")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38565>
2025-11-24 23:29:16 +00:00
Ian Forbes
4e16a5b68b svga: Check if Stencil buffer is NULL
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes a nullptr dereference on older HW versions.

Fixes: f29d939824 ("svga: rework framebuffer state")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38623>
2025-11-24 20:50:16 +00:00
Aitor Camacho
67d05f71e9 kk: Track fragment helper status since Metal does not correctly demote them
When discarding a fragment in Metal, it will not be demoted to helper. At
least for Apple Silicon M1 and M2. Call nir_lower_is_helper_invocation to
work around this.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38590>
2025-11-24 20:34:23 +00:00
Aitor Camacho
a015397c52 kk: Remove mem leaks in NIR->MSL, device/sampler create and cmdbuf release
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38596>
2025-11-24 20:14:26 +00:00
Aitor Camacho
7eae8bee52 kk: Mark root buffer as not dirty after updating it
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38630>
2025-11-24 19:45:49 +00:00
Simon McVittie
b860ae309a vulkan: Optionally share one JSON manifest per driver between architectures
If the library_path is just a basename like `libvulkan_lvp.so`, then we
can share the same JSON manifest like `lvp_icd.json` between all of the
architectures, like we already do for Vulkan layers. The library will
be looked up in the dynamic linker's default search path in this case,
and in practice will be found in `${libdir}`. This is how the Mesa's
EGL driver and Vulkan layers work, how Mesa is packaged in Debian 13,
and also how the Nvidia proprietary driver works; it makes installation
simpler for distros, especially on multiarch systems like Debian and
the freedesktop.org SDK.

However, if we want a separate manifest per architecture in order to
be able to write the full path into it, we still need per-architecture
filename disambiguation like `lvp_icd.x86_64.json`.

We presumably still want a separate per architecture on Windows, because
the concept of a single monolithic `${libdir}` is less common there, and
it can also be helpful during development when setting `$VK_DRIVER_FILES`
to force the use of a specific driver installed in a non-default location.

Use the following parameter to passed to vk_icd_gen:
'--icd-lib-path', vulkan_icd_lib_path,
'--icd-filename', icd_file_name,
output : 'virtio_icd.' + vulkan_manifest_suffix,

and the output is passed by '--out', '@OUTPUT@',
so we can detect vulkan_manifest_per_architecture from the --out parameter in script.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13745
Signed-off-by: Simon McVittie <smcv@collabora.com>
Co-authored-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37314>
2025-11-24 19:05:57 +00:00
Simon McVittie
1ec7bc382d vulkan: Don't emit library_arch if the library_path is just a basename
If the library_path is just a basename like `libvulkan_lvp.so`, then
we can share the same JSON manifest between all of the architectures,
like we already do for Vulkan layers. This is also how the Nvidia
proprietary driver works, and how Mesa is packaged in Debian 13.
However, this will only work if we don't mark the manifest as being
architecture-specific.

This partially reverts commit f7aa6ba9 "vulkan: Specify library_arch in
ICD files".

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37314>
2025-11-24 19:05:57 +00:00
Samuel Pitoiset
6ab9e69d2f radv: ignore radv_disable_dcc{_mips} drirc options on GFX12
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
They shouldn't have any effects because on GFX12 DCC is transparent
to the userspace driver, and they should improve performance for the
games listed below:

- DOOM (2016)
- Wolfenstein II
- Red Dead Redemption 2
- WWE 2k23

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38481>
2025-11-24 17:40:33 +00:00
Samuel Pitoiset
e6514069ad radv: use a separate parameter for radv_disable_dcc
To stop abusing RADV_DEBUG flags for drirc entries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38481>
2025-11-24 17:40:33 +00:00
Samuel Pitoiset
d497b87f7f radv: use a separate parameter for radv_rt_wave64
To stop abusing RADV_PERFTEST flags for drirc entries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38481>
2025-11-24 17:40:32 +00:00
Samuel Pitoiset
faccb0b7cd radv: reformat debug/perftest options arrays
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38481>
2025-11-24 17:40:31 +00:00
Daniel Schürmann
6a35ab81b8 Revert "radv: Only call nir_opt_dead_write_vars once"
This reverts commit bf0e04a531.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38624>
2025-11-24 17:05:48 +00:00
Daniel Schürmann
7db497c096 Revert "radv: move nir_opt_copy_prop_vars out of optimization loop"
This reverts commit 36b0fdb7b7.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38624>
2025-11-24 17:05:48 +00:00
Juan A. Suarez Romero
d1754af4cd v3d/ci: add SKQP failure
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add a regression in SKQP.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38620>
2025-11-24 16:40:50 +00:00
Lionel Landwerlin
d51c0b8988 brw: fix SS surfaces usage
In 80c89909f3 ("brw: fixup immediate bindless surface handling") I
forgot that we have a special usage for the only _SS surface (the
scratch surface).

Because it's only delivered in the 31:10 bits of R0 and because we
want to minimize the amount of shader instructions for scratch
messages, the surface offset in shifted right by the driver to align
things properly for the 31:6 extended descriptor format.

This is unfortunately incompatible with the full 32bit format of
ExBSO. So this surface type currently cannot be considered bindless.

We might revisit later if we start using _SS surfaces for other
things.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 80c89909f3 ("brw: fixup immediate bindless surface handling")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38618>
2025-11-24 16:12:27 +00:00
Martin Roukala (né Peres)
e2307942a8 Revert "ci: disable mupuf's farm"
This reverts commit 1226ff99fa now that my ISP's
planned outtage is over.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38619>
2025-11-24 15:52:43 +00:00
Gurchetan Singh
62d0957a3b gfxstream: enable kumquat building on Windows
This adds several fixes so that kumquat can build.

TEST=meson setup -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" \
                 -Dzlib=false -Dopengl=false -Degl=false \
                 -Dvirtgpu_kumquat=true
                 --cross-file ${CROSS_PATH}

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:59:22 -08:00
Gurchetan Singh
3a16b69337 gfxstream: WindowsVirtGPU.h --> WindowsVirtGpu.h
Proper naming is important.  Needed for cross-compile for mingw.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
01bb498e16 util: be consistent about transitive dependencies
A transitive dependency is a dependency of a dependency.
So if, for example, mesa3d_util does explicitly use
zerocopy-derive, it should not need to a depend on it.

The package that pulls in transitive should already
include it has a dependency.  This provides clearer
methodologies in maintaining Rust code, similiar to
how Cargo.toml handles it.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
5eece7596e util: rust: more rust support for windows/MacOS
Need the same dependencies as Linux.

The RustixError type compiles on Windows.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
a2b42083e4 subprojects: errno: support for windows
This adds the support necessary to compile for windows.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
b6094567a7 subprojects: rustix: enable windows + macos build support
This is a matter of adding the right dependencies
and using them.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
7aec401b62 subprojects: add windows-link and windows-sys
Useful for Kumquat use cases.  Actually, useful for pretty much
anything Windows-related.  This are foundational crates supported
officially by our friends at Microsoft.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
d60c19fd10 subprojects: enable proper cross-compile on MinGW of certain crates
The virtgpu_kumquat deps -- used by gfxstream -- don't work
with cross-compile.  This is because they set "native: true" even
for host machine deps.

In addition, some proc-macro deps (which need "native: true") try
to link against host machine deps.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
b7a5c4a951 subprojects: update rustix and libc to newer versions
Useful for future refactors.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Patrick Lerda
f005c0b5ad r600: fix error filters compatibility
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The shader-db functionality was interfering with the error
filters.

Two new options are added: R600_DEBUG=shaderdb and
R600_DEBUG=precompile. The option precompile is added
to maintain the compatibility with the shader-db repository.

This change fixes 22 of these tests:
deqp-gles31/functional/debug/error_filters/case_.*: warn pass
deqp-gles31/functional/debug/error_groups/case_.*: warn pass

Fixes: 28d6a5af25 ("r600: Add shader precompile and shader-db support.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38485>
2025-11-24 13:37:10 +00:00
Hyunjun Ko
01de6ac134 vulkan/video: Fix H.265 long-term reference handling
Without these fixes, H.265 streams using long-term references would
fail to decode correctly as the decoder wouldn't distinguish between
short-term and long-term reference frames.

Fixes: 896f95a37e ("vulkan/video: fix h265 decoding with LT enabled.")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38571>
2025-11-24 12:58:02 +00:00
Hyunjun Ko
0fd0b76922 vulkan/video: Fix H.265 short-term reference picture set handling
An H.265 SPS can contain multiple short-term reference picture sets.
Fix the code to properly store and copy all sets instead of just one.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38571>
2025-11-24 12:58:02 +00:00
Daniel Schürmann
fc534ed209 amd: restrict radeon_info::marketing_name to 64 characters and copy it
The pointer is owned by the DRM device.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38546>
2025-11-24 12:34:08 +00:00
Daniel Schürmann
5a39e1e645 amd: remove radeon_info::is_pro_graphics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38546>
2025-11-24 12:34:08 +00:00
Daniel Schürmann
24a43666e3 amd: replace uses of radeon_info::name with ac_get_family_name()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38546>
2025-11-24 12:34:08 +00:00
Daniel Schürmann
7b2f88b97c amd: remove radeon_info::lowercase_name
It is redundant.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38546>
2025-11-24 12:34:08 +00:00
Daniel Schürmann
8777894d3e amd: remove radeon_info::dev_filename
Instead, we can pass the file descriptor to ac_print_gpu_info().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38546>
2025-11-24 12:34:08 +00:00
Daniel Schürmann
80ab1de4be amd/drm-shim: handle AMDGPU_INFO_HW_IP_COUNT
It doesn't actually matter.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38546>
2025-11-24 12:34:08 +00:00
Daniel Schürmann
fa15f0c855 drm-shim: handle DRM_CAP_ADDFB2_MODIFIERS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38546>
2025-11-24 12:34:08 +00:00
Eric Engestrom
53fe1f39a0 ci: use $CI_TRON_JOB_PRIORITY tag on all ci-tron jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Moving `ci-tron:priority:` out of the variable because an empty value
will not be authorized, and this makes it obvious if that bug ever
happens (job will not be picked up and gitlab will complain that
`ci-tron:priority:` is not a tag registered by any runner), instead of
getting picked up by any runner that will then reject (fail) the job.

(This is caused by GitLab's API not allowing tags to be enforced when
picking up jobs, resulting in jobs with missing tags being picked up by
any runner, like the bug we had with the generic fd.o runners a few
months ago.)

v2 (Martin Roukala):
 * use the priority tags in all amdgpu jobs
 * add missing tags in etnaviv jobs
 * add missing tags in broadcom jobs

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37897>
2025-11-24 12:02:40 +00:00
Martin Roukala (né Peres)
1226ff99fa ci: disable mupuf's farm
My ISP is working on some improvements on the network for a couple of
hours today, and a couple of hours tomorrow.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38614>
2025-11-24 13:20:59 +02:00
Aitor Camacho
87b81b7385 kk: Exposes more extensions/features we already supported
Extensions:
- VK_KHR_sampler_mirror_clamp_to_edge

Features:
- alphaToOne
- samplerMirrorClampToEdge
- shaderStorageImageArrayNonUniformIndexing
- shaderStorageTexelBufferArrayNonUniformIndexing
- shaderUniformBufferArrayNonUniformIndexing

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38591>
2025-11-24 10:40:48 +00:00
Lionel Landwerlin
8f9acc0150 brw: compute final copy propagation resulting source
Fixes this test on Xe2+:

INTEL_DEBUG=no32 ./deqp-vk -n dEQP-VK.spirv_assembly.instruction.maint9_vectorization.bit_field_u_extract.result_v16i-base_v16i-offset_s64u-count_s16i

Generate invalid code for that platform:

and(16)         g37<1>UW        g65<16,4,4>UW   0x000fUW        { align1 1H I@5 };
	ERROR: Invalid register region for source 0.  See special restrictions section.

Several helpers like has_subdword_integer_region_restriction() do not
see the final type of the source, so compute it early.

Maybe new_src could be used in more cases. Being conservative for now.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38548>
2025-11-24 10:14:32 +00:00
Yiwei Zhang
7a4263681c ci/venus: skip those causing oom killer to kill deqp
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/38606>
2025-11-24 09:50:09 +00:00
Andy Hsu
2ee6b4d96e intel/decoder: make libvulkan_intel to depend on stub decoder when buildtyle=release.
The libvulkan_intel does not need the decoder when buildtype=release
where the debugging is disabled.

However, the decoder implementation is decided by the dep_expat
which may be turned on by like -Dtools=intel and the binary size
of libvulkan_intel increase unexpectedly.

This change creates the stub dependency and decide the exact
decoder dependency of libvulkan_intel by the buildtype.

Test: meson setup builddir -D build-tests=true -Dbuildtype=release --reconfigure && ninja -C builddir && cd builddir && meson test

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Andy Hsu <hwandy@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38569>
2025-11-24 16:40:02 +08:00
Samuel Pitoiset
108d2d29a9 ac,radv,radeonsi: add more SPM helpers to common code
This also fixes a small bug on RADV for RDNA3 where counters might be
stuck.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38577>
2025-11-24 08:05:08 +00:00
Samuel Pitoiset
e2644a1389 radv: only reset SPM when cache counters are enabled with RGP
Otherwise, it's not necessary.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38577>
2025-11-24 08:05:08 +00:00
Samuel Pitoiset
0cc4e16c70 ac/spm,radv,radeonsi: configure the SPM sample interval in common code
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38577>
2025-11-24 08:05:08 +00:00
Samuel Pitoiset
9a61eaa1e3 radv: remove the ability to create NULL devices with RADV_FORCE_FAMILY
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
On Linux, drm-shim is the replacement.

On Windows, the project to support a compile-only device has been
abandonned since a while, so it's fine to not allow creating NULL
devices for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38544>
2025-11-24 07:44:49 +00:00
spencer-lunarg
77030f296e lavapipe: Expose EXT version of global_priority
We already supported 1.4 which has VK_KHR_global_priority and the
globalPriorityQuery feature.

tested with:
dEQP-VK.api.device_init.create_device_global_priority*
dEQP-VK.synchronization.global_priority_transition.*

Signed-off-by: spencer-lunarg <spencer@lunarg.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38340>
2025-11-24 07:29:24 +00:00
spencer-lunarg
744a961e15 lavapipe: Add VK_KHR_copy_memory_indirect formats
Add VK_FORMAT_FEATURE_2_COPY_IMAGE_INDIRECT_DST_BIT_KHR

tested with
dEQP-VK.api.copy_and_blit.copy_memory_indirect*
dEQP-VK.api.copy_and_blit.core.memory_to_depthstencil_indirect*
dEQP-VK.api.copy_and_blit.core.memory_to_image_indirect*
dEQP-VK.api.copy_and_blit.copy_commands2.image_to_buffer.2d_images.mip*indirect

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13989
Signed-off-by: spencer-lunarg <spencer@lunarg.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38339>
2025-11-23 23:02:46 -05:00
Dave Airlie
c00b66fa71 dozen: return INCOMPATIBLE_DRIVER on instance create failure
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When probing on generic Linux platforms, the loading of d3d12 and
the first init of could fail, but the error returned causes a
loader warning to be printed.

Use the correct error return to stop this.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38611>
2025-11-24 00:29:12 +00:00
Juan A. Suarez Romero
ba0f85ce2d broadcom/ci: unlock more CI-Tron jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Enable more CI-Tron jobs to be run in parallel with baremetal ones.

Disable the baremetal ones for those who CI-Tron jobs has already been
tested enough.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38610>
2025-11-23 23:24:11 +00:00
Yogesh Mohan Marimuthu
3ba6c9d0ac winsys/amdgpu: enable userq reg shadowing for gfx11.5
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36700>
2025-11-23 19:44:07 +00:00
Yogesh Mohan Marimuthu
700850f29d winsys/amdgpu: add assert that if kernel fence passes then user fence must pass
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36700>
2025-11-23 19:44:07 +00:00
Yogesh Mohan Marimuthu
9beb668d8d winsys/amdgpu: fwm packet pre-emption for gfx 11.5
gfx 11.5 uses f32 firmware. f32 firmware requires COND_EXEC
packet to flush the ring buffer when pre-emption occured.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36700>
2025-11-23 19:44:06 +00:00
Eric Engestrom
37c7d19e46 meson: auto-disable draw-use-llvm when llvm=disabled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The option's description is:
> Whether to use LLVM for the Gallium draw module, if LLVM is included.

Let's disable it right away if LLVM is disabled, to avoid some
configurations from failing.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38558>
2025-11-23 10:08:34 +01:00
Eric Engestrom
69bb927ebf meson: auto-disable amd-use-llvm when llvm=disabled
The option's description is:
> Whether to use LLVM for the AMD drivers, if LLVM is included.

Let's disable it right away if LLVM is disabled, to avoid configurations
like the one in the issue below from failing.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14306
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38558>
2025-11-23 10:08:14 +01:00
Matt Turner
4235c39a9a meson: Let -Ddraw-use-llvm=false work for R300 on non-x86
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Prior to commit b8b38d38b1 ("meson: reinstate LLVM requirement for r300
and enforce it for i915 too") it was possible to build and use r300 for
architectures that do not have LLVM (e.g., alpha).

The only SWTCL chips are integrated graphics in x86 systems, and are not
available in discrete cards.

Fixes: b8b38d38b1 ("meson: reinstate LLVM requirement for r300 and enforce it for i915 too")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38580>
2025-11-22 19:06:39 +00:00
Rob Clark
f0465ced7f freedreno/a6xx: Fix UB in convert_color()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Swizzle can include PIPE_SWIZZLE_0/_1 (4 and 5) which result in indexing
beyond the channel array.

Reported-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Fixes: 76e350671f ("freedreno/a6xx: Sysmem clear fixes")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38593>
2025-11-22 18:36:25 +00:00
Dave Airlie
3eef0c0245 radv: add support for cooperative matrix per element operations.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36992>
2025-11-22 13:16:20 +10:00
Dave Airlie
1ba49c3594 spirv: add initial support for cooperative matrix per-element ops
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36992>
2025-11-22 13:16:15 +10:00
Dave Airlie
a57753dca2 nir: add coopmat per element operations.
Cooperative matrix as per-element calls that are var args from a spir-v.

These uses the new call op enum.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36992>
2025-11-22 13:16:11 +10:00
Dylan Baker
bcedc88f21 meson: make libarchive a disabler
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This allows us to fully define crashdec in all situations, even when
its essential dependencies are not found. The result is that if
libarchive or lua is not found, the tests become disabled automatically.

This avoids the situation where `-Dbuild-tests=true`, but at least one
of libarchive and lua are missing, in which `crashdec` is used
undefined.

Acked-by: Rob Clark <rob.clark@oss.qualcomm.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38579>
2025-11-21 21:48:57 +00:00
Dylan Baker
1737638c98 meson: make dep_lua a disabler
There are cases where the freedreno `crashdec` program will not be
built, but will still be used. By making dep_lua a disabler, we move
closer to being able to have those tests automatically disabled when
crashdec isn't built.

Acked-by: Rob Clark <rob.clark@oss.qualcomm.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38579>
2025-11-21 21:48:57 +00:00
Lionel Landwerlin
7c193ffef1 anv: put more readable PIPE_CONTROL reasons
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: 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/38542>
2025-11-21 21:45:18 +02:00
Lionel Landwerlin
6d98fdb3ec anv: avoid pipe control reason tracking in emit_pipe_control
This is the last level layer of emission, we want the tracking to be
added above that, so that when flushing of previously accumulated
reasons happens, another pointless reason isn't added.

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/38542>
2025-11-21 21:45:18 +02:00
Aitor Camacho
a8a3863313 kk: Move all resource tracking to the residency set
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Removes encoder's use resource utilities. All memory allocations
are now tracked in the VkDevice level residency set. This is
accomplished by tracking buffer objects at create/destroy.
Also removes all descriptor set residency tracking since it is
no longer needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38505>
2025-11-21 19:01:48 +00:00
Aitor Camacho
4779f3d0de kk: Use residency sets for user allocations
Memory allocated through vkAllocateMemory is now tracked in a
VkDevice level MTLResidencySet that will be committed before
queue submission to ensure residency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38505>
2025-11-21 19:01:48 +00:00
Silvio Vilerino
417eb2340c d3d12: Video Encode - Reduce unnecessary syncs between encoder and context queues
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38578>
2025-11-21 09:02:13 -08:00
Silvio Vilerino
d9c2ccd543 d3d12: Video Encode - Do not flush on direct buffer maps
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38578>
2025-11-21 09:02:00 -08:00
Pohsiang (John) Hsu
f7c306c654 mediafoundation: log warning if dx11 device is not created with multithread protected
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38578>
2025-11-21 09:01:40 -08:00
Pohsiang (John) Hsu
d2fa57cb90 mediafoundation_frontend: update version to 1.08
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38578>
2025-11-21 09:01:24 -08:00
Benjamin Otte
f493f5c88d radv: Limit GTK workaround to affected versions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
GTK 4.20.3 includes a fix for the problem, so limit the workaround to
GTK <= 4.20.2.
The version number encoding is due to VK_MAKE_VERSION().

Fixes: 0d9d45db4e
Related: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/9128
Related: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/9164
Signed-off-by: Benjamin Otte <otte@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38550>
2025-11-21 16:11:50 +00:00
Samuel Pitoiset
344040c367 radv: enable RADV_THREAD_TRACE_CACHE_COUNTERS on GFX12
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38489>
2025-11-21 11:52:58 +00:00
Samuel Pitoiset
473118b6eb ac/spm: use hardware names for performance counters
Much easier to read.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38489>
2025-11-21 11:52:58 +00:00
Samuel Pitoiset
4c21a4846c ac/spm: adjust the granularity of SPM results on GFX12
It's 1, only GFX11-11.5 uses units of segment.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38489>
2025-11-21 11:52:58 +00:00
Samuel Pitoiset
f434c5c934 ac/spm: add cache counters configuration for GFX12
This is for the cache counters prior to RGP 2.6.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38489>
2025-11-21 11:52:58 +00:00
Samuel Pitoiset
da07f1ef3f radv: allocate the SQTT BO in GTT for faster readback
Reading VRAM from CPU is very slow.

This is similar to the SPM BO, and generating RGP captures is now
way faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38551>
2025-11-21 11:34:09 +00:00
Valentine Burley
d2ebe7719c ci/android: Build zink for arm64 as well
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We'd like to use zink on both x86_64 and arm64 on Android, so add it to
the build targets.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38572>
2025-11-21 10:50:43 +01:00
Laura Nao
b10369631e ci/container: Add script to build Perfetto tracebox
Add a script to build Perfetto’s tracebox tool for x86_64 and arm64
targets on Linux and Android.

Signed-off-by: Laura Nao <laura.nao@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38517>
2025-11-21 09:59:40 +01:00
Laura Nao
f9243dc92b ci/prepare-artifacts: Keep pps-producer binary in artifacts
Mesa builds using -Dperfetto=true generate a pps-producer binary.
Include it in the artifacts for use in runtime performance tracing
tests.

Signed-off-by: Laura Nao <laura.nao@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38517>
2025-11-21 09:59:40 +01:00
Laura Nao
b178612f11 ci: Enable Perfetto tracing support in Mesa builds for Linux/Android
Enable Perfetto tracing support in Mesa's x86_64/arm64 builds for Linux
and Android. This enables GPU performance counter collection via pps and
sets up the environment for runtime GL tests with support for CPU, GPU
and system-wide tracing. Information captured by Perfetto will provide
driver developers insight into the test environment and help identify
factors affecting performance.

Signed-off-by: Laura Nao <laura.nao@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38517>
2025-11-21 09:59:40 +01:00
Yiwei Zhang
fcd2acba41 ci/venus: skip Android incremental and shared present tests
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Those are mainly to test platform features, and they take too long. So
we skip.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38568>
2025-11-20 21:55:38 -08:00
Faith Ekstrand
17b9bc2770 spirv: Only set workgroup_size_variable on compute-like stages
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This should be ignored on non-compute stages but AGX changes 3D shaders
to compute without setting the workgroup size and blows up if it claims
variable workgroups.  The safest thing is to only set it from
spirv_to_nir for stages that actually have workgroups.

Fixes: 6d9f563960 ("spirv: Assume variable workgroup size unless it's set")
LoLed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38555>
2025-11-20 23:15:28 +00:00
Ryan Houdek
0f2dcf656a freedreno/fdl: Optimize linear_to_tiled with avx2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38249>
2025-11-20 22:42:07 +00:00
Kenneth Graunke
3160c516ca brw: Delete input_slots_valid from brw_wm_prog_key
Nothing in the compiler seems to use this anymore.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38556>
2025-11-20 14:10:39 -08:00
Kenneth Graunke
868377e4c7 brw: Delete program_string_id from brw program keys
This is strictly a GL thing.  iris can manage it in its own program keys
without polluting the compiler with stuff nobody else cares about.

We can also drop a lot of padding that was introduced in commit
a18835a9ca which doesn't appear to be
necessary.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38556>
2025-11-20 14:10:38 -08:00
Kenneth Graunke
fbd9bf6aeb iris: Use iris_any_prog_key, not brw_any_prog_key
We're storing iris keys here, not brw keys.  This worked because brw
keys are larger so you could fit any iris key in the memory.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38556>
2025-11-20 14:10:34 -08:00
Matt Turner
ad14942300 meson: Fix sysprof-capture-4 dependency
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The versioning scheme changed in v45.0 (the previous version was
3.48.0). As such, this version check would wrongly accept e.g. 48.0.

Fixes: e9341568fa ("meson: require sysprof-capture-4 >= 4.49.0")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38557>
2025-11-20 20:53:36 +00:00
Yurii Kolesnykov
8cc06191a8 apple_cgl.c: Fix error: call to undeclared function 'os_get_option'
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: Yurii Kolesnykov <root@yurikoles.com>
Fixes: 222b85328e ("mesa: replace most occurrences of getenv() with os_get_option()")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38429>
2025-11-20 18:39:19 +00:00
Yurii Kolesnykov
4913177b14 loader: Wrap nouveau_zink_predicate with HAVE_LIBDRM
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Fixes: 265afd9bfd ("loader: Don't fall back to nouveau GL without zink")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14290
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38429>
2025-11-20 18:39:19 +00:00
Marek Olšák
d7f03c649e nir/lower_io_passes: only sort variables for nir_lower_io_vars_to_temporaries
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38470>
2025-11-20 12:17:31 -05:00
Marek Olšák
02148dc6bc nir/lower_io_passes: fold bool lower_indirect_inputs
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38470>
2025-11-20 12:17:30 -05:00
Marek Olšák
9b4fc64324 nir/lower_io_passes: simplify conditions for when to lower IO to temps
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38470>
2025-11-20 12:17:28 -05:00
Marek Olšák
edfa3fdfbc nir/lower_io_passes: lower indirect TCS outputs sooner and clarify the behavior
We don't have to enter the lower-IO-to-temps block for TCS at all.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38470>
2025-11-20 12:17:26 -05:00
Anna Maniscalco
3e01031f10 radv: consistently use the value in bytes for esgs_itemsize
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Previosuly this value was in bytes for vs/tes and in dwords for gs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38514>
2025-11-20 16:45:37 +00:00
Anna Maniscalco
5e8885a339 radv: recalculate legacy_gs_info on bind
Previously legacy_gs_info calculated based on
gs_info->legacy_gs_info.esgs_itemsize which is calculated based on gs
input varyings.

However, when using ESO vs/tes can have outputs not read by gs, which
leads to underestimating LDS usage.

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38514>
2025-11-20 16:45:37 +00:00
Karmjit Mahil
36f6cf8a35 freedreno/registers: Clarify bit 64B of CP_REG_TO_MEM
One might think that the `64B` bit might be affecting just the
memory size, but that's not the case as it affects the register
count too. Setting `64B` with `CNT` of `1` actually copies 2
registers, and not 1.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38535>
2025-11-20 16:20:43 +00:00
Samuel Pitoiset
9c34567a4a vulkan: stop excluding Shader64BitIndexingEXT SPIR-V cap
The SPIRV spec has been fixed since
3853dc11e5 ("spirv: Update the JSON and headers").

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38543>
2025-11-20 15:44:04 +00:00
José Roberto de Souza
334ffcda14 iris: Release global_bufmgr_list_mutex on missing error paths
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: stable
Reported-by: Taketo Kabe
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13692
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38537>
2025-11-20 14:24:25 +00:00
Karmjit Mahil
bfdccc7563 freedreno/registers: Mark functions as constexpr where possible
This makes it possible for these to be used in static_asserts or if
we want to get a register offset (gen agnostic) and have it be
marked as constexpr. E.g.
```
constexpr uint32_t src_reg = __TPL1_A2D_SRC_TEXTURE_BASE<CHIP>({}).reg;
```

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38549>
2025-11-20 13:56:18 +00:00
Rob Clark
a9c64b737d freedreno: Collapse A6XXProps/A7XXProps
Now that they are the same thing, simplify the py code a bit.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:11 +00:00
Rob Clark
1574ddffb7 freedreno: Move magic/magic_raw out of props
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:11 +00:00
Rob Clark
43dd11ca6a freedreno: Flatten fd_dev_info props
Attempting to separate things out by gen is a bit arbitrary.  And gets
increasingly awkward as we introduce gen8 support, which builds on gen7
but changes some a6xx values.

Just move it all into a single 'props' struct.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:10 +00:00
Rob Clark
062e90f19b freedreno: Move RB_CCU_DBG_ECO_CNTL to raw_magic_regs
This only needs to be programmed by UMD for a7xx.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:09 +00:00
Rob Clark
231ff1c14d freedreno: Move UCHE_UNKNOWN_0E12 to raw_magic_regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:08 +00:00
Rob Clark
17a6456b84 freedreno: Move VPC_DBG_ECO_CNTL to raw_magic_regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:06 +00:00
Rob Clark
f9d3f6f95c freedreno: Move HLSQ_DBG_ECO_CNTL to raw_magic_regs
This reg only exists in a6xx.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:05 +00:00
Rob Clark
39cd8d6d24 freedreno: Move SP_DBG_ECO_CNTL to raw_magic_regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:03 +00:00
Rob Clark
1c8b9ad594 freedreno: Move PC_MODE_CNTL to raw_magic_regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:02 +00:00
Rob Clark
d18d75a236 freedreno: Move UCHE_CLIENT_PF to raw_magic_regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:16:01 +00:00
Rob Clark
bc4bdf58ec freedreno: Move SP_CHICKEN_BITS to raw_magic_regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:15:59 +00:00
Rob Clark
6d13e0a4cc freedreno: Move GRAS_DBG_ECO_CNTL to raw_magic_regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:15:58 +00:00
Rob Clark
8f0c920a52 freedreno: Move TPL1_DBG_ECO_CNTL to raw_magic_regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:15:57 +00:00
Rob Clark
e81defa52d freedreno: Move *_POWER_CNTL to raw_magic_regs
These two regs only exist in a6xx.  And only need a static value.  So
move them to raw_magic_regs and drop the fd_dev_info field and
corresponding driver code.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38515>
2025-11-20 13:15:57 +00:00
Michal Krol
31d69602d8 lavapipe: Bump maxGeometryInputComponents to 128.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
D3D11's minimum requirement is 32 GS input registers.

venus: Triage unexpected passes.

Reviewed-by: Brian Paul brian.paul@broadcom.com
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38519>
2025-11-20 11:16:02 +00:00
Pierre-Eric Pelloux-Prayer
bac9d17ead radeonsi/sqtt: clear out sqtt bo on resize
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If the resizing fails, we shouldn't use the destroyed bo anymore.

Fixes: 5794a86f19 ("radeonsi/sqtt: support sqtt buffer auto-resizing")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38529>
2025-11-20 10:21:47 +00:00
Pierre-Eric Pelloux-Prayer
9e76f5f2a2 radv: enable global BO list if vm_always_valid is supported
Reviewed-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/38529>
2025-11-20 10:21:47 +00:00
Pierre-Eric Pelloux-Prayer
cf4c55a20f ac/info: get vm_always_valid support through ac_linux_drm
For virtio it depends on the host support in virglrenderer.

Reviewed-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/38529>
2025-11-20 10:21:47 +00:00
Pierre-Eric Pelloux-Prayer
f57993b71d ac/virtio: fix incorrect NULL check
Reviewed-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/38529>
2025-11-20 10:21:47 +00:00
Pierre-Eric Pelloux-Prayer
51365585e2 ac/virtio: remove dead code
Reviewed-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/38529>
2025-11-20 10:21:47 +00:00
Samuel Pitoiset
3889695e9f aco/tests: switch to drm-shim
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38536>
2025-11-20 09:53:29 +00:00
Samuel Pitoiset
a729b0ebaa meson: require drm-shim for ACO tests
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38536>
2025-11-20 09:53:29 +00:00
Samuel Pitoiset
b4121a30df amd/drm-shim: export a function that allows to select a different device
To be used by ACO tests. Need to remove gnu_symbol_visibility for
exporting the symbol.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38536>
2025-11-20 09:53:29 +00:00
Lionel Landwerlin
07b7de35cc anv: Wa_18040903259 only applies to RCS when in GPGPU mode
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Sadly this probably won't change anything in terms of perf as the CCS
engine has a bunch of other restrictions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 243c01c703 ("anv/iris: implement Wa_18040903259")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38484>
2025-11-20 08:17:35 +00:00
Samuel Pitoiset
168a8d0b52 radv: fix RB+ for depth-only with unused attachments
When there are no color outputs in the rendering state, but color write
enable/write aren't masked out (which seems legal with
VK_EXT_dynamic_rendering_unused_attachments), the driver must emit
CB_DISABLE to disable CB rendering completely.

Otherwise, if there is also a depth/stencil attachment in the rendering
state, CB0 is always set to 32_R for RB+. That means, the pixel shader
would still export fragments but to the previously bound color
attachment.

VKCTS is missing coverage.

Fixes: 4580293ab2 ("radv: implement RB+ depth-only rendering for better perf")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14319
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38509>
2025-11-20 07:37:17 +00:00
Eric Engestrom
5db246a5ba perfetto: use the new upstream repo
The old one was abandoned without so much as a README note.

This will also allow using newer releases than 47; the current one being
53, but this MR doesn't address that, as it aims to be a simple no-op
change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38525>
2025-11-20 07:07:42 +00:00
Yiwei Zhang
829bd406c0 venus: fix racy semaphore feedback counter update
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Previously, we update the sfb dst slot upon vn_SignalSemaphore so that
vn_GetSemaphoreCounterValue can poll just the feedback slot itself.
However, that can race with pending sfb cmds that are going to update
the slot value, ending up with stuck sync progression.

This change fixes it by disallowing vn_SignalSemaphore to touch the sfb
dst slot. To ensure counter query being monotonic, vn_GetSemaphoreCounterValue
now takes the greater of signaled counter and the sfb counter read.

Test with dEQP-VK.synchronization* group:
- w/o this: stuck shows up within 2 min with 8 parallel deqp runs
- with this: no stuck for multiple full runs of the same

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14304
Fixes: 5c7e60362c ("venus: enable timeline semaphore feedback")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38516>
2025-11-20 06:29:16 +00:00
Faith Ekstrand
0bd5734349 panvk: Set primitive_index_override when prim ID is written by IDVS
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38504>
2025-11-20 06:09:16 +00:00
Faith Ekstrand
333ca9133a pan/genxml: Rename Primitive Index Override
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38504>
2025-11-20 06:09:16 +00:00
Faith Ekstrand
652a5f41bf pan/bi: Add support for writing gl_PrimitiveID from IDVS
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38504>
2025-11-20 06:09:16 +00:00
Faith Ekstrand
5700c87db6 pan/bi: Add some helpers an an info field for needing the extended FIFO
The logic here is a bit scattered around and is about to get more
complicated.  This adds a helper which better documents the interactions
as well as an info field to make the driver's life easier.

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38504>
2025-11-20 06:09:16 +00:00
Marek Olšák
9e339f4b32 nir: rename nir_lower_indirect_derefs -> nir_lower_indirect_derefs_to_if_else_trees
This describes better what it does.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38471>
2025-11-20 05:42:11 +00:00
Marek Olšák
22871fb8bd nir: for nir_shift_channels, fill undefined components with undef instead of .x
This potentially results in better code because we don't add def uses where
undef is allowed.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38468>
2025-11-20 04:26:55 +00:00
Marek Olšák
65837d8289 ac,radeonsi: remove gfx11 FW-based MCBP
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's too slow to be usable. User queues could replace it.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38338>
2025-11-20 03:31:47 +00:00
Sagar Ghuge
f0aad5bd7e anv: Convert indirect to direct dispatch
Saves unncessary PC and stall during encode phase.

Thanks to Felix for pointing out that CCS always needs a CS stall once
we add a pipe control, that will kill the performance for BVH
construction.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38513>
2025-11-20 03:11:55 +00:00
Felix DeGrood
15ffe6c524 anv/perfetto: include all pc reasons
Up to 4 reasons can be saved and displayed. Previously, we were
only displaying one reason for Perfetto.

Co-authored-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38500>
2025-11-20 02:53:53 +00:00
Connor Abbott
5ccbcf8a8b tu: Support softfloat64
DOOM Eternal uses fp64 without checking. Don't expose it, but as a
workaround lower the fp64 operations to software so that we don't choke
on them, similar to anv.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38088>
2025-11-20 02:14:50 +00:00
Connor Abbott
3b3954e2b8 util/glsl2spirv: Use better glslang flag for -Olib
--create-unlinked also creates entrypoints for the functions, and
obviates the need to create a dummy entrypoint. This is one step closer
to removing glsl2spirv and aligns us with other users of glslang.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38088>
2025-11-20 02:14:50 +00:00
Connor Abbott
9e3bc1f123 tu: Make softfloat shader compiled on demand
The vast majority of users will not need this, so do not pay the runtime
and memory cost of compiling the shader to NIR until it's needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38088>
2025-11-20 02:14:50 +00:00
Yonggang Luo
6400de124c docs: Update the minimal MSVC version requirements
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
As now __typeof__ is used in util/macros.h

The minimal required version is Visual Studio 17.9 or later, or cl.exe version 19.39.33428 or later.
According to https://learn.microsoft.com/en-us/cpp/c-language/typeof-c?view=msvc-170#requirements

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38534>
2025-11-20 01:16:17 +00:00
Yonggang Luo
ca364a9551 ci: update image tags for windows container
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38534>
2025-11-20 01:16:17 +00:00
Yonggang Luo
11a775539f ci: MSVC 2019 is not support anymore, remove it.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38534>
2025-11-20 01:16:17 +00:00
Yonggang Luo
84cce2a739 ci/microsoft: Downgrading WinFlexBison.win_flex_bison to version 2.5.24
This is achieved by provide version parameter to winget-cli

Fixes: 9592686ca0 ("ci/windows: Use winget to install packages and install Microsoft.WindowsWDK.10.0.26100")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13968

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38534>
2025-11-20 01:16:17 +00:00
Aitor Camacho
4b4061fa71 kk: Fix image to image copy
This change forces image->buffer->image copy path for pretty much
all the cases now.

Metal's image to image copy only allows same format and sample
count. Previously we were only taking the image->buffer->image
path for compressed formats. This just seemed to work, but we may
run into issues in the future. Metal does not report any
validation layer error.

Acked-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38459>
2025-11-20 00:57:29 +00:00
Faith Ekstrand
6d9f563960 spirv: Assume variable workgroup size unless it's set
This fixes an issue a bunch of different components were all working
around themselves where sometimes we don't have a workgroup size but
workgroup_size_variable is false.  This also fixes asahi_clc, which
didn't have the workaround and was assuming zero (but not variable!)
workgroup sizes everywhere.

LoLed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38538>
2025-11-20 00:02:42 +00:00
Mel Henning
80db8171de zink: Lock around screen_debug_marker_{begin,end}
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
vkQueueBeginDebugUtilsLabelEXT and vkQueueEndDebugUtilsLabelEXT
require queue to be externally synchronized, which means these functions
require the lock. Unfortunately, there's no guarantee that the debug
markers will be matched in the multithreaded case, but I suppose this is
better than crashing.

Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38414>
2025-11-19 23:43:45 +00:00
Mel Henning
018178842e zink: Lock queue_lock in zink_destroy_screen
Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38414>
2025-11-19 23:43:45 +00:00
Mel Henning
9acce36652 zink: Create one queue lock per device
We currently only create one queue per queue family on the device. The
device can be shared between multiple zink_screens, so having one lock
per screen can still lead to multiple locks per queue. Fix this by
allocating queue_lock along with the device.

This fixes an issue that was causing crashes with nvk+zink and
QtWebEngine with QTWEBENGINE_FORCE_USE_GBM=1 This can be reproduced by
resizing the window in either:

 * anki - https://apps.ankiweb.net/ or
 * Qt's simplebrowser example
   https://doc.qt.io/qt-6/qtwebengine-webenginewidgets-simplebrowser-example.html

which would then cause this dmesg error:

    nouveau 0000:01:00.0: anki[92007]: Failed to find syncobj (-> in): handle=40

along with a context loss.
With VK_LOADER_LAYERS_ENABLE=VK_LAYER_KHRONOS_validation we would additionally
get warnings like:

    Validation Error: [ UNASSIGNED-Threading-MultipleThreads-Write ] | MessageID = 0xa05b236e
    vkQueueSubmit(): THREADING ERROR : object of type VkQueue is simultaneously used in current thread 139824449189568 and thread 139823901816512
    Objects: 1
        [0] VkQueue 0x557a666783e0

Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38414>
2025-11-19 23:43:44 +00:00
Mel Henning
dff1b9d4e9 zink: Make screen->queue_lock a pointer
Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38414>
2025-11-19 23:43:44 +00:00
Mel Henning
f0dc8c0224 zink: Return zink_device in create_logical_device
Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38414>
2025-11-19 23:43:43 +00:00
Aitor Camacho
abc719f01f kk: Add multiViewport and EXT_shader_viewport_index_layer support
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38518>
2025-11-19 23:29:00 +00:00
Aitor Camacho
15f170e369 kk: Merge io type modifying passes into one
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38518>
2025-11-19 23:29:00 +00:00
Faith Ekstrand
cbd0c9eb3b panvk: Add a panvk_common_sysvals struct
For geometry shaders, we're going to need to compile various graphics
shaders down to compute shaders.  This means that they'll look like
compute shaders to much of the compile pipeline but ultimately get
executed as graphics shaders.  Most of the time, the compiler will just
happily take whatever offset you give and try to load the sysval from
there so you can load a graphics sysval from a compute shader just fine.
However, for the common ones, we switch on the shader stage and load
from a different offset for 3D vs. compute.  This breaks the moment you
have a compute shader that's going to actually load from a 3D sysval
space.

The solution here is to ensure that any common sysvals (currently just
the push uniforms address and the printf buffer) are at exactly the same
offset in both.  This is done by adding a panvk_common_sysvals struct,
some static asserts, and a bit of macro magic to keep things eurgonamic.
This also changes push uniform upload to just swap in the push uniform
address instead of writing it to the command buffer on every iteration.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38508>
2025-11-19 23:10:41 +00:00
Eric Engestrom
3ebabe9e43 docs/release-calendar: add 26.0 branchpoint and release candidates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38539>
2025-11-19 23:04:46 +00:00
Lionel Landwerlin
6fe2035065 anv: bump maxTessellationControlTotalOutputComponents
Our backend compiler explains the limits as :

   32 bytes for the patch header (tessellation factors)
  480 bytes for per-patch varyings (a varying component is 4 bytes and
            gl_MaxTessPatchComponents = 120)
16384 bytes for per-vertex varyings (a varying component is 4 bytes,
            gl_MaxPatchVertices = 32 and
            gl_MaxTessControlOutputComponents = 128)

In all that's :
  * 32 patches * 128 components (counting tessellation factors)
  * 32 vertices * 128 components

8192 total components.

I'm not sure why the limit was set so low, maybe leftover from older platforms?

Bump the limit to something like competition.

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/38523>
2025-11-19 22:44:54 +00:00
Eric R. Smith
65ba14519e pan: fix a bifrost disassembly assert failure
We were overflowing an array during bifrost disassembly. This was
only a problem if the user explicitly set an environment variable,
so unlikely to occur in casual use, and also only could be triggered
in very specific, dense code. But we still should get this right!

The specific CTS test that caused the assert is:

'dEQP-VK.graphicsfuzz.stable-quicksort-for-loop-with-injection'

with environment variable `BIFROST_MESA_DEBUG=shaders`. One of the
shaders has a clause with 6 constants (the maximum) and this overflowed
the array because we assume we always have an extra slot (used for
modifier processing).

Cc: mesa-stable
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38501>
2025-11-19 22:10:21 +00:00
Dmitry Baryshkov
7a3bfd1f79 rocket: drop file names from the generated file
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Having file names and dates in the generated file affects
reproducibility. Build systems (like OE) error out on the gen_header.py
output, because it can contain full paths. Drop file list from the
generated file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38528>
2025-11-19 16:27:32 +00:00
Dmitry Baryshkov
cdb6468c53 ethosu: drop file names from the generated file
Having file names and dates in the generated file affects
reproducibility. Build systems (like OE) error out on the gen_header.py
output, because it can contain full paths. Drop file list from the
generated file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38528>
2025-11-19 16:27:32 +00:00
Hyunjun Ko
9a9342e4aa anv/video: handling segmentations features for vp9 decoding
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/38418>
2025-11-19 15:54:47 +00:00
Hyunjun Ko
1479e1ef82 anv/video: rework for handling alternative quantizer for vp9 decoding.
including prep-work for handling segmentation features.

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/38418>
2025-11-19 15:54:47 +00:00
Danylo Piliaiev
8827123fef tu: Disable FLAG_WAIT_FOR_BR sync when CB is disabled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Skip TU_CMD_FLAG_WAIT_FOR_BR wait whenever concurrent binning is disabled.
Without CB there is nothing to wait for, so the sync only adds overhead,
and in workloads with thousands of tiny renderpasses the cumulative overhead
becomes too big.

In one real-world workload I saw the following timings:
- 99.20 ms without disabling TU_CMD_FLAG_WAIT_FOR_BR
- 65.15 ms with TU_CMD_FLAG_WAIT_FOR_BR disabled
- 64.92 ms with TU_DEBUG=nocb

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38378>
2025-11-19 14:35:33 +00:00
Danylo Piliaiev
9370bdc61e tu: Disable by default CB running alongside renderpasses
Disable concurrent binning by default so regular renderpasses have access
to all vertex fetch resources. When a renderpass can actually enable CB,
walk back to the CB barrier at submission time and re-enable CB for all
patchpoints between CB barrier and the renderpass.
Because we expect at most one or two renderpasses with CB per frame,
the number of patches stays small.

The reduced vertex fetch resources resulted in up to 10% performance loss
seen in targeted benchmark and in a few game captures.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38378>
2025-11-19 14:35:33 +00:00
Danylo Piliaiev
5d2b171886 tu/cs: Helpers to create a region that can be easily enabled/disabled
To mitigate CB perf impact we'd need to be able to eaily toggle CB
related IB regions.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38378>
2025-11-19 14:35:32 +00:00
Danylo Piliaiev
a7f63a5dbb tu: Do not WAIT_FOR_BR if concurrent binning is disabled
The sync emitted on TU_CMD_FLAG_WAIT_FOR_BR didn't disable CB
when CB was previously disabled for the renderpass, this resulted
in less resources vertex processing resources available for BR.

We can just not emit the sync instead, since next time CB is enabled
it will force the sync.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38378>
2025-11-19 14:35:32 +00:00
Danylo Piliaiev
f2fb8ad422 tu: Don't CONCURRENT_BIN_DISABLE when there is no depth image
We have to disable CB when lrz fast-clear is disabled, but if there
is no depth image at all, we can keep it enabled. This means that
RP without depth won't effectively be a CB barrier.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38378>
2025-11-19 14:35:32 +00:00
Danylo Piliaiev
ee4f375bfd tu: Fix CB barrier description
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38378>
2025-11-19 14:35:32 +00:00
Janne Grunau
1f144081ec meson: Add asahi to aarch64's auto-generated drivers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Since the Apple silicon M1 and M2 series of SoCs support only aarch64
split the lists for 'arm' and 'aarch64'.

Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38341>
2025-11-19 11:16:53 +00:00
Georg Lehmann
fa66b670d4 aco/optimizer: reduce max alu_opt_info stack operands to 4
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ALU instructions typically have a maximum of 3 operands, and even when combining
instructions, the peak count will not go above 4.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:43 +00:00
Georg Lehmann
4da74eed96 aco/tests: test packed fma opts
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:43 +00:00
Georg Lehmann
1f0293be0d aco/optimizer: use new helpers for packed fma
Foz-DB Navi48:
Totals from 374 (0.45% of 82419) affected shaders:
MaxWaves: 5476 -> 5480 (+0.07%)
Instrs: 2786653 -> 2784061 (-0.09%); split: -0.11%, +0.01%
CodeSize: 15163340 -> 15153460 (-0.07%); split: -0.08%, +0.01%
VGPRs: 46884 -> 46860 (-0.05%)
SpillVGPRs: 188 -> 189 (+0.53%)
Scratch: 3207936 -> 3208192 (+0.01%)
Latency: 27352681 -> 27350006 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 5933554 -> 5932632 (-0.02%); split: -0.02%, +0.01%
VClause: 62355 -> 62359 (+0.01%); split: -0.03%, +0.04%
Copies: 290221 -> 289786 (-0.15%); split: -0.21%, +0.06%
Branches: 108566 -> 108569 (+0.00%); split: -0.01%, +0.01%
PreVGPRs: 40172 -> 40157 (-0.04%)
VALU: 1355753 -> 1353329 (-0.18%); split: -0.19%, +0.01%
SALU: 524836 -> 524831 (-0.00%); split: -0.01%, +0.01%
VMEM: 90948 -> 90950 (+0.00%)
VOPD: 10489 -> 10490 (+0.01%); split: +0.98%, -0.97%

Foz-DB Navi21:
Totals from 374 (0.45% of 82387) affected shaders:
MaxWaves: 4339 -> 4348 (+0.21%)
Instrs: 2255741 -> 2253554 (-0.10%); split: -0.10%, +0.00%
CodeSize: 12755276 -> 12744184 (-0.09%); split: -0.09%, +0.01%
VGPRs: 40376 -> 40352 (-0.06%)
Latency: 27357012 -> 27348737 (-0.03%); split: -0.07%, +0.04%
InvThroughput: 7213578 -> 7211136 (-0.03%); split: -0.07%, +0.04%
VClause: 62154 -> 62172 (+0.03%); split: -0.01%, +0.04%
Copies: 268204 -> 268048 (-0.06%); split: -0.22%, +0.16%
Branches: 107067 -> 107066 (-0.00%)
PreVGPRs: 37615 -> 37599 (-0.04%)
VALU: 1423326 -> 1421187 (-0.15%); split: -0.16%, +0.01%
SALU: 383388 -> 383390 (+0.00%); split: -0.00%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:43 +00:00
Georg Lehmann
fec10ea3ea aco/optimizer: use new helpers for add16 opts
Foz-DB Navi48:
Totals from 164 (0.20% of 82419) affected shaders:
Instrs: 145304 -> 145335 (+0.02%); split: -0.00%, +0.02%
CodeSize: 794156 -> 794280 (+0.02%); split: -0.00%, +0.02%
Latency: 1884349 -> 1884227 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 350403 -> 350393 (-0.00%)

Foz-DB Navi21:
Totals from 164 (0.20% of 82387) affected shaders:
Instrs: 117416 -> 117414 (-0.00%)
CodeSize: 673328 -> 673312 (-0.00%)
Latency: 1896952 -> 1897094 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 638536 -> 638556 (+0.00%); split: -0.01%, +0.01%
Copies: 14579 -> 14577 (-0.01%)
VALU: 65895 -> 65893 (-0.00%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
e8f5b9374b aco/optimizer: use new helpers to optimize mul(b2f(a), b)
Foz-DB Navi48:
Totals from 979 (1.19% of 82419) affected shaders:
Instrs: 3630560 -> 3629463 (-0.03%); split: -0.03%, +0.00%
CodeSize: 19154176 -> 19147124 (-0.04%); split: -0.04%, +0.00%
Latency: 17700546 -> 17699505 (-0.01%); split: -0.01%, +0.01%
InvThroughput: 3143808 -> 3143254 (-0.02%); split: -0.02%, +0.01%
SClause: 76410 -> 76405 (-0.01%); split: -0.01%, +0.00%
Copies: 256544 -> 256554 (+0.00%); split: -0.02%, +0.02%
PreVGPRs: 40868 -> 40835 (-0.08%)
VALU: 2003291 -> 2002466 (-0.04%); split: -0.04%, +0.00%
SALU: 514000 -> 514006 (+0.00%)
VOPD: 3254 -> 3256 (+0.06%); split: +0.12%, -0.06%

Foz-DB Navi21:
Totals from 926 (1.12% of 82387) affected shaders:
MaxWaves: 21538 -> 21542 (+0.02%)
Instrs: 2984216 -> 2983187 (-0.03%); split: -0.04%, +0.00%
CodeSize: 16104112 -> 16097272 (-0.04%); split: -0.05%, +0.00%
VGPRs: 46864 -> 46848 (-0.03%)
Latency: 15678064 -> 15677099 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 3779550 -> 3778230 (-0.03%); split: -0.04%, +0.01%
VClause: 81590 -> 81598 (+0.01%)
SClause: 70753 -> 70751 (-0.00%); split: -0.01%, +0.00%
Copies: 240446 -> 240466 (+0.01%); split: -0.01%, +0.02%
PreSGPRs: 51121 -> 51062 (-0.12%)
PreVGPRs: 38538 -> 38505 (-0.09%)
VALU: 1978847 -> 1977777 (-0.05%); split: -0.06%, +0.00%
SALU: 439184 -> 439212 (+0.01%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
f0e24284f5 aco/optimizer: create max3/min3/med3 with salu min/max
Foz-DB Navi48:
Totals from 175 (0.21% of 82419) affected shaders:
Instrs: 465863 -> 465260 (-0.13%); split: -0.13%, +0.00%
CodeSize: 2362264 -> 2360744 (-0.06%); split: -0.07%, +0.00%
Latency: 1548501 -> 1548371 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 227683 -> 227630 (-0.02%); split: -0.08%, +0.06%
Copies: 33646 -> 33648 (+0.01%)
PreSGPRs: 9996 -> 10004 (+0.08%)
VALU: 175836 -> 175850 (+0.01%)
SALU: 122094 -> 121621 (-0.39%); split: -0.39%, +0.00%

Foz-DB Navi21:
Totals from 1 (0.00% of 82387) affected shaders:
InvThroughput: 74 -> 76 (+2.70%)
VALU: 57 -> 58 (+1.75%)
SALU: 61 -> 60 (-1.64%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
d21734e024 aco/optimizer: use new helper functions to create med3
Foz-DB Navi48:
Totals from 9659 (11.72% of 82419) affected shaders:
Instrs: 17301747 -> 17301735 (-0.00%); split: -0.00%, +0.00%
CodeSize: 93378108 -> 93378184 (+0.00%); split: -0.00%, +0.00%
Latency: 145441784 -> 145441791 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 25768777 -> 25768778 (+0.00%)
Copies: 1370123 -> 1370124 (+0.00%)
VALU: 9705655 -> 9705656 (+0.00%)

Foz-DB Navi21:
Totals from 22 (0.03% of 82387) affected shaders:
Instrs: 27433 -> 27406 (-0.10%)
CodeSize: 146440 -> 146352 (-0.06%); split: -0.06%, +0.00%
Latency: 305857 -> 305806 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 63634 -> 63580 (-0.08%)
VALU: 19109 -> 19082 (-0.14%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
6fc250fc06 aco/optimizer: use new helpers for min3/max3/minmax/maxmin
Foz-DB Navi48:
Totals from 10453 (12.68% of 82419) affected shaders:
Instrs: 18676282 -> 18675798 (-0.00%); split: -0.00%, +0.00%
CodeSize: 100603268 -> 100603508 (+0.00%); split: -0.00%, +0.00%
Latency: 157036823 -> 157031708 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 28049331 -> 28048776 (-0.00%); split: -0.00%, +0.00%
Copies: 1452464 -> 1452503 (+0.00%); split: -0.00%, +0.00%
PreVGPRs: 458422 -> 458413 (-0.00%); split: -0.00%, +0.00%
VALU: 10429583 -> 10429353 (-0.00%); split: -0.00%, +0.00%
SALU: 2628403 -> 2628416 (+0.00%); split: -0.00%, +0.00%
VOPD: 21738 -> 21744 (+0.03%); split: +0.04%, -0.01%

Foz-DB Navi21:
Totals from 889 (1.08% of 82387) affected shaders:
MaxWaves: 15641 -> 15639 (-0.01%); split: +0.01%, -0.03%
Instrs: 2505527 -> 2505489 (-0.00%); split: -0.01%, +0.01%
CodeSize: 13975300 -> 13976516 (+0.01%); split: -0.00%, +0.01%
VGPRs: 65584 -> 65576 (-0.01%); split: -0.02%, +0.01%
Latency: 37135606 -> 37132577 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 10937032 -> 10935704 (-0.01%); split: -0.01%, +0.00%
VClause: 63136 -> 63140 (+0.01%); split: -0.01%, +0.01%
Copies: 256011 -> 256073 (+0.02%); split: -0.01%, +0.03%
PreSGPRs: 51804 -> 51809 (+0.01%)
PreVGPRs: 57905 -> 57890 (-0.03%); split: -0.03%, +0.00%
VALU: 1593523 -> 1593339 (-0.01%); split: -0.02%, +0.00%
SALU: 425116 -> 425134 (+0.00%); split: -0.00%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
5d02eae052 aco/optimizer: add less agressive pattern matching option
Still a bit more aggresive than the classic is_used_once,
but it should still prevent most regressions for patterns
that use min/max/mul as outer instruction.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
2c05aa34aa aco/optimizer: create fma with s_mul_f32/f16
Foz-DB Navi48:
Totals from 14473 (17.56% of 82419) affected shaders:
MaxWaves: 397738 -> 397720 (-0.00%); split: +0.00%, -0.01%
Instrs: 22133626 -> 21984649 (-0.67%); split: -0.68%, +0.01%
CodeSize: 117440104 -> 117111440 (-0.28%); split: -0.30%, +0.02%
VGPRs: 825820 -> 825928 (+0.01%); split: -0.01%, +0.02%
SpillSGPRs: 15496 -> 15512 (+0.10%); split: -0.19%, +0.29%
Latency: 152141755 -> 152058676 (-0.05%); split: -0.07%, +0.02%
InvThroughput: 25715152 -> 25681160 (-0.13%); split: -0.14%, +0.01%
VClause: 402752 -> 400798 (-0.49%); split: -0.53%, +0.04%
SClause: 587448 -> 586772 (-0.12%); split: -0.19%, +0.07%
Copies: 1650891 -> 1661495 (+0.64%); split: -0.14%, +0.78%
Branches: 541341 -> 541334 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 748235 -> 748332 (+0.01%); split: -0.03%, +0.04%
VALU: 11754090 -> 11755396 (+0.01%); split: -0.01%, +0.02%
SALU: 3659133 -> 3536435 (-3.35%); split: -3.36%, +0.01%
VOPD: 17201 -> 17083 (-0.69%); split: +0.05%, -0.74%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
5abc961514 aco/optimizer: use new helpers to create fma
Foz-DB Navi48:
Totals from 25949 (31.48% of 82419) affected shaders:
Instrs: 30904250 -> 30904153 (-0.00%); split: -0.00%, +0.00%
CodeSize: 164623100 -> 164604652 (-0.01%); split: -0.01%, +0.00%
Latency: 209402611 -> 209402684 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 36622293 -> 36622236 (-0.00%); split: -0.00%, +0.00%
Copies: 2252080 -> 2251998 (-0.00%); split: -0.00%, +0.00%
VALU: 16831507 -> 16831382 (-0.00%); split: -0.00%, +0.00%
VOPD: 28252 -> 28295 (+0.15%)

Foz-DB Navi21:
Totals from 56269 (68.30% of 82387) affected shaders:
Instrs: 43751754 -> 43746463 (-0.01%); split: -0.01%, +0.00%
CodeSize: 233615096 -> 233576912 (-0.02%); split: -0.02%, +0.00%
VGPRs: 2445528 -> 2445520 (-0.00%)
Latency: 276776920 -> 276761183 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 66406450 -> 66402214 (-0.01%); split: -0.01%, +0.00%
VClause: 902951 -> 902947 (-0.00%)
Copies: 3926260 -> 3926289 (+0.00%); split: -0.01%, +0.01%
VALU: 26924056 -> 26918783 (-0.02%); split: -0.02%, +0.00%
SALU: 6938335 -> 6938321 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
1e2aea7461 aco/optimizer: add new helper functions for combining two instructions
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
87e168f223 aco/optimizer: make label_mad more generic
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
53f5e447db aco/optimizer: add extract_float helper
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Georg Lehmann
7eccf5c745 aco/optimizer: refactor insert
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38150>
2025-11-19 10:51:42 +00:00
Lionel Landwerlin
049adad4f4 anv: split non binding related intrinsics from apply_layout
Trying to cut down apply_pipeline_layout a bit and also allowing some
reuse for a new extension.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38495>
2025-11-19 10:27:27 +00:00
Erik Faye-Lund
138fbb1c6c mesa: introduce and use _mesa_has_texture_buffer_range
This reduces some code-repetition, and makes it a bit easier to reason
about what this actually tests for.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
2025-11-19 09:10:19 +00:00
Erik Faye-Lund
ba3a0c580f zink: only expose rgba buffer-textures
Unlike textures, we can't easily do format-conversion of the data
before, because the source is a buffer object and not a texture object.

But we already have a hammer for this in Mesa, which means we'll drop
the ARB_texture_buffer_object extension support, but only for the OpenGL
compatibility profile. We still get GL 4.6, both core and compatibility.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
2025-11-19 09:10:19 +00:00
Erik Faye-Lund
73b1ea4491 panfrost: only expose rgba buffer-textures
Unlike textures, we can't easily do format-conversion of the data
before, because the source is a buffer object and not a texture object.

But we already have a hammer for this in Mesa, which means we'll drop
the ARB_texture_buffer_object extension support, but only for the OpenGL
compatibility profile. We still get GL 3.1 exposed.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
2025-11-19 09:10:19 +00:00
Erik Faye-Lund
08b5876c37 v3d: only expose rgba buffer-textures
Unlike textures, we can't easily do format-conversion of the data
before, because the source is a buffer object and not a texture object.

But we already have a hammer for this in Mesa, which means we'll drop
the ARB_texture_buffer_object extension support, but only for the OpenGL
compatibility profile. We still get GL 3.2 exposed.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
2025-11-19 09:10:18 +00:00
Erik Faye-Lund
70f1603125 mesa/main: do not check for ARB_texture_buffer_object for GL 3.1
While OpenGL 3.1 does require texture buffer objects, the ARB spec for
this requires support for texture buffers with alpha, luminance,
luminance-alpha and intensity formats in addition to RGBA formats. The
version of texture buffer objects that ended up in the OpenGL spec (even
in the compatibility spec) does not require these formats.

But, we don't even need to check this, because this is already included
in the GLSL 1.40 requirement that's also checked. So this shouldn't make
us expose GL 3.1 in cases where it isn't supported in the first place.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
2025-11-19 09:10:17 +00:00
Erik Faye-Lund
3039899d5b mesa/main: correct error message
This code-path hasn't been solely about ARB_texture_buffer_object for a
long time, let's make the error message more generic to not confuse
people. While we're at it, remove the comment that brings the same
confusion.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
2025-11-19 09:10:15 +00:00
Erik Faye-Lund
6f2b8c3f61 mesa/st: do not enable EXT_texture_buffer_object with rgba only
GL_EXT_texture_buffer_object requires support for alpha, luminance,
luminance-alpha and intensity formats. If we can't support those, we
can't enable the extension.

Fixes: 45ca7798dc ("glsl: handle interactions between EXT_gpu_shader4 and texture extensions")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
2025-11-19 09:10:15 +00:00
Erik Faye-Lund
9d5e0c1ad2 mesa/main: correct formatquery error-handling
Most of the time, we remember to check for both extensions. But in one
case, it seems we forgot the GLES extension. Whoops.

Let's switch to a helper here, so we don't have to repeat the logic over
and over again.

Fixes: b4c0c514b1 ("mesa: add OES_texture_buffer and EXT_texture_buffer support")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38162>
2025-11-19 09:10:14 +00:00
Samuel Pitoiset
7c9e5b4c1c radv: remove unreachable code for prefetch in radv_cs_emit_cp_dma()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
CP DMA prefetches are implemented with a separate function.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38449>
2025-11-19 08:03:38 +00:00
Samuel Pitoiset
60d438e517 radv: always use MALL for CP DMA operations on GFX12
CP DMA isn't coherent with L2 on GFX12, but {SRC,DST}_ADDR_TC_L2 means
MALL.

Only small buffers are using copy/fill CP DMA operations, so this
shouldn't have much effect.

Found by inspection.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38449>
2025-11-19 08:03:38 +00:00
Samuel Pitoiset
b2a13ce92c radv/tests: require drm-shim and use it instead of RADV_FORCE_FAMILY
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38507>
2025-11-19 07:11:05 +00:00
Samuel Pitoiset
8fd91a1ee9 ci: build drm-shim for RADV tests in debian-vulkan
RADV tests will require AMDGPU drm-shim.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38507>
2025-11-19 07:11:05 +00:00
David Rosca
1f83e73145 radeonsi/vcn: Reduce allocated size for pre-encode recon pics
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We use 4x downscale for pre-encode, so we don't need full size
pre-encode reconstructed pictures.

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38303>
2025-11-19 05:06:33 +00:00
Yiwei Zhang
a49b7adad8 venus: add error log coverage for virtgpu backend
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Make life easier for ci debug, remote debug, and any kind of bug report
inspection. Long need to add this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38443>
2025-11-19 04:28:49 +00:00
Yiwei Zhang
0afc408cb9 venus: properly fix the blob mem mapping size
There's a single underlying bo mapping shared by the initial alloc here
and the later import of the same. The mapping size has to be initialized
with the real size of the created blob resource, since the app can query
the exported native handle size for re-import. e.g. lseek dma-buf size

Similar to virtgpu_bo_create_from_device_memory, the app can do multiple
imports with different sizes for suballocation. So on the initial
import, the mapping size has to be initialized with the real size of the
backing blob resource.

Backport-to: 25.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38443>
2025-11-19 04:28:49 +00:00
Yiwei Zhang
c259ea24ee venus: avoid re-imported dma-buf to have a larger map size
If the allocation originates from the same instance, the tracker map
size follows the allocationSize. After export and re-import, mapping the
whole dma-buf can exceed the original map size. This change backs out
the offending changes.

Test: dEQP-VK.api.external.memory.*.suballocated.host_visible.*
Fixes: 442f242a49 ("venus: requests whole blob mem size for non-dedicated import")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38443>
2025-11-19 04:28:48 +00:00
Qiang Yu
a6bf07e7c2 dri: avoid sending too many present reuqests when app start or pause
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Found when running glxgears with vblank enabled and modesetting DDX.
glxgears will send many present requests at the beginning, but most
of them get complete event with skip mode. This problem causes
glxgears report ~75fps on a 60Hz monitor at the first record.
This change reduces it to 60fps.

Vulkan side X11 WSI does not have this problem as it will wait first
present request's complete event before send second present request.

How the problem happens:
1. client send present request 1 with target msc = 1
2. server side current msc is 100, so it find request 1 is
   outdated and queue it for vblank with target msc = 101
3. client send present request 2 with target msc = 2
4. server side current msc is still 100, so it find request 2
   is outdated and queue it with target msc = 101, and find
   request 1 will be overridden, so mark it as skipped and
   send idle notify for it.
5. client get the idle notify for request 1, and reuse the
   request 1 buffer for new back buffer to send present
   request 3.
6. this keeps going until client send present request N, and
   server finally process the vblank queue before 101 msc
   arrive and send complete event for all these requests back
   to client.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38178>
2025-11-19 10:01:50 +08:00
Felix DeGrood
198537039a anv/rt: reduce writes to block_incr_and_start_prim
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36937>
2025-11-18 22:41:21 +00:00
Felix DeGrood
768bb1c7a3 anv/rt: multithread writing of invalid leaves
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36937>
2025-11-18 22:41:21 +00:00
Felix DeGrood
09c218e8aa anv/rt: fully restore code to write instance_count
Conformance tests and games still pass without this code, but
spec says we need it:
  https://registry.khronos.org/vulkan/specs/latest/html/
  vkspec.html#vkCmdCopyAccelerationStructureToMemoryKHR

This is potentially expensive code. There may be a future
opportunity to optimize this out. Need to research.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36937>
2025-11-18 22:41:21 +00:00
Felix DeGrood
cff9d82c66 anv/rt: rewrite encode.comp for better performance
Rewrite ANV's encode.comp, the final intel-specific raytracing shader
used for bvh-build. Performance is greatly improved for this shader
by adding the following features:

1) Find children early. All threads speculative find their children
before they know if they are valid (not collapsed). This makes more
work overall but reduces latency for propagating valid nodes from
root to leaves. Nodes find out if they are valid faster if all nodes
know who their children are upfront.

2) Hoist code used for intra-thread communication. Communicate
to children as soon as possible, minimizing wait time for later
threads.

3) Multithread encoding. Still launching 1 simd lane per node, same
as before, but encoding of nodes and children are parallelized across
multiple lanes. This works well because most nodes are collapsed
without any encode work required.

4) Hash globalID. Reduce chance that the thread processing a node
will also need to process node's children, which was found to
degrade performance, particularly for root node processing.

Measured RT game speedups:
 * Hitman3 +48%
 * F1'22 +10%
 * Indiana Jones +8%
 * GravityMark +2.5%

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36937>
2025-11-18 22:41:20 +00:00
Olivia Lee
443ddace70 panvk/csf: merge v10 and v11 paths in issue_fragment_jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is quite a lot of logic to duplicate verbatim just to deal with the
slightly different synchronization.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38496>
2025-11-18 21:33:40 +00:00
Olivia Lee
5c6c4cbebd panvk/csf: factor out cs_match_iter_sb helper macro
This simplifies cases where we need to match on all of the possible
iter_sb values, which occurs frequently.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38496>
2025-11-18 21:33:40 +00:00
Ryan Mckeever
298ad17b81 panfrost: enable EXT_shader_pixel_local_storage
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Ryan Mckeever
c15a43cce0 pan/lib: prepare for pixel local storage support
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Ryan Mckeever
dfddcae916 pan/bi: introduce EXT_shader_pixel_local_storage support to compiler
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Ryan Mckeever
cc12bac4f8 gallium, mesa: keep track of pixel local storage state
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Ryan Mckeever
7f7c4ebbba glsl, mesa: add EXT_shader_pixel_local_storage extension
This commit also checks for and issues errors for the following:

INVALID_OPERATION is generated if the application attempts enable pixel
local storage while the value of SAMPLE_BUFFERS is one.

INVALID_OPERATION is generated if the application attempts to enable pixel
local storage while the current draw framebuffer is a user-defined frame-
buffer object and has an image attached to any color attachment other than
color attachment zero.

INVALID_OPERATION is generated if the application attempts to enable pixel
local storage while the current draw framebuffer is a user-defined frame-
buffer and the draw buffer for any color output other than color
output zero is not NONE.

INVALID_FRAMEBUFFER_OPERATION is generated if the application attempts to
enable pixel local storage while the current draw framebuffer is
incomplete.

INVALID_OPERATION is generated if pixel local storage is disabled and the
application attempts to issue a rendering command while a program object
that accesses pixel local storage is bound.

INVALID_OPERATION is generated if pixel local storage is enabled and the
application attempts to bind a new draw framebuffer, delete the currently
bound draw framebuffer, change color buffer selection via DrawBuffers, or
modify any attachment of the currently bound draw framebuffer including
their underlying storage.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Ryan Mckeever
04d3da19c6 glapi: add EXT_shader_pixel_local_storage extension
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Ryan Mckeever
05795a1bd2 compiler/glsl: replace tabs with spaces
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Boris Brezillon
98bd0850da nir: Add a pass to downgrade inout PLS vars to {in,out} only ones
Shaders might declare PLS vars as inout but might just use them as in
or out but not both. This pass detects those cases and adjusts the
variable/deref modes accordingly.

This pass should be called before nir_lower_io_vars_to_temporaries(),
otherwise the copy_derefs will be inserted, turning unused variables
into used ones.

This should ideally be called after DCE to make sure we don't leave
PLS inout variables behind.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Boris Brezillon
2cc254d8cb nir: Teach nir_lower_io_vars_to_temporaries() about PLS vars
Pixel local storage variables are like fragment shader outputs that
might be read, written or both. Teach nir_lower_io_vars_to_temporaries()
about these variables so they can be lowered along with the regular
fragment outputs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:43 +00:00
Boris Brezillon
ea4d4d2a77 nir: Prepare nir_lower_io_vars_to_temporaries() for optional PLS lowering
Rather than adding another boolean to optionally lower PLS vars, pass
the types we want to lowers through a nir_variable_mode bitmask.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:42 +00:00
Eric R. Smith
ab867cc3cd nir: add intrinsics for pixel local storage
The pixel local storage load and store instructions keep track of the
format of the pixel local storage variables. This allows drivers to insert
the appropriate conversions on load/store.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:42 +00:00
Ryan Mckeever
75263ce911 nir: add support for pixel_local_storage variables
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37110>
2025-11-18 20:25:42 +00:00
Allen Ballway
bfee8d3a14 android: support longer property names
Property names no longer have a maximum length in Android 26+,
support longer names to fix truncated property names.

Signed-off-by: Allen Ballway <ballway@google.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13043
Test: vendor.mesa.custom.border.colors.without.format is untruncated
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38453>
2025-11-18 19:50:00 +00:00
Anna Maniscalco
9a72696e02 nir/lower_tex: copy is_sparse when lowering txd
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38497>
2025-11-18 19:03:36 +00:00
Natalie Vock
1243d575a5 aco/insert_nops: Consider s_setpc target susceptible to VALUReadSGPRHazard
Some GPU hangs witnessed in the wild on RDNA4 in Control and Arc Raiders
seem to point towards closest-hit shaders reading a stale value for the
SGPR pair containing the currently-executing shader's address.

This SGPR pair was read by VALU in the preceding traversal shader,
making it susceptible to VALUReadSGPRHazard. Inserting
VALUReadSGPRHazard mitigations before accessing the s_setpc target seems
to fix the hang. We don't have conclusive proof that this is hazardous,
but given that all signs point towards it and we have a reasonably
simple workaround, let's roll with this for now to mitigate the hangs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38290>
2025-11-18 18:43:00 +00:00
Samuel Pitoiset
9f512d8f93 radv: advertise VK_EXT_custom_resolve
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38442>
2025-11-18 17:03:13 +00:00
Samuel Pitoiset
91469bcc30 radv: implement VK_EXT_custom_resolve
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38442>
2025-11-18 17:03:13 +00:00
Samuel Pitoiset
d700205a9d vulkan: add support for vkCustomResolveCreateInfoEXT
This basically remaps color attachment formats for the resolve
operation.

Co-Authored-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38442>
2025-11-18 17:03:13 +00:00
Karol Herbst
d46be8fbf2 rusticl/kernel: Do not run kernels with a workgroup size beyond work_dim
When no workgroup size is specified we try to run with the most optimal one
possible. However we didn't take into account that we shouldn't run a
workgroup of higher dimensionality than requested by the application.

Fixes: 376d1e6667 ("rusticl: implement cl_khr_suggested_local_work_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38375>
2025-11-18 15:42:43 +00:00
Karol Herbst
810dca450c rusticl/kernel: fix clGetKernelSuggestedLocalWorkSizeKHR implementation
There were two issues:
1. The global_work_offset parameter is optional but we errored on NULL
2. We didn't return the reqd_work_group_size when set on the kernel.

Fixes: 376d1e6667 ("rusticl: implement cl_khr_suggested_local_work_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38375>
2025-11-18 15:42:43 +00:00
David Rosca
2587a565d8 radeonsi/vcn: Remove unnecessary vars for AV1 encode
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These are just copied from picture desc.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:13 +00:00
David Rosca
698de5360c radeonsi/vcn: Cleanup AV1 screen content tools coding
There is no disable_screen_content_tools in AV1 spec, instead this
should be seq_choose_screen_content_tools. But we don't need that either
as we keep the effective value in force_screen_content_tools.
Same for seq_choose_integer_mv and force_integer_mv.
Also stop overriding these values and instead fix frame header coding
to work with all combinations.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:13 +00:00
David Rosca
6050bda231 radeonsi/uvd_enc: Cleanup HEVC encode deblock params handling
This should consider values from PPS and overrides from slice header
if enabled.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:13 +00:00
David Rosca
153ff5dd8a radeonsi/vcn: Cleanup HEVC encode deblock params handling
This should consider values from PPS and overrides from slice header
if enabled.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:13 +00:00
David Rosca
10e274af62 radeonsi/video: Make helper radeon_bitstream functions static
Those are now only used in radeon_bitstream.c

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
094e20f134 radeonsi/vcn: Use radeon_bitstream functions to code headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
628694c16c radeonsi/vce: Use radeon_bitstream functions to code headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
332ec608ad radeonsi/uvd_enc: Use radeon_bitstream functions to code headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
1f51401dae radeonsi/video: Add VPS/SPS/PPS and sequence header functions to radeon_bitstream
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
David Rosca
c5f898edb4 frontends/va: Add AV1 encode high_bitdepth flag
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38260>
2025-11-18 09:28:12 +00:00
Christoph Pillmayer
617f0562bb pan: Use bitset instead of bool array in bi_find_loop_blocks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38393>
2025-11-18 09:02:58 +00:00
Christoph Pillmayer
6535a3b6b3 pan: Fix bi_find_loop_blocks
Before this commit, nested loops aren't counted correctly:
   -------------
   V           |
-> A --> B --> C ->
         ^     |
         -------
A is both predecessor and successor of B but A isn't in B's loop.

Instead a block B is in loop header H's block if H is the successor
of B and H dominates B.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38393>
2025-11-18 09:02:56 +00:00
Christoph Pillmayer
5ae1b68cb0 pan: Adapt calc_dominance from nir to bi
Mostly "s/nir_block/bi_block/g" and some small fixups.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38393>
2025-11-18 09:02:55 +00:00
Christoph Pillmayer
dd01573207 pan: Copy nir_dominance.c to bi_dominance.c
Next commit will actually convert it to be bifrost.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38393>
2025-11-18 09:02:52 +00:00
Christoph Pillmayer
ca9c9957e2 pan: Avoid some redundant SSA spills
Instead of inserting the spill instruction before the instruction that
caused the spill, instead insert it either right after the definition
or at the end of the block that contains the definition.
This helps reduce code size and also moves STOREs outside of loops on
average.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38238>
2025-11-18 08:42:23 +00:00
Valentine Burley
45c9c61ad3 anv/ci: Run vkd3d job in parallel
Running vkd3d in parallel appears to be stable now on ANV.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38491>
2025-11-18 07:41:42 +00:00
Timothy Arceri
b0047be0c2 mesa: fix _mesa_update_texture_matrices()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
_math_matrix_is_dirty() should only be used to decide if we need to
run _math_matrix_analyse(). We already decided that we had a new
texture matrix when we called _mesa_update_texture_matrices() so
we need to set _TexMatEnabled correctly otherwise we might
incorrectly return _NEW_FF_VERT_PROGRAM | _NEW_FF_FRAG_PROGRAM in
the following if-statement.

Fixes: ec978e002f ("mesa: only update fixed-func programs on texture matrix enablement changes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14286
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38473>
2025-11-18 01:31:12 +00:00
Dave Airlie
ad25196d35 radv: add support for cooperative matrix reductions.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This add support to the lowering the reduction operations.

Thanks to Georg Lehmann for a lot of the ideas and optimising in
this.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:59 +00:00
Georg Lehmann
3a175b54a4 aco,nir: support subdword v_permlane_b16
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:59 +00:00
Dave Airlie
a4a0d28ea6 spirv: add support for cooperative matrix reduction operation
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:59 +00:00
Dave Airlie
438245404c nir: add support for cooperative matrix reduction operations.
This adds some new call operations to handle various parts of the
reductions.

cmat_reduce: is the initial toplevel operation from SPIR-V
this is used after lowering for row/col operation on single hw
supported matrix sizes. The spir-v operation is lowered into
multiple of these on flex dimensions, but also can be lowered into
others.

cmat_reduce_finish:
after multiple reduction operations on a flexible dimension matrix,
there is often subsequent operations on the output matrices to
finish the operation.

cmat_reduce_2x2:
this takes 4 input matrices, and 1 dst to do a 2x2 reduction op.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:59 +00:00
Dave Airlie
9385d94bc9 nir: add a flag for functions that are used in cmat calls.
With coopmat2 a bunch of functions need a lot of lowering passes
to happen before they can be lowered, so mark them as to be lowered
later.

Drivers needing these should call the nir_remove_non_cmat_call_entrypoints
where they remove entrypoints now, and call the original nir_remove_non_entrypoints
after lowering coopmat2.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:58 +00:00
Dave Airlie
26eaba935d nir: add a cmat call instruction type.
This adds a new instruction type to handle cooperative matrix calls.

This clones the call instr, drops callee, and adds a single metadata
slot and a call operation (dummy only for now).

(Not NACKed by Alyssa)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38389>
2025-11-17 23:33:58 +00:00
Christian Gmeiner
6ba0797a06 etnaviv: Improve flatshading
If the shader has flat varyings but API level flatshade is disabled, we
need to switch to flat shading in PA.CONFIG to ensure proper interpolation.

Passes dEQP-GLES3.functional.rasterization.flatshading.* on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Daniel Lang <dalang@gmx.at>
Reviewed-by: Daniel Lang <dalang@gmx.at>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36404>
2025-11-17 23:18:49 +00:00
Aitor Camacho
3e9cbea34e kk: Fill driverUUID
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38420>
2025-11-17 22:50:08 +00:00
Aitor Camacho
38fe7b7352 util: Add build_id for macOS
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38420>
2025-11-17 22:50:07 +00:00
Aitor Camacho
a77e09eaeb util: Introduce HAVE_BUILD_ID for build id utils
Build utilities to retrieve the build id are now exposed
through the new HAVE_BUILD_ID instead of HAVE_DL_ITERATE_PHDR
since this will allow adding support for platforms that do
not support HAVE_DL_ITERATE_PHDR

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38420>
2025-11-17 22:50:07 +00:00
Dylan Baker
9d2c8e5b98 bin/gen_release_notes: Remove duplicate bug entires
A multiple commits may reference the same bug (for example, a commit
is only a partial fix). We don't want that to show up in our fixed bug
log.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38492>
2025-11-17 22:45:13 +00:00
Dylan Baker
cda114e0e4 bin/gen_release_notes: Remove cast that does nothing
Without an assignment this cast is dead code.

Cast's in python work like:
```python
from typing import cast
x = ['a', 'b', 'c']
x = cast(list[str | int], x)
x.append(5)
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38492>
2025-11-17 22:45:13 +00:00
Dylan Baker
9b7a676fa6 docs/relnotes/25.3.0: Escape some rst language constructs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
That are from the gitlog, which we don't currently escape.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:43 +00:00
Dylan Baker
4a524a6de6 docs/relnotes/25.3.0: Remove duplicate bug fixes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:43 +00:00
Dylan Baker
b1640d027f docs: update calendar for 25.3.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:42 +00:00
Dylan Baker
04e1c46089 docs: Add sha sums for 25.3.0
(cherry picked from commit 0cb99ef602)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:42 +00:00
Dylan Baker
34c520037a docs: add release notes for 25.3.0
(cherry picked from commit 523eea18c5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38454>
2025-11-17 22:07:42 +00:00
Aitor Camacho
c49b3c670c kk: Add MESA_KK_DISABLE_WORKAROUNDS to disable workarounds
MESA_KK_DISABLE_WORKAROUNDS provides a way to disable workarounds
we've had to apply to get Vulkan conformance. In hopes that Metal
bugs get fixed in upcoming macOS releases.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38426>
2025-11-17 21:52:10 +00:00
Christian Gmeiner
adf881cd3e etnaviv: Add support for ARB_vertex_type_2_10_10_10_rev
This extension seems to be supported on GC3000 (HALTI2) and later hardware.
While no explicit feature bit documents this capability, testing
confirms that the required vertex formats work correctly on these GPUs.

This patch adds the missing B10G10R10A2 vertex format variants
(UNORM, SNORM, USCALED, SSCALED), gates support behind the HALTI2
feature check, and updates features.txt to reflect the new capability.

All relevant piglit tests pass.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38446>
2025-11-17 21:33:31 +00:00
Lionel Landwerlin
401b2066b0 anv: ensure slab allocated memory matches image requirements
The VMA of VkDeviceMemory has to accomodate all the resources that can
be bound to it. For sparse images it's 64KiB alignment, for other
tiled images it's 4KiB. But we also have a workaround that requires a
64KiB alignment for Tile4 images.

The initial version of the slab allocator missed the 4KiB alignment.
This fix adds the workaround handling too.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: dabb012423 ("anv: Implement anv_slab_bo and enable memory pool")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38480>
2025-11-17 20:51:47 +00:00
Lionel Landwerlin
775f8ec105 anv: fixup load_ubo lowering
Use ult like nir_lower_explicit_io.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38477>
2025-11-17 20:02:00 +00:00
Olivia Lee
4a2df9127f panvk/csf: add PANLIB_BARRIER_CSF_WAIT, to insert WAIT after precomp
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is useful for running multiple dependent precomp shaders in a row.
We could do this using PANLIB_BARRIER_CSF_WAIT and then immediately wait
on the syncobj, but it's a little silly to do that on the same subqueue.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37971>
2025-11-17 19:31:31 +00:00
Olivia Lee
f5e0d90231 panvk/csf: put precomp syncobj behind PANLIB_BARRIER_CSF_SYNC option
In some cases, we don't need to signal the syncobj yet because we will
be issuing a second asynchronous instruction afterwards blocking on the
first.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37971>
2025-11-17 19:31:31 +00:00
Olivia Lee
ebbf05f9d2 panvk/csf: explicitly set ls_sb_slot in set_fbds_provoking_vertex
SB_ID(LS) is currently equal to zero, so this is not a behavior change,
but worth setting it explicitly for clarity and in case the sb
assignments change.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 885805560f ("panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38458>
2025-11-17 19:11:05 +00:00
Olivia Lee
e899bc8be8 panvk/csf: fix uninitialized read in draw context
We check fn_set_fbds_provoking_vertex_stride == 0 to determine whether a
previous function variant has already been allocated, so this value must
be initialized to zero before we start the loop. We could fix this by
explicitly initializing just that field, but I figure it's simpler and
safer to just zero-initialize the whole struct.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 885805560f ("panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38458>
2025-11-17 19:11:05 +00:00
Casey Bowman
bcdc0aae44 anv: Make pipeline mode switches show which mode is being entered
This helps for debug when wanting to check which pipeline mode the
driver has selected for a given section of a frame.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38317>
2025-11-17 09:38:50 -08:00
Casey Bowman
3f795016d3 anv: Remove vf_flush for start of command buffers
These vertex fetch flushes aren't required in gen9+ because the display
driver will take care of this invalidation on QueueSubmit. So let's remove it.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38317>
2025-11-17 09:38:50 -08:00
Lionel Landwerlin
4816318887 brw: fix workaround fence rlen field
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
send.ugm (1|M0)          r125     r0      null:0  0x0            0x0200651F           {$9} // wr:1+0, rd:0; fence invalid flush type scoped to tile

When destination of Send(s) is not null, the response length must not be 0.

Should only affect DG2 products.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38478>
2025-11-17 17:08:30 +00:00
David Rosca
17c015c2de radeonsi/vce: Add workaround for unaligned input surface
VCE requires 16x16 aligned input surface. Blit into an internal
scratch surface when input surface is not 16 aligned.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14270
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38392>
2025-11-17 16:49:21 +00:00
Georg Lehmann
018f45f981 aco/insert_NOPs: remove redundant VALUReadSGPRHazard waits
Mostly removes SALU->VALU waits if the VALU writes a sgpr.

Foz-DB GFX1201:
Totals from 18553 (22.51% of 82419) affected shaders:
Instrs: 27388414 -> 27321118 (-0.25%)
CodeSize: 145389276 -> 145118128 (-0.19%); split: -0.19%, +0.00%
Latency: 200288087 -> 200252583 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 36311237 -> 36307369 (-0.01%); split: -0.01%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38445>
2025-11-17 16:28:36 +00:00
Georg Lehmann
b1d730982e aco/insert_NOPs: remove redundant VALUMaskWriteHazard waits
This removes a lot of VALU->SALU waits.

Foz-DB Navi31:
Totals from 8908 (10.84% of 82179) affected shaders:
Instrs: 17118986 -> 17084870 (-0.20%)
CodeSize: 91057212 -> 90919300 (-0.15%); split: -0.15%, +0.00%
Latency: 154044128 -> 154036848 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 26608698 -> 26607933 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38445>
2025-11-17 16:28:36 +00:00
Erik Faye-Lund
c3170d11ac pvr: limit availability of HW defs
To be able to support multiple GPU architectures, we need to thread
carefully with HW defs. So let's limit the availability of the HW defs
to where it's needed. We do this by moving the HW def includes and
helpers to query them to end of the source-files.

In the long run, we probably want something a bit more formal to get
access to HW-dependent values based on the hw-info. But there's some
work in progress to change how that works, so let's kick the can down
the road a bit on that part.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
b8721b7436 pvr: respect has_pbe_stride_align_1pixel
This makes us either use the rogue-define, or a single pixel. This
feature isn't available in any HW we support yet, but that is going to
change soon.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
ba47e03908 pvr: store has_pbe_stride_align_1pixel in pvr_device_features
This doesn't actually need fixing; there's no Rogue HW with this
feature. Instead, let's start populating this when we fill in new
architectures, which does support this.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
da414f102c pvr: factor out write_immutable_samplers
This is the only part of pvr_descriptor_set_create() that actually
depends on architecture specific details (in particular, the
write_sampler calls), so let's factor this out to a separate function.

This is going to be helpful when we're doing multi-arch support.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
afff4be21c pvr: encapsulate clear-state
Same story as the previous commit; this let's us store an architecture
specific structure inside an architecture agnostic structure.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:31 +00:00
Erik Faye-Lund
ddd604439f pvr: encapsulate border-table
The border-table is architecture specific, but it's stored in the device
structure that isn't. We need to store a pointer to it instead, because
the size will vary from architecture to architecture.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
Erik Faye-Lund
8233f77caa pvr: split idep_pco_uscgen_programs_h in two
When we do multiarch, we want to be able to refer to the headers
separately from the sources here, so let's split this dependency in two.

Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
Ashish Chauhan
8df205d520 pvr: store arch in device-info
Right now all supported devices are Rogue devices. But in the future,
we're going to support multiple architectures. So let's add a way to
query this at run-time.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
leonperianu
1e548195d2 pvr: feature promotion to core from derived
RGX_FEATURE_USC_ITR_PARALLEL_INSTANCES is no longer a derived feature
for Volcanic, it is a core feature. This improvement is related to the
introduction of Volcanic device information.

Signed-off-by: leonperianu <leon.perianu@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
leonperianu
bf1d9d1339 pvr: Change has_fbcdc_algorithm to 1-bit bit-field
This aligns it with the definitions of other device features.

Signed-off-by: leonperianu <leon.perianu@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38423>
2025-11-17 16:04:30 +00:00
Patrick Lerda
f8de09a811 r600: fix rv770 read scratch compatibility
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The flag mega_fetch should be set on rv770 for a
read scratch operation (as written in the r700
documentation p357). Without this flag, read scratch
does not work and a gpu hang could be triggered.

Here are the tests fixed:
shaders/glsl-predication-on-large-array: fail pass
spec/glsl-1.10/execution/temp-array-indexing/glsl-fs-giant-temp-array: fail pass
spec/glsl-1.10/execution/temp-array-indexing/glsl-vs-giant-temp-array: fail pass
spec/glsl-1.30/execution/fs-large-local-array: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec2: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec3: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec4: fail pass
spec/glsl-1.30/execution/fs-multiple-large-local-arrays: fail pass

Fixes: 9c48a139b0 ("r600g: Support emitting scratch ops")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38353>
2025-11-17 15:48:17 +00:00
Erik Faye-Lund
d77279fa9b panfrost: remove stale code
This code was no longer needed after switching to os_read_file, but I
accidentally left it around, whoops!

Fixes: 49183bfb79 ("pan/bi: use os_read_file-helper")
CID: 1665295
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
c8e30c7a9f panvk: assert that shader_present isn't zero
If it is, util_last_bit() will return zero, and the subtraction that
follows will underflow. Make it obvious that this can't happen, by
adding an assert here.

CID: 1665297
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
22d929f265 panvk: do not open-code debug_get_num_option
Open-coding the size-parsing here is fragile. Let's use a common helper
for this instead.

CID: 1665346
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
37a7a157e8 pan/kmod: fix priority query logic
The PANFROST_JM_CTX_PRIORITY values aren't bitmasks, but enum values.
But the kernel interface uses the BIT()-macro on them, so we need to do
the same. We don't have the macro, but it's trivial to do this with a
bitshift instead.

Fixes: f04dbf0bc0 ("pan/kmod: query and cache available context priorities from KMD")
CID: 1666511
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
55ef52d009 panfrost: remove needless variable
We can already tell if we're writing the first variable by looking at
sig_offset. So let's drop the needless variable here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Erik Faye-Lund
9839db709a panfrost: initialize sig before use
If only invalid surfaces are passed, we end up using an undefined array
as a string. And while this might not be possible, it is hard to reason
about, especially for new readers and tools. So let's initialize the
buffer as an empty string.

CID: 1666581
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
2025-11-17 15:26:22 +00:00
Lionel Landwerlin
8147108590 anv: optimize pipeline switching with secondaries
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38479>
2025-11-17 15:06:55 +00:00
Lionel Landwerlin
85a117bc37 anv: track descriptor mode in SBA tracepoint
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38479>
2025-11-17 15:06:55 +00:00
Gert Wollny
942e6af40b r600/sfn: use PS and PV inline registers when possible
This reduces register pressure later.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:57 +00:00
Gert Wollny
80887e2590 r600/sfn: Fix test creation and handling of 3-src without dest
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:57 +00:00
Gert Wollny
1f58a36abb r600/sfn: Add method to force-override the dest of an AluInstr
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:57 +00:00
Gert Wollny
6f8841b338 r600/sfn: Make value factory a member of the block scheduler
No need to pass it around all the time.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:56 +00:00
Gert Wollny
8e0a0ca098 r600/sfn: Add slot access operator to AluGroup
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:56 +00:00
Gert Wollny
12d913fe4f r600/sfn: change register ID of dummy dest register
Handle it correctly in the assembler, live range evaluation
and RA.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:56 +00:00
Gert Wollny
fc5728950b r600/sfn: don't use dummy register with non-write 64 bit slots
For trans ops and two source ops we can just clear the write flag

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:56 +00:00
Gert Wollny
603af345be r600/sfn: fix querying number of sources for LDS ops in readport validation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:55 +00:00
Gert Wollny
0cd0efbbf9 r600/sfn: Don't assign dest registers in non-write interpolation slots
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:55 +00:00
Gert Wollny
ebe395608a r600/sfn: Silence warning about unused parameter
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:55 +00:00
Gert Wollny
43df08dd42 r600/sfn: remove some unused static variables
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:54 +00:00
Gert Wollny
a22c03f0a3 r600: Handle dummy dest in assembler and disass
The dummy dest will not be allocated, so we must not
count it.

In the disassambler write PV and PS if the ALU dest GPR is
only used via PS/PV.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
2025-11-17 14:46:54 +00:00
Tapani Pälli
1a4b4dba9a anv: remove own GetRenderingAreaGranularityKHR
As it does the same as common version provided by runtime.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38474>
2025-11-17 14:23:20 +00:00
Valentine Burley
eb0c95a5d5 lavapipe/ci: Run vkd3d job in parallel
This appears to be stable now, and running on multiple threads fixes the
the timeout problems we were hitting in lavapipe-vkd3d.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38476>
2025-11-17 14:00:10 +00:00
Calder Young
d6fbbfef5c brw: fix SIMD lowering of fp16 sampler message data with multiple components
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 61d6aea4 ("brw: fix SIMD lowering of sampler messages with fp16 data")
Closes: mesa/mesa#13149
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38455>
2025-11-17 12:38:14 +00:00
Lionel Landwerlin
c12fa4bf8b vulkan/runtime: fix incorrect assert on empty shader groups
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e05a9b77b6 ("vulkan/runtime: split rt shaders hashing from compile")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14278
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38466>
2025-11-17 12:12:22 +00:00
David Rosca
3abb2707e2 radv/video: Fix coding used_by_curr_pic_lt_flag
Fixes: d68a1fc0d4 ("radv/video: port hevc slice header encoding from radeonsi")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14301
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38475>
2025-11-17 11:51:08 +00:00
Samuel Pitoiset
8d4ba81ca8 radv: remove now unused SDMA helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38448>
2025-11-17 11:29:24 +00:00
Samuel Pitoiset
a4e4f13c78 ac,radv: add ac_emit_sdma_copy_t2t_sub_window()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38448>
2025-11-17 11:29:24 +00:00
Samuel Pitoiset
f5ecc5ffd5 ac,radv,radeonsi: add ac_emit_sdma_copy_tiled_sub_window()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38448>
2025-11-17 11:29:24 +00:00
Samuel Pitoiset
5f8fa6ae03 ac,radv,radeonsi: add ac_emit_sdma_copy_linear_sub_window()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38448>
2025-11-17 11:29:23 +00:00
Christoph Pillmayer
da3d8c8b4b nir: Update progress info in nir_sort_unstructured_blocks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38354>
2025-11-17 10:30:37 +00:00
Christoph Pillmayer
8db66767a9 nir: Fix preseved metadata in sort_unstructured_blocks
Fixes: c859ea5783 ("nir: Add a sort_unstructured_blocks() helper")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38354>
2025-11-17 10:30:37 +00:00
David Rosca
3858a6a696 radv/video: Fix coding allow_screen_content_tools and force_integer_mv
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This was copied from radeonsi which expected seq_force_screen_content_tools = 2
and seq_force_integer_mv = 2.

Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38371>
2025-11-17 08:43:54 +00:00
David Rosca
22803f0d50 vulkan/video: Fix coding AV1 seq_choose_screen_content_tools = 1
Fixes: 724655bfc6 ("vulkan/video: add support for AV1 encoding to runtime")
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38371>
2025-11-17 08:43:54 +00:00
Collabora's Gfx CI Team
c319cb627f Uprev ANGLE to 127a84404b88dbc4327ffb7f831a9a36c3b111bc
e9626fbced...127a84404b

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38102>
2025-11-17 08:07:36 +00:00
Samuel Pitoiset
9666bd1245 radv: remove unnecessary handling of SDMA in radv_cs_emit_write_event_eop()
This function is only called for GFX or ACE. SDMA uses are already
handled before.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38430>
2025-11-17 08:28:38 +01:00
Samuel Pitoiset
6413651bcf ac,radv,radeonsi: add ac_emit_sdma_copy_linear()
RadeonSI wasn't considering the undocumented HW limitation apparently.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38430>
2025-11-17 08:28:37 +01:00
Samuel Pitoiset
191bf7aba6 ac,radv: add ac_emit_sdma_constant_fill()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38430>
2025-11-17 08:25:32 +01:00
Julia Zhang
0007644913 amdgpu/virtio: unmap bo in destroy_host_blob
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Unmap bo in destroy_host_blob when hb->cpu_addr is not NULL.
This avoid memory leak caused by bo refcount is not 0 when
amdvgpu_bo_free is called.

Signed-off-by: Julia Zhang <Julia.Zhang@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38440>
2025-11-17 05:35:31 +00:00
Yiwei Zhang
12edb83fb5 venus: add a wsi image log
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is helpful to tell which path is taken:
1. explicit modifier: legacy_scanout=0, prime_blit=0
2. prime blit: legacy_scanout=0, prime_blit=1
3. legacy scanout: legacy_scanout=1, prime_blit=0

To be noted, venus doesn't advertise legacy scanout support, but we
implicitly support it for gamescope compatibility.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38457>
2025-11-16 15:37:16 +00:00
Dmitry Baryshkov
b5193a7bdd freedreno/ci: add a200 nightly jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Adreno 200 is an old GPU implementing GL ES 2.0. Add nightly jobs to
test for regressions on this hardware. It is currently limited to GL CTS
tests, because Piglit gives hard time, mostly crashing the GPU.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38383>
2025-11-15 21:03:40 +00:00
Dmitry Baryshkov
41406e28dc ci: describe my small lab
A small installation with several iMX53 devices, managed by CI-Tron.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38383>
2025-11-15 21:03:40 +00:00
Timur Kristóf
0d20bdbe2c ac: Improve description of some HW workarounds
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Also add references to their conterparts in old PAL code.
This makes it easier to remember whether we mitigated the
same issues as PAL did.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38304>
2025-11-15 14:25:07 +01:00
Timur Kristóf
cad4e7d2e7 radv, radeonsi: Move GFX6-7 CB clamp issue to ac_gpu_info
To improve consistency between the two drivers.
This excludes Hawaii from the workaround on RADV.

Also add the same to ac_null_device_create().

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38304>
2025-11-15 14:24:59 +01:00
Timur Kristóf
35b376b942 radeonsi: Respect if rbplus is allowed when choosing color formats
For consistency with RADV.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38304>
2025-11-15 14:24:52 +01:00
Timur Kristóf
4f793d2515 radeonsi: Inline si_choose_spi_color_formats
Will be necessary for the subsequent commit.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38304>
2025-11-15 14:24:46 +01:00
Timur Kristóf
567e1b56ef ac/gpu_info: Disable sparse VM mappings pre-Polaris, for now
Disable sparse mappings on GFX7-8 due to GPU hangs in the VK CTS,
except Polaris where it happens to work "well enough" to pass
the VK CTS and run some games already.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38304>
2025-11-15 14:23:59 +01:00
Timur Kristóf
1c8881fc60 radv: Disable sparse mapping when unsupported by VM
Also disable the sparse binding queue and other related features.
Using sparse on GFX6-8 can cause GPU hangs at the moment.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38304>
2025-11-15 14:22:49 +01:00
Bohan Yu
a037443399 Panfrost: Fix un-split 64-bit address for store_scratch instruction
In Panfrost compute shader, store_scratch instructions with 64-bit const
address are generated by `nir_lower_vars_to_scratch`. This address didn't
pass `bi_emit_cached_split` before `bi_emit_store` and `bi_emit_load`,
which assumes the low and high parts of the 64-bit address are split.
A "missing bi_cache_collect()" abortion is then triggered at `bi_extract`.

This bug fix checks and splits 64-bit addresses in the `bi_emit_store` and
`bi_emit_load` instructions. Test on RK3588 with Mali-G610.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36969>
2025-11-15 11:58:46 +00:00
Christian Gmeiner
a790236a56 etnaviv/ci: Add KHR-GLES2 conformance testing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Enable official Khronos OpenGL ES 2.0 conformance test suite (glcts)
for all etnaviv GPU variants in CI. This runs the gles2-khr-main
mustpass list to verify specification compliance.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38456>
2025-11-15 11:00:07 +00:00
Eric Engestrom
9f2bab6569 broadcom/ci: fix rpi4 retries
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
CI-tron currently requires a number of minutes to also be set, so let's
just pick some huge value that will never actually trigger, leaving the
OVERALL timeout as the only one that applies.

Fixes: ee5a95319d ("broadcom/ci: automatically reboot rpi3 when they fail to find the root device")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38461>
2025-11-15 08:51:50 +01:00
Marek Olšák
f9341082a2 nir,glsl,zink: remove the option nir_io_separate_clip_cull_distance_arrays
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This calls nir_separate_merged_clip_cull_io in zink, which is better
than having to handle separate clip & cull arrays in all passes.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38452>
2025-11-15 03:30:10 +00:00
Marek Olšák
da52bc466f nir: add nir_separate_merged_clip_cull_io
Only needed by zink. This clip/cull distance separation pass is needed
to remove nir_io_separate_clip_cull_distance_arrays, so that all shared
GLSL code only uses merged clip+cull distance outputs.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38452>
2025-11-15 03:30:10 +00:00
Marek Olšák
1e0fe81b69 nir: document how nir_opt_cse works and suggest improvements
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
not planning to work on the TODOs immediately

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38385>
2025-11-15 02:56:30 +00:00
Marek Olšák
9247a78925 nir: document how nir_opt_dce works
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38385>
2025-11-15 02:56:30 +00:00
Marek Olšák
e372365cf4 nir: rename nir_copy_prop -> nir_opt_copy_prop
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38411>
2025-11-15 02:16:38 +00:00
Marek Olšák
296839f489 nir/opt_copy_propagate: refactor for readability, describe missing stuff
No functional change.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38411>
2025-11-15 02:16:38 +00:00
Christian Gmeiner
b4e7981996 anv: Convert DEBUG_SPARSE logging to use mesa_logi
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Use mesa_logi_v(..) in sparse_debug(..).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38190>
2025-11-15 00:37:53 +00:00
Marek Olšák
4e834b4321 nir: add NIR_PASS_ASSERT_NO_PROGRESS
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This aborts if a pass would make any progress. It can be used to assert that:
- our minimalist pass invocation loops in drivers are sufficient and don't
  leave any unoptimized code in the shader
- our lowering is sufficient and other passes don't add instructions that
  would cause lowering having to be repeated

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38406>
2025-11-14 21:39:12 +00:00
Marek Olšák
482fa6818e radv: set ZMM_TRI_EXTENT for conservative rasterization == overestimate
Ported from PAL and recommended by HW people for correctness.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38434>
2025-11-14 21:18:24 +00:00
Connor Abbott
b92f7c17da tu: Expose preserving fp32 denorms via softfloat32
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Microsoft required the ability to preserve fp32 denorms via a shader
flag in shader model 6.2, but Adreno does not support this. Instead
Qualcomm's DX12 driver uses soft floats. Implement something similar to
expose the equivalent Vulkan feature for vkd3d-proton. In practice no
apps should actually use this but it lets us go from SM6.0 to SM6.6 with
vkd3d-proton.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37608>
2025-11-14 19:31:17 +00:00
Connor Abbott
d30ff374a1 nir, glsl: Add support for softfloat32
Based on existing softfloat64 support and Berkeley SoftFloat. This is
targeted at drivers that can't preserve denorms, so operations where
denorm support is irrelevant like conversions to/from integers aren't
handled.

Because the existing mechanism used by Gallium for softfloat64 doesn't
support includes, we unfortunately can't extract common code into a
header. This can be done later if we switch Gallium to using glslang and
spirv-to-nir.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37608>
2025-11-14 19:31:17 +00:00
Connor Abbott
9e477555c5 glsl/float64: Fix fmax with NaNs
We have to invert the condition to select the non-NaN source, instead of
just swapping a and b. The equivalent float32 function was failing
dEQP-VK.spirv_assembly.instruction.graphics.float_controls.fp32.input_args.denorm_nmax_nan_preserve_frag
without this fix.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37608>
2025-11-14 19:31:17 +00:00
Connor Abbott
8c16d7f18a editorconfig: Set for glsl files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37608>
2025-11-14 19:31:17 +00:00
Eric Engestrom
ee5a95319d broadcom/ci: automatically reboot rpi3 when they fail to find the root device
Band-aid to mask the problem, while we work on it in
https://gitlab.freedesktop.org/gfx-ci/ci-tron/-/issues/303

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38447>
2025-11-14 19:08:08 +00:00
Caio Oliveira
e20d910a6a brw: Remove 3src_exec_size from the field macros
It is incomplete and it is the same as regular exec_size.  Change
the test code that was using it to use the regular one.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38208>
2025-11-14 18:46:58 +00:00
Samuel Pitoiset
de5d53ad7d vulkan: update spec to 1.4.333
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38441>
2025-11-14 19:06:28 +01:00
Samuel Pitoiset
3853dc11e5 spirv: Update the JSON and headers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38441>
2025-11-14 19:06:28 +01:00
Romaric Jodin
8f13905c5e pan/bi: improve bi_alu_src_index to avoid bi_make_vec when possible
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When possible avoid making a vector if we can use a swizzle. The
swizzle will be lower by `bi_lower_swizzle` if not supported by the
instruction.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36637>
2025-11-14 10:03:55 +00:00
Lucas Fryzek
b75b0ce7b2 lp: Implement gallium depth_bounds_test capability
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Support for this capability in llvmpipe expose
support for GL_EXT_depth_bounds_test, as well as supporting
the `depthBounds` device feature in lavapipe.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36487>
2025-11-14 09:43:22 +00:00
Daniel Schürmann
36b0fdb7b7 radv: move nir_opt_copy_prop_vars out of optimization loop
The effect of this change alone is >4% faster compile times.

Totals from 356 (0.45% of 79839) affected shaders: (Navi48)

Instrs: 833062 -> 817649 (-1.85%); split: -1.97%, +0.12%
CodeSize: 4387976 -> 4312616 (-1.72%); split: -1.93%, +0.22%
SpillSGPRs: 430 -> 421 (-2.09%)
LDS: 877568 -> 880640 (+0.35%)
Latency: 8862905 -> 8861517 (-0.02%); split: -0.29%, +0.28%
InvThroughput: 1470875 -> 1471874 (+0.07%); split: -0.22%, +0.28%
VClause: 16744 -> 16452 (-1.74%); split: -1.82%, +0.07%
SClause: 17583 -> 17058 (-2.99%); split: -3.04%, +0.06%
Copies: 58959 -> 58701 (-0.44%); split: -0.57%, +0.14%
Branches: 20355 -> 20276 (-0.39%); split: -0.58%, +0.20%
PreSGPRs: 21477 -> 21280 (-0.92%); split: -0.93%, +0.01%
PreVGPRs: 20596 -> 20627 (+0.15%); split: -0.27%, +0.42%
VALU: 449148 -> 440751 (-1.87%); split: -1.92%, +0.05%
SALU: 126577 -> 123978 (-2.05%); split: -2.15%, +0.09%
VMEM: 33549 -> 33559 (+0.03%); split: -1.69%, +1.72%
SMEM: 31280 -> 30543 (-2.36%); split: -2.36%, +0.00%
VOPD: 254 -> 251 (-1.18%); split: +0.39%, -1.57%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:15 +00:00
Daniel Schürmann
7ff8cf3e7b radv: Only call nir_lower_alu_width once in radv_optimize_nir()
No fossils stats differences.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:15 +00:00
Daniel Schürmann
11fb6c30b3 nir/lower_vars_to_ssa: return early if there is no local variables to lower
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:15 +00:00
Daniel Schürmann
18b99338b7 radv: don't lower_vars_to_ssa during optimization loop
Totals from 138 (0.17% of 79839) affected shaders: (Navi48)

Instrs: 129058 -> 128913 (-0.11%); split: -0.20%, +0.09%
CodeSize: 683024 -> 682056 (-0.14%); split: -0.20%, +0.06%
Latency: 1080293 -> 1080517 (+0.02%); split: -0.02%, +0.04%
InvThroughput: 180598 -> 180622 (+0.01%)
SClause: 2292 -> 2294 (+0.09%); split: -0.13%, +0.22%
Copies: 8663 -> 8721 (+0.67%); split: -2.27%, +2.94%
PreSGPRs: 5980 -> 5953 (-0.45%)
VALU: 78673 -> 78686 (+0.02%); split: -0.01%, +0.02%
SALU: 13933 -> 13860 (-0.52%); split: -1.41%, +0.89%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:15 +00:00
Daniel Schürmann
d959e17d3d radv: call nir_opt_find_array_copies before first radv_optimize_nir()
Totals from 11 (0.01% of 79839) affected shaders: (Navi48)

Instrs: 6514 -> 5526 (-15.17%); split: -16.76%, +1.60%
CodeSize: 34700 -> 29336 (-15.46%); split: -17.30%, +1.84%
Latency: 12372 -> 11545 (-6.68%); split: -8.13%, +1.45%
InvThroughput: 2769 -> 2444 (-11.74%); split: -12.96%, +1.23%
Copies: 738 -> 649 (-12.06%)
Branches: 155 -> 111 (-28.39%)
PreVGPRs: 506 -> 471 (-6.92%); split: -7.71%, +0.79%
VALU: 3467 -> 2915 (-15.92%); split: -16.96%, +1.04%
SALU: 992 -> 839 (-15.42%); split: -16.03%, +0.60%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:14 +00:00
Daniel Schürmann
bf0e04a531 radv: Only call nir_opt_dead_write_vars once
Totals from 2 (0.00% of 79839) affected shaders: (Navi48)

Instrs: 5540 -> 5524 (-0.29%)
CodeSize: 27536 -> 27424 (-0.41%)
Latency: 37602 -> 37526 (-0.20%)
InvThroughput: 9401 -> 9382 (-0.20%)
Copies: 839 -> 845 (+0.72%); split: -0.12%, +0.83%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:14 +00:00
Daniel Schürmann
c3b72ea00c radv: Only call nir_opt_memcpy once
No fossil stats differences.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:14 +00:00
Daniel Schürmann
7ee1932309 treewide: Never preserve nir_metadata_dominance without nir_metadata_block_index
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:14 +00:00
Daniel Schürmann
0d70716c8a nir/opt_large_constants: Fix dead deref instructions accessing lowered variables
It could happen that unused derefs weren't removed
if DCE wasn't called prior to nir_opt_large_constants.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
2025-11-14 09:09:14 +00:00
Lionel Landwerlin
61d6aea401 brw: fix SIMD lowering of sampler messages with fp16 data
We need to make sure the data part returned by sampler messages is
always aligned to a physical register. Just like the residency data
lives in a single physical register after the data.

Lowering a vec3 16bits per components led to a half a physical
register allocation which then confused the descriptor lowering
(expecting physical register units).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 295734bf88 ("intel/fs: fix residency handling on Xe2")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12794
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34008>
2025-11-14 10:26:23 +02:00
Samuel Pitoiset
e47a60255a radv: add a workaround for color<->stencil only copies on SDMA4-5
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For weird reasons, on SDMA4-5 color<->stencil only copies don't work
correctly. I compared NAVI21 (SDMA 5) vs NAVI31 (SDMA 6), everything
is bits-to-bits exact but the same test doesn't pass on NAVI21. So,
it's potentially a hardware bug on SDMA < 6.

Fixes dEQP-VK.api.ds_color_copy.*_tq on GFX9-GFX10.3.

Fixes: 0034f5a948 ("radv: allow ds<->color copies on compute/transfer queues")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38377>
2025-11-14 06:57:57 +00:00
Yonggang Luo
54715e8989 util: Getting util_align_npot to be same with ALIGN_NPOT so it can be merged latter
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: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38431>
2025-11-13 21:02:44 -08:00
Yiwei Zhang
07d059f3e2 venus: use seq_cst for ring cs and tail update ordering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
To avoid incompatibility between the compiler implementations used by
the driver and the renderer, seq_cst ordering is picked here, which has
required a full mfence instruction. Then the renderer side acquire is
ensured to be ordered after the cache flush of ring cs updates.

Perf wise, there's no regression in headless vkmark runs. In theory,
the overhead introduced here weighs trivially as compared to the ring
cs encode/decode part. So we should go for better robustness.

Test: venus on windows guest works with renderer on Linux
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14277
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38435>
2025-11-14 01:26:52 +00:00
Iván Briano
27695ac463 anv: report actual AS descriptor limits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38436>
2025-11-14 00:51:20 +00:00
Lionel Landwerlin
80c89909f3 brw: fixup immediate bindless surface handling
This is unused at the moment but the backend incorrectly assumes
immediate handles are for the binding table (therefore not bindless).

Some new CTS tests are using an immediate bindless handle which is
broken.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38359>
2025-11-14 00:24:55 +00:00
Lionel Landwerlin
73bf51dba0 anv: consider 64bit atomics on similar formats with mutable images
vkd3d-proton uses a R32G32_UINT image with MUTABLE

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ed77f67e44 ("anv: add emulated 64bit integer storage support")
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38409>
2025-11-14 00:01:51 +00:00
Lionel Landwerlin
b3cc54731f brw: fixup 64bit atomics emulation on 2D array images
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ce7208c3ee ("brw: add support for texel address lowering")
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38409>
2025-11-14 00:01:50 +00:00
Sagar Ghuge
aeaf1cbc2b anv: Replay mode is only available on Gfx < 20
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38416>
2025-11-13 23:05:01 +00:00
Sagar Ghuge
29cc9c5eab intel/genxml: Update CS_CHICKEN1 register for gfx20
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38416>
2025-11-13 23:05:01 +00:00
Connor Abbott
6064e3a7d8 tu: Handle case where pipeline writes unused color attachments
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
With VK_EXT_unused_attachments, we may have a case where the FS writes
to attachments 0 and 1, both have valid formats and are enabled, yet the
renderpass only has 1 color attachment. In this case we would set
RB_PS_MRT_CNTL to 2, but since we never emitted RB_MRT_BUF_INFO[1] and
so on, we would get garbage attachment info from the last render pass
and end up writing to an attachment that doesn't exist.

Fix this by disabling attachments that are unused. We can't move setting
RB_PS_MRT_CNTL to emitting when we emit color RT state, because then we
have the inverse problem of a FS that writes to attachments 0 and 1, a
renderpass that has 2 attachments, but a blend state that only includes
1 attachment (and therefore disables color writes for attachment 1). At
least one side (blending or RT emission) has to assume that the other
side may have more RTs enabled and disable the rest of the RTs up to
MAX_RTS.

Fixes: c2eb768eb2 ("tu: Expose VK_EXT_dynamic_rendering_unused_attachments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38250>
2025-11-13 22:36:32 +00:00
Yonggang Luo
47d86e5f66 treewide: strip unneeded inc_gallium inc_gallium_aux
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37391>
2025-11-13 22:01:43 +00:00
Alyssa Rosenzweig
65fcdf4c81 nir/sweep: fix use-after-free with dominance LCA
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Either we need to save this pointer or toss it.

==146166==ERROR: AddressSanitizer: heap-use-after-free on address 0x7bfe77013920 at pc 0x7b9e6fd5b978 bp 0x7ffc30ef18e0 sp 0x7ffc30ef18d8
READ of size 4 at 0x7bfe77013920 thread T0
    #0 0x7b9e6fd5b977 in get_header ../src/util/ralloc.c:83
    #1 0x7b9e6fd5b977 in ralloc_parent ../src/util/ralloc.c:382
    #2 0x7b9e6fd5b977 in reralloc_size ../src/util/ralloc.c:198
    #3 0x7b9e6fd5b977 in reralloc_array_size ../src/util/ralloc.c:241
    #4 0x7b9e705f83c2 in range_minimum_query_table_resize ../src/util/range_minimum_query.c:21
    #5 0x7b9e7018af1d in realloc_info ../src/compiler/nir/nir_dominance_lca.c:33
    #6 0x7b9e7018af1d in nir_calc_dominance_lca_impl ../src/compiler/nir/nir_dominance_lca.c:126
    #7 0x7b9e6ff9815c in nir_metadata_require ../src/compiler/nir/nir_metadata.c:42
    #8 0x7b9e6ff998e4 in nir_metadata_require_most ../src/compiler/nir/nir_metadata.c:200
    #9 0x7b9e6f8aab4d in st_finalize_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:735
    #10 0x7b9e6f0afb14 in st_create_common_variant ../src/mesa/state_tracker/st_program.c:858
    #11 0x7b9e6f0be2d3 in st_get_common_variant ../src/mesa/state_tracker/st_program.c:973
    #12 0x7b9e6f0bf9cf in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1478
    #13 0x7b9e6f0bf9cf in st_finalize_program ../src/mesa/state_tracker/st_program.c:1596
    #14 0x7b9e6f8b0127 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:633
    #15 0x7b9e6f8b3611 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:816
    #16 0x7b9e6f7bcf51 in link_program ../src/mesa/main/shaderapi.c:1412
    #17 0x7b9e6f7bcf51 in link_program_error ../src/mesa/main/shaderapi.c:1474
    #18 0x0000004020b0 in main._omp_fn.0 /home/alyssa/shader-db/run.c:872
    #19 0x7f9e7893dd65 in GOMP_parallel (/lib64/libgomp.so.1+0xdd65) (BuildId: 9cc501fdca53b5d4ab094f709486781c98573bc9)
    #20 0x000000400d6a in main /home/alyssa/shader-db/run.c:689
    #21 0x7f9e78011574 in __libc_start_call_main (/lib64/libc.so.6+0x3574) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
    #22 0x7f9e78011627 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3627) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
    #23 0x000000401014 in _start (/home/alyssa/shader-db/run+0x401014) (BuildId: a83b8d830cc265be3f54ea3e7a21a0fb5156624b)

0x7bfe77013920 is located 0 bytes inside of 64-byte region [0x7bfe77013920,0x7bfe77013960)
freed by thread T0 here:
    #0 0x7f9e782e5beb in free.part.0 (/usr/lib64/libasan.so.8+0xe5beb) (BuildId: cab80046dbc1c97c6e14490acc37d079701f8d9a)
    #1 0x7b9e6fd5bc39 in unsafe_free ../src/util/ralloc.c:319
    #2 0x7b9e6fd5bc39 in ralloc_free ../src/util/ralloc.c:264
    #3 0x7b9e70063d81 in nir_sweep ../src/compiler/nir/nir_sweep.c:219
    #4 0x7b9e6f0bf499 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1585
    #5 0x7b9e6f8b0127 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:633
    #6 0x7b9e6f8b3611 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:816
    #7 0x7b9e6f7bcf51 in link_program ../src/mesa/main/shaderapi.c:1412
    #8 0x7b9e6f7bcf51 in link_program_error ../src/mesa/main/shaderapi.c:1474
    #9 0x0000004020b0 in main._omp_fn.0 /home/alyssa/shader-db/run.c:872

previously allocated by thread T0 here:
    #0 0x7f9e782e5e4b in realloc.part.0 (/usr/lib64/libasan.so.8+0xe5e4b) (BuildId: cab80046dbc1c97c6e14490acc37d079701f8d9a)
    #1 0x7b9e6fd5a883 in resize ../src/util/ralloc.c:167
    #2 0x7b9e705f83c2 in range_minimum_query_table_resize ../src/util/range_minimum_query.c:21
    #3 0x7b9e7018af1d in realloc_info ../src/compiler/nir/nir_dominance_lca.c:33
    #4 0x7b9e7018af1d in nir_calc_dominance_lca_impl ../src/compiler/nir/nir_dominance_lca.c:126
    #5 0x7b9e6ff9815c in nir_metadata_require ../src/compiler/nir/nir_metadata.c:42
    #6 0x7b9e6ff998e4 in nir_metadata_require_most ../src/compiler/nir/nir_metadata.c:200
    #7 0x7b9e6f8b0ede in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:550
    #8 0x7b9e6f8b3611 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:816
    #9 0x7b9e6f7bcf51 in link_program ../src/mesa/main/shaderapi.c:1412
    #10 0x7b9e6f7bcf51 in link_program_error ../src/mesa/main/shaderapi.c:1474
    #11 0x0000004020b0 in main._omp_fn.0 /home/alyssa/shader-db/run.c:872

Fixes: 17876a00af ("nir: Add a faster lowest common ancestor algorithm")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38412>
2025-11-13 20:17:22 +00:00
Adrián Larumbe
a24f490488 panfrost: match a GL object's maximum label length to KMD uAPI limit
At present, this is the value mandated by the KMD's uAPI, or 4096 bytes.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38027>
2025-11-13 19:16:15 +00:00
Adrián Larumbe
a68c584d70 mesa: gallium: make GL object maximum label length a pipescreen cap
Commit a4ffd2395f ("mesa: Implement label sharing from GL objects with
UM drivers") enabled GL clients to tag objects at a UM driver level. In
the case of Panfrost, and for both KMDs, maximum label size is set to
4096, but the Mesa limit is much lower.

Since glObjectLabel() allocates object labels dynamically, there's no
need to have this value chiseled in stone, so allow Gallium driver
implementers to set their own limit through a pipe screen capability.

Keep the same default maximum label length as before.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38027>
2025-11-13 19:16:15 +00:00
Karmjit Mahil
fa9ac826be freedreno/decode: Add some code to the already present generate-rd
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add some code so that people don't get confused when debugging a
fault and the fault doesn't appear since they forgot to update the
generate-rd.

This should also help catch any build issues earlier on.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38081>
2025-11-13 18:14:11 +00:00
Karmjit Mahil
950f07748a meson: Use adreno-pm4-pack.xml.h instead of custom definitions
This was causing build issues when using the generate-rd.cc file,
due to redeclaration caused by the mixing of the generated header
file and the custom definitions.

Also adding some missing dependencies now introduced due to the
header file include.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38081>
2025-11-13 18:14:11 +00:00
Karmjit Mahil
f5f11f12a6 freedreno/registers: Remove extra space in reg definition
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38081>
2025-11-13 18:14:11 +00:00
Benjamin Cheng
8848495875 radv/video: Align each layer of encode DPB to 256
VCN requires the luma/chroma VAs to be 256 aligned. On VCN5, the
collocated buffer was not 256 aligned which can cause these VAs to be
unaligned.

This fixes VVL PositiveVideoEncodeH264.Basic on VCN5.

Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38408>
2025-11-13 17:18:50 +00:00
Pohsiang (John) Hsu
e9757d25e0 mediafoundation: propagate input timestamp / duration to output
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14261
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38427>
2025-11-13 16:31:06 +00:00
Karmjit Mahil
294e72e2b5 freedreno/docs: Add -k option to nc command
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Netcat locks on to the first connection so if one tried to use
breadcrumbs again Netcat will appear as if it didn't receive
anything. Use `-k` so that it accepts another connection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38419>
2025-11-13 15:46:19 +00:00
Rhys Perry
00edddf542 ac/nir: add some tests for ac_nir_lower_mem_access_bit_sizes
These test that nothing crashes for any possible input. With print=true,
it can also be used to compare the behaviour of two different
ac_nir_lower_mem_access_bit_sizes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37995>
2025-11-13 15:23:20 +00:00
Benjamin Cheng
b4ae11ee42 ac,radeonsi/vcn,radv/video: Drop signature param
The signature is not very useful, and is unnecessary CPU overhead.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38372>
2025-11-13 14:35:58 +00:00
Mario Kleiner
490f05f82c wsi/wayland: Zero min_luminance, max_luminance HDR light levels are valid.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
CTA-861-G section 6.9.1 Static Metadata Type 1 declares that zero values
for different groups of HDR Metadata properties are allowed, including
zero nits values for max display mastering luminance, max content light
level, max frame-average light level and min display mastering luminance.

A zero value is meant to be treated by the video sink as "undefined" /
"unknown", and handled accordingly. This is common for dynamically
generated visual content.

The is_hdr_metadata_legal() function in the Vulkan/WSI/Wayland HDR backend
currently declares HDR light level metadata as invalid if the mastering
display min_luminance and max_luminance light levels are set to the legal
level of zero nits. This causes valid HDR metadata as set by the client
via vkSetHdrMetadata() to be not sent to the compositor.

Fix this by skipping checks that don't apply if min_luminance or
max_luminance are zero. If max_luminance is zero then we skip sending
of mastering display min/max luminance to Wayland, as sending a a
max_luminance <= min_luminance would trigger a protocol error. All
other valid data is still send, ie. color primaries, white-point,
content light levels.

Fixes: cb7726bb2c ("vulkan/wsi: validate HDR metadata to not cause protocol errors")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Co-authored-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38326>
2025-11-13 14:03:50 +00:00
Karmjit Mahil
b86ca63853 freedreno/cffdump: Emulate RMW
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38001>
2025-11-13 13:23:23 +00:00
Karmjit Mahil
265aa40a8a freedreno/decode: Add code to extent pkt processing with Lua
Setting up a new `iL` `lua_State` in which `r` is injected as
the equivalent to `rnn.init(<gpu>)` and a `priv` library allows
accessing extra functionality (not available to user provided
scripts) currently just allowing writing to registers.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38001>
2025-11-13 13:23:23 +00:00
Ashish Chauhan
8825c91dcb pvr: Make display node optional
Allow the driver to work without a display (card) node by removing
strict display controller checks.

Signed-off-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Tested-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38082>
2025-11-13 13:07:52 +00:00
Karmjit Mahil
7f2c53200f freedreno/afuc: Fix potentially uninitialized variable
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
../src/freedreno/afuc/emu-ui.c:64:11: warning: ‘p’ may be used uninitialized [-Wmaybe-uninitialized]
64 |    while (*p && isspace(*p))
   |           ^~
../src/freedreno/afuc/emu-ui.c: In function ‘emu_packet_prompt’:
../src/freedreno/afuc/emu-ui.c:459:10: note: ‘p’ was declared here
459 |    char *p;
    |          ^

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38104>
2025-11-13 11:39:54 +00:00
Karmjit Mahil
cf49571c9e ir3: fix comparison of different signedness build issue
Addresses:
../src/freedreno/ir3/ir3_shader.h: In function 'void ir3_link_add(ir3_shader_linkage*, uint8_t, uint8_t, uint8_t, uint8_t)':
../src/freedreno/ir3/ir3_shader.h:1326:16: error: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Werror=sign-compare]
 1326 |       assert(i < ARRAY_SIZE(l->var));

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38104>
2025-11-13 11:39:54 +00:00
Gert Wollny
79e4323cf0 r600/sfn: Don't start a new ALU-CF if LDS pipeline loads are pending
Fixes: e57643cf (r600/sfn: Add handling for R600 indirect access alias handling)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38398>
2025-11-13 11:17:51 +00:00
Lionel Landwerlin
b9266a122b anv: ensure shader printf is functional on all backends
Also ensure the printfs are read even if the device is lost or ran
into a fault.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38358>
2025-11-13 10:19:47 +00:00
Lionel Landwerlin
ef5a0def76 intel/isl: add INTEL_DEBUG=noccs-modifier to disable CCS modifiers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
To help figure out whether a CCS related corruption is tied to
modifier setup or internal driver state tracking.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38382>
2025-11-13 09:52:27 +00:00
Rhys Perry
6a5982cfe5 aco/scheduler: fix register demand check
Fixes deathloop/01f8d58bf245663b with gfx1201.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 668259ef0b ("aco/scheduler: move clauses through RAR dependencies")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38402>
2025-11-13 09:07:12 +00:00
Samuel Pitoiset
9141696d32 radv: fix gathering push constants from shaders with ESO
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Need to be 4-bytes aligned.

Fixes: aa44a5a4ae ("radv: gather push constant size from shaders for ESO")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14276
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38397>
2025-11-13 07:30:14 +00:00
Samuel Pitoiset
388875abe1 radv: bump maxRayDispatchInvocationCount to 2^30
It's the required limit by Vulkan.

Fixes dEQP-VK.ray_tracing_pipeline.limits.ray_tracing_props.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38405>
2025-11-13 07:10:39 +00:00
Qiang Yu
f07dab1899 doc: mark GL_EXT_mesh_shader as done
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:29 +00:00
Qiang Yu
ece827d53b radeonsi: enable EXT_mesh_shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:27 +00:00
Qiang Yu
3d01529316 radeonsi: si_calculate_max_simd_waves support task and mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:25 +00:00
Qiang Yu
4495978932 radeonsi: handle maybe per primitive input for fragment shader
Some fragment shader may be per-primitive when mesh pipeline,
per-vertex when vertex pipeline. We sort these inputs always
after other per-vertex inputs in nir_recompute_io_bases, so
fragment shader code is same, just need to set different reg.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:24 +00:00
Qiang Yu
1733dddee9 radeonsi: add mesh shader functions
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:23 +00:00
Qiang Yu
4c220f9745 radeonsi: add si_emit_rasterizer_prim_state_for_mesh
To be used by mesh pipeline.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:22 +00:00
Qiang Yu
4ee6553767 radeonsi: add si_update_shaders_for_mesh
To be used by mesh pipeline.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:20 +00:00
Qiang Yu
8410970e8b radeonsi: add si_update_shaders_shared_by_vertex_and_mesh_pipe
Move shared part of si_update_shaders to this function,
no implementation change.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:19 +00:00
Qiang Yu
87715a1c8c radeonsi: compute culldist_mask and clipdist_mask for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:18 +00:00
Qiang Yu
355e499b52 radeonsi: si_emit_buffered_compute_sh_regs support gang cs
To be used by task shader gang cs.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:17 +00:00
Qiang Yu
b713f453c6 radeonsi: lower mesh shader local id and workgroup id
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:15 +00:00
Qiang Yu
2e025d66c3 radeonsi: add task shader queries support
Need to emit query start/stop/sample packets in compute
queue.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:15 +00:00
Qiang Yu
9a31151436 radeonsi: increase task wait count when emit barrier
It will be waited by task queue too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:15 +00:00
Qiang Yu
c0f6e97d6c radeonsi: implement nir_intrinsic_load_ring_mesh_scratch_amd
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:13 +00:00
Qiang Yu
5048216b43 radeonsi: init mesh shader ngg info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:13 +00:00
Qiang Yu
432f66a7b6 radeonsi: add si_create_compute_state_for_nir
To be shared by task shader state creation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:11 +00:00
Qiang Yu
263cce11bd radeonsi: move shared_size to si_shader_variant_info
For mesh shader which know this after ac_nir_lower_ngg_mesh.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:08 +00:00
Qiang Yu
e3ab6249f2 radeonsi: export si_init_compute_preamble_state for task shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:03 +00:00
Qiang Yu
0ee4747678 radeonsi: log cs support mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:02 +00:00
Qiang Yu
f1138c18ac radeonsi: implement task ring nir intrinsic lower
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:02 +00:00
Qiang Yu
e819554b2a radeonsi: add task/mesh shader context states
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:30:00 +00:00
Qiang Yu
cffc40051d winsys/amdgpu: support gang submit for kernel queue
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:29:58 +00:00
Qiang Yu
963ad4bb4e radeonsi: add si_emit_task_shader_pointers
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:29:58 +00:00
Qiang Yu
66cd3f1b52 radeonsi: add si_upload_shader_descriptos
To be shared with gfx, mesh and compute pipeline.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:29:55 +00:00
Qiang Yu
12f33b596c radeonsi: export si_setup_compute_scratch_buffer for task shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:29:54 +00:00
Qiang Yu
915d5167af radeonsi: change arg for si_cp_dma_prefetch
To be used by gang cs too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
2025-11-13 01:29:52 +00:00
Yonggang Luo
8c427aae92 util: Remove unused ALIGN function to prevent future use
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The #undef ALIGN is also not needed anymore, remove it.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:41 +00:00
Yonggang Luo
ecb0ccf603 treewide: Replace calling to function ALIGN with align
This is done by grep ALIGN( to align(

docs,*.xml,blake3 is excluded

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:40 +00:00
Yonggang Luo
03a32b3fe2 radeon/drm: Replace all usage of ALIGN to align and remove ALIGN macro
As now all ALIGN usage is on 32bit integer

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:38 +00:00
Yonggang Luo
0fe6143a77 radeon/drm: use align64 for 64 bits input instead of ALIGN
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:38 +00:00
Yonggang Luo
f8eafbe627 aco: Use align64 instead ALIGN for 64 bits input
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:38 +00:00
Yonggang Luo
ee4c3e790f anv: use align/align64 instead ALIGN, as the input is size_t/uint64_t
When the input is size_t, cast the input to uint32_t, as the output is expect uint32_t not size_t

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:38 +00:00
Yonggang Luo
db767eb7e0 brw: Do not use align as variable name, as it's a function in u_math.h and will be used
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:38 +00:00
Yonggang Luo
d95d7b85ca panfrost/drm-shim: Use align_uintptr instead of ALIGN for size_t input
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:38 +00:00
Yonggang Luo
dd97f64e88 freedreno: Use align64 instead ALIGN for 64 bits input
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:38 +00:00
Yonggang Luo
974f9833cb freedreno: Do not use align as variable name, as it's a function in u_math.h and will be used
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:38 +00:00
Konstantin Seurer
b241b26d11 nir: Remove nir_def::parent_instr
This reduces the footprint of nir_def by 8B on 64-bit systems.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:13 +00:00
Konstantin Seurer
de32f9275f treewide: add & use parent instr helpers
We add a bunch of new helpers to avoid the need to touch >parent_instr,
including the full set of:

* nir_def_is_*
* nir_def_as_*_or_null
* nir_def_as_* [assumes the right instr type]
* nir_src_is_*
* nir_src_as_*
* nir_scalar_is_*
* nir_scalar_as_*

Plus nir_def_instr() where there's no more suitable helper.

Also an existing helper is renamed to unify all the names, while we're
churning the tree:

* nir_src_as_alu_instr -> nir_src_as_alu

..and then we port the tree to use the helpers as much as possible, using
nir_def_instr() where that does not work.

Acked-by: Marek Olšák <maraeo@gmail.com>

---

To eliminate nir_def::parent_instr we need to churn the tree anyway, so I'm
taking this opportunity to clean up a lot of NIR patterns.

Co-authored-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:13 +00:00
Yonggang Luo
34e7fa2fe6 nir: Disable gcc warning -Wstringop-overflow for nir_intrinsic_set_* for latter commit
gcc has a a false positive here, silenced with the pragmas, use separate commit
for easily revert latter once gcc fixed it.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:13 +00:00
Konstantin Seurer
e231aec0c9 nir: Move nir_def directly after nir_instr
This way, all instruction types have the nir_def at the same offset.

Acked-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:13 +00:00
Alyssa Rosenzweig
013a6bfc70 pan/bi: clean up NIR
txf_ms(BUFFER) doesn't exist.

while in the area.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:13 +00:00
Alyssa Rosenzweig
11e5f0b60d pan/bi: initialize variable to fix warning
../src/compiler/nir/nir.h:1152:11: attention: « buf_index » pourrait être utilisé sans être initialisé [-Wmaybe-uninitialized]
 1152 |    return src;
      |           ^~~
../src/panfrost/compiler/bifrost_compile.c: Dans la fonction « lower_texel_buffer_fetch »:
../src/panfrost/compiler/bifrost_compile.c:6234:13: note: « buf_index » a été déclaré ici
 6234 |    nir_def *buf_index;


Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:12 +00:00
Yonggang Luo
24a7d53329 util: Add PRAGMA_DIAGNOSTIC_IGNORED_CLANG PRAGMA_DIAGNOSTIC_IGNORED_GCC for latter use
gcc and clang do not have equal set of warnings, so when warning are specific to CLANG or GCC, using PRAGMA_DIAGNOSTIC_IGNORED_CLANG or PRAGMA_DIAGNOSTIC_GCC_IGNORED instead

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:10 +00:00
Alyssa Rosenzweig
583b25e806 util: fix container_of on MSVC
otherwise &container_of(..)->foo won't work, need extra parens. gcc version is
fine.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:10 +00:00
Jose Maria Casanova Crespo
a0b8ee614d v3dv: only apply simulator stride alignment for from_wsi images
This adds from_wsi field to v3dv_image, so we can apply simulator stride
 alignment only to WSI images.

Handling VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA at
v3dv_GetPhysicalDeviceFormatProperties2 also removes debug warnings like:

MESA: debug: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType Unknown VkStructureType value.(1000001002)

Fixes: 562bb8b62b ("v3dv: align width to 256 when using simulator")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38374>
2025-11-12 21:03:42 +00:00
Faith Ekstrand
7411acaa77 panvk/dispatch: s/shader/cs/g
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Even though "shader" uniquely means something here and we don't need to
specify what stage, "cs" is still shorter, obvious, and matches what we
do all over the 3D code so it saves some cognitive load when bouncing
back and forth.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38403>
2025-11-12 20:44:13 +00:00
Faith Ekstrand
1046f5ed48 panvk: Make noperspective_varyings const
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38403>
2025-11-12 20:44:12 +00:00
Joshua Simmons
7ac1f7777d vtn: Fix OpCopyLogical destination type
Previously the type info for nested values was copied from the source
operand, rather than propagating the new type from the destination
operand.

Fixes: 4c363acf94 ("vtn: Allow for OpCopyLogical with different but compatible types")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38248>
2025-11-12 20:30:30 +01:00
Eric Engestrom
43fe66c26a docs: add 25.2.8 to the calendar
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/38407>
2025-11-12 19:09:53 +01:00
Eric Engestrom
0644351297 docs: add sha sum for 25.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38407>
2025-11-12 19:08:44 +01:00
Eric Engestrom
2b9def5042 docs: add release notes for 25.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38407>
2025-11-12 19:08:44 +01:00
Eric Engestrom
42d82fb6c0 docs: update calendar for 25.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38407>
2025-11-12 19:08:38 +01:00
Samuel Pitoiset
6cf1f3b39a radv: fix supporting more tess parameters with TCS for ESO unlinked shaders
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
VGT_OUTPRIM_TYPE should be programmed correctly when PointMode is only
set in TCS with ESO.

Fixes dEQP-VK.shader_object.tessellation.hlsl.point_mode.

Fixes: c6d9b9b4e0 ("radv: support more tessellation parameters with TCS for ESO unlinked shaders"
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38376>
2025-11-12 16:21:17 +00:00
Gurchetan Singh
5826a0aad9 gfxstream: meson format -i {all meson files}
More readable, allows meson format to be used in the future.

Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38388>
2025-11-12 16:05:12 +00:00
Danylo Piliaiev
c73c737eb2 tu/lrz: Try harder to have LRZ fast-clear enabled with FDM offset
Non-fast-clear path to clear LRZ is rather slow, plus without LRZ
fast-clear we cannot enable concurrent binning.

VK_EXT_fragment_density_map_offset makes us add the maximum possible
tile size to the depth image size, because we don't know the tile
size that will be selected later on for a framebuffer. In practice,
this caused LRZ fast-clear to be disabled in many cases due to
tile_max_w/tile_max_h being rather large.

Now, instead of the most pessimitic case we can do the following:
- Calculate the biggest possible tile size that could be added to
  the depth image that won't disable LRZ fast-clear.
- When calculating tiling config use the info about maximum tile
  size from the images, or in case of image-less framebuffer
  recalculate maximum possible tile size and it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38218>
2025-11-12 15:36:43 +00:00
Danylo Piliaiev
4baf82b406 freedreno/fdl: Move LRZ FC size calculation to a separate function
Will be needed later to calculate max tile size for FDM offset case.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38218>
2025-11-12 15:36:43 +00:00
Marek Olšák
7d22e4c7ba gallium/noop: don't unref buffers passed to set_vertex_buffers to fix crashes
this code is invalid after the refcounting rework

Fixes: b3133e250e - gallium: add pipe_context::resource_release to eliminate buffer refcounting

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38329>
2025-11-12 15:02:20 +00:00
Lionel Landwerlin
c4e2878537 anv: disable software detiling on Xe2+ for image atomics 64bits
This is what happens when you leave MR unreviewed for months.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d39e443ef8 ("anv: add infrastructure for common vk_pipeline")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38400>
2025-11-12 14:33:01 +00:00
Timur Kristóf
0651fd4e6d radeonsi/ci, zink+radv/ci: Remove GS primitive_counter tests from flakes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These should be fixed now.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38364>
2025-11-12 13:40:55 +00:00
Timur Kristóf
7f5f8b3932 ac/nir/ngg: Use align() instead of ALIGN()
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38364>
2025-11-12 13:40:55 +00:00
Timur Kristóf
8f99d736d0 ac/nir/ngg: Fix scratch space for NGG GS streamout
For GS streamout, we need the following LDS scratch space:

- Repacking streamout vertices takes 1 dword per 4 waves per stream
  (max 16 bytes for Wave64, max 32 bytes for Wave32)
- 1 dword per stream for buffer info
  (16 bytes)
- 1 dword per buffer for buffer info
  (16 bytes)

Previously, the space used for buffer info aliased with the
space for repacking the output vertices in ngg_gs_finale(),
and there was no barrier in between, which caused a race
condition, resulting in random failure.

Fix this by allocating a few more LDS dwords so that aliasing
is not required, which also allows us to remove an extra
workgroup barrier.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12705
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38364>
2025-11-12 13:40:55 +00:00
Gert Wollny
13148afd0e etnaviv: isa: Add "thread" info to TEX instruction
Blob generates this with the glmark2:texture benchmark on STM32MP257.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38363>
2025-11-12 13:00:09 +00:00
Valentine Burley
13a20f6571 intel/ci: Drop timeout overrides for pre-merge jobs
LAVA jobs already have a global 1h timeout in GitLab. This exists because
GitLab jobs must start before we can determine whether a device is
available for testing.

Jobs themselves do not normally run that long, most of the delay comes
from waiting in the LAVA queue.

Dropping these overrides for pre-merge jobs fixes cases where the LAVA
job isn't picked up in time.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38395>
2025-11-12 12:35:27 +00:00
Christian Gmeiner
e9341568fa meson: require sysprof-capture-4 >= 4.49.0
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When Mesa is compiled with sysprof support, applications can crash with a
segfault during shutdown. This happens because sysprof_collector_mark()
registers thread-local storage destructors that get called after the library
containing the destructor code has been unloaded.

The problem was fixed in sysprof https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/152

CC: mesa-stable
Closes: mesa/mesa#13571
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38347>
2025-11-12 12:00:46 +00:00
Dmitry Baryshkov
9a33edca35 ci: drop google-freedreno remnants
Drop remnants of the  google-freedreno lab entries.

Fixes: 6541b911bd ("freedreno/ci: Remove baremetal job templates")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38386>
2025-11-12 09:43:43 +00:00
Samuel Pitoiset
74a66d102f ac/parse_ib: decode SDMA_OPCODE_POLL_REGMEM
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38366>
2025-11-12 08:52:17 +00:00
Samuel Pitoiset
75a1380355 radv: add RADV_DEBUG=dumpibs to dump command buffers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38366>
2025-11-12 08:52:17 +00:00
Samuel Pitoiset
842603dc4f radv/amdgpu: add a way to identify preamble/postamble when dumping CS
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38366>
2025-11-12 08:52:17 +00:00
Autumn Ashton
2705d8bd8b radv/video: Implement VK_VALVE_video_encode_rgb_conversion
This is used by Steam Link VR (driver_vrlink) to avoid doing YUV conversion itself.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37500>
2025-11-12 08:25:36 +00:00
Natalie Vock
73a31dafbc radv: Fix PSO history with RT pipelines
1. The prolog needs to have a null check. Libraries don't have prologs.
2. We only need to print the shaders actually included in this pipeline.
   Libraries were already printed separately.
3. The traversal shader was wrongly omitted from the output.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38355>
2025-11-12 08:00:54 +00:00
Konstantin Seurer
c4aee84426 radv: Add re-format commit to .git-blame-ignore-revs
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/38336>
2025-11-12 07:55:36 +00:00
Samuel Pitoiset
0dba538643 radv/meta: fuse depth/stencil aspects copy with the GFX path
Depth/stencil copies on graphics are twice as fast now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38139>
2025-11-12 07:35:33 +00:00
Samuel Pitoiset
9d3dd174b8 radv/meta: rework radv_meta_nir_texel_fetch_build_func
This add a binding parameter that will be used for fused depth/stencil
copies.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38139>
2025-11-12 07:35:33 +00:00
Samuel Pitoiset
332f881375 radv/meta: simplify aspect/formats in radv_gfx_copy_image()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38139>
2025-11-12 07:35:32 +00:00
Samuel Pitoiset
cd59db45f9 radv/meta: simplify radv_gfx_copy_memory_to_image() even more
Selecting formats can be simplified.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38139>
2025-11-12 07:35:32 +00:00
Samuel Pitoiset
ed05c3fc31 radv/meta: remove multiple aspects in radv_gfx_copy_memory_to_image()
Only one aspect at any time is valid.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38139>
2025-11-12 07:35:31 +00:00
Samuel Pitoiset
a1884dc737 radv/meta: remove radv_meta_blit2d_rect
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38139>
2025-11-12 07:35:31 +00:00
Samuel Pitoiset
1319b2bef6 radv/meta: split radv_meta_blit2d() into two separate functions
It's more code but it's definitely easier to read and it will allow us
to do more cleanups/optimizations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38139>
2025-11-12 07:35:30 +00:00
Samuel Pitoiset
bb3f69fefe radv/meta: remove useless blit2d_src_temps
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38139>
2025-11-12 07:35:29 +00:00
Andy Hsu
d226c0d97d u_trace: remove redundant char* to string conversion (v2)
Add the string length parameter to the set_name(),
set_value() function to remove the conversion from
char* to std::string which takes extra work like
calling strlen() to compute the string length.

From the callback sampling in the perfetto tracing,
the ratio of trace_payload_as_extra_intel_end_draw_indexed
to intel_ds_end_draw_indexed drops from 63.80% to 59.65%
with this change.

v2: Add the data of the callback sampling to the description.

Signed-off-by: Andy Hsu <hwandy@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38073>
2025-11-12 06:17:16 +00:00
Aitor Camacho
93460e969e docs,kk: Add KosmicKrisp documentation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Adds build instructions and workarounds documentation.
Workarounds documentation only has the biggest offenders and
there are probably way more in code that need yet to be
documented.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38232>
2025-11-12 04:23:59 +00:00
Faith Ekstrand
f187b537b5 pan: Use nir_lower_point_size for the float16 conversion
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is more robust than smashing the variable to mediump and then
asking for mediump to be lowered later.  It's also faster because it
only involves one compiler pass, not two.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38379>
2025-11-12 01:34:36 +00:00
Faith Ekstrand
6ee4ea5ea3 nir: Add a type parameter to nir_lower_point_size()
On Mali, we need not only clamp but also convert to float16 on Valhall+.
We could have a separate pass for this but it fits in nicely with the
rest of nir_lower_point_size() so we might as well put it there.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38379>
2025-11-12 01:34:36 +00:00
Sviatoslav Peleshko
5af8abbf8b driconf: Add vertex_program_default_out option for Penumbra: Overture
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Penumbra's vertex program Diffuse_EnvMap_Reflect_vp.cg produces 3-component
texture coordinates and primitive colors while using the FF fragment
program. Add this WA to fix the misrenderings.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14170
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38295>
2025-11-11 22:16:46 +00:00
Sviatoslav Peleshko
f03432c81a mesa,driconf: Add WA to initialize vertex program outputs to vec4(0,0,0,1)
Per ARB_vertex_program spec result registers are 4-component and initially
undefined, and the FF fragment program expects its intputs to be
4-component too. So, if the client's vertex program does not write the
whole vector it will cause misrenderings unless the same client also
supplies fragment program that expects less than 4 componens.

This commit adds a workaround that initializes results to vec4(0, 0, 0, 1)
which seems to be an expected behavior for such clients.

Cc: mesa-stable
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38295>
2025-11-11 22:16:46 +00:00
Eric Engestrom
f30e5ff44b ci: uprev vkd3d
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
03cca4cd97...4acd227131

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38370>
2025-11-11 20:15:21 +00:00
Faith Ekstrand
51a68ecc87 panvk: Optimize in the preprocess hook
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
NIR is actually pretty good at optimizing UBO, SSBO, and shared memory
access but in order to do so, we actually have to run the optimizations
before we lower it all.  Same for I/O.  By doing all our lowering in
panvk before we ever run the optimization loop, we risk hampering it
significantly.

Ignoring loop changes (several get unrolled now), fossil-db on Sascha
Willems demos and a few others looks lik

    Instrs: 189054 -> 187802 (-0.66%); split: -0.67%, +0.01%
    CodeSize: 1756160 -> 1747072 (-0.52%); split: -0.52%, +0.01%
    Estimated normalized CVT cycles: 771.367106999997 -> 766.0311719999971 (-0.69%); split: -1.05%, +0.36%
    Estimated normalized SFU cycles: 1407.21875 -> 1406.9375 (-0.02%); split: -0.03%, +0.01%
    Estimated normalized Load/Store cycles: 17477.0 -> 16917.0 (-3.20%)
    Maximum number of threads: 1257 -> 1213 (-3.50%); split: +0.08%, -3.58%
    Number of hardware loops: 283 -> 278 (-1.77%)

    Totals from 186 (19.81% of 939) affected shaders:
    Instrs: 102588 -> 101336 (-1.22%); split: -1.23%, +0.01%
    CodeSize: 834432 -> 825344 (-1.09%); split: -1.10%, +0.02%
    Estimated normalized CVT cycles: 463.226562 -> 457.890627 (-1.15%); split: -1.74%, +0.59%
    Estimated normalized SFU cycles: 1021.84375 -> 1021.5625 (-0.03%); split: -0.05%, +0.02%
    Estimated normalized Load/Store cycles: 8425.0 -> 7865.0 (-6.65%)
    Maximum number of threads: 334 -> 290 (-13.17%); split: +0.30%, -13.47%
    Number of hardware loops: 63 -> 58 (-7.94%)

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayern@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38334>
2025-11-11 17:38:36 +00:00
Faith Ekstrand
1a9c7f8c8a panvk: Only lower outputs to temporaries
We need to lower outputs to get rid of output reads and so that we can
fix up layer writes on Bifrost.  However, there's really no point in
lowering reads besides moving them to the top.  Even then, NIR can
probably copy propagate the copies and we'll end up reading straight
from the input variable anyway.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayern@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38334>
2025-11-11 17:38:36 +00:00
Faith Ekstrand
a8b6213983 panvk: Lower copy_deref and indirect derefs before nir_lower_io
Neither nir_lower_io() nor nir_lower_indirect_derefs() know what to do
with copy_deref so we need to get rid of those first.  Also, there are
some NIR passes which can insert more copy_deref or propagate an
indirect load to the I/O variable so we want to lower those away right
before lowering I/O.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayern@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38334>
2025-11-11 17:38:36 +00:00
Faith Ekstrand
d6dc0ea5ae panvk: Split var copies and lower local vars early
These two passes are a prerequisite for basically anything that
optimizes on variables.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayern@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38334>
2025-11-11 17:38:36 +00:00
Faith Ekstrand
586e1ac2b8 pan/compiler: Expose the bifrost optimization loop
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayern@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38334>
2025-11-11 17:38:36 +00:00
Faith Ekstrand
0e9fcb33c3 nir: Add a couple panfrost sysvals to divergence analysis
Fixes: 2af6e4beeb ("pan: Don't pretend we support load_{vertex_id_zero_base,first_vertex}")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayern@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38334>
2025-11-11 17:38:36 +00:00
Daniel Schürmann
5682e39e6b amd: enable load/store_shared2_amd for GFX6
Totals from 1509 (2.43% of 62200) affected shaders: (Pitcairn)

MaxWaves: 8078 -> 8057 (-0.26%); split: +0.09%, -0.35%
Instrs: 977182 -> 951746 (-2.60%); split: -2.62%, +0.02%
CodeSize: 4951468 -> 4758192 (-3.90%); split: -3.92%, +0.01%
SGPRs: 76704 -> 76696 (-0.01%)
VGPRs: 81092 -> 81068 (-0.03%); split: -0.34%, +0.31%
Latency: 11663237 -> 11526070 (-1.18%); split: -1.19%, +0.01%
InvThroughput: 6198904 -> 6114851 (-1.36%); split: -1.43%, +0.07%
VClause: 26656 -> 26655 (-0.00%); split: -0.05%, +0.05%
SClause: 22304 -> 22307 (+0.01%); split: -0.03%, +0.04%
Copies: 107503 -> 109564 (+1.92%); split: -0.23%, +2.15%
Branches: 22917 -> 22918 (+0.00%)
PreSGPRs: 42246 -> 42242 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 64561 -> 64761 (+0.31%); split: -0.01%, +0.32%
VALU: 600285 -> 601139 (+0.14%); split: -0.26%, +0.40%
SALU: 130622 -> 130851 (+0.18%); split: -0.16%, +0.33%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37682>
2025-11-11 17:12:17 +00:00
Daniel Schürmann
9abbcbc00e nir/opt_load_store_vectorize: don't add negative offsets to load/store_shared2_amd
By hoisting the low address instead, we can make use of these instructions on GFX6.

Totals from 3 (0.00% of 79839) affected shaders: (Navi48)

Instrs: 3768 -> 3776 (+0.21%); split: -0.03%, +0.24%
CodeSize: 20024 -> 20048 (+0.12%); split: -0.04%, +0.16%
Latency: 16093 -> 16198 (+0.65%)
InvThroughput: 3868 -> 3864 (-0.10%)
VClause: 97 -> 93 (-4.12%)
VALU: 2333 -> 2331 (-0.09%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37682>
2025-11-11 17:12:15 +00:00
Christian Gmeiner
688718be8b mesa: OES_texture_stencil8 requries OpenGL ES 3.1
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: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38360>
2025-11-11 15:59:06 +00:00
Valentine Burley
02986c9cec ci/lava: Use a660_zap.mbn from linux-firmware
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is now available in linux-firmware, so we can update the
gfx-ci/firmware archive to include the zap shader for a660 instead of
manually injecting it in LAVA.

e16373de80
6bff1a1967

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38368>
2025-11-11 13:16:18 +00:00
Tapani Pälli
12b2476b40 anv: throw anv_finishme warnings only on debug builds
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14259
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38369>
2025-11-11 12:51:32 +00:00
Samuel Pitoiset
0d9d45db4e radv: add vk_wsi_disable_unordered_submits and enable for GTK
GTK is missing a semaphore between QueueSubmit() and QueuePresent()
causing the WSI submit to be "unordered" and to immediately signal the
semaphores (because it's missing a wait semaphore in QueuePresent()).

The workaround is to disable unordered WSI submits until GTK fixes it
properly.

Cc: "25.3"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14087
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38351>
2025-11-11 12:13:41 +00:00
Daniel Schürmann
668259ef0b aco/scheduler: move clauses through RAR dependencies
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For simplicity, we limit this feature to only one RAR-dependency per clause.
This allows to quickly correct the register demand changes that occur by
switching the kill flags.

Totals from 5861 (7.34% of 79839) affected shaders: (Navi48)
Instrs: 4891340 -> 4883789 (-0.15%); split: -0.21%, +0.06%
CodeSize: 25556612 -> 25527244 (-0.11%); split: -0.16%, +0.05%
VGPRs: 347044 -> 347140 (+0.03%); split: -0.13%, +0.16%
Latency: 32697095 -> 32642428 (-0.17%); split: -0.25%, +0.08%
InvThroughput: 4975909 -> 4975086 (-0.02%); split: -0.06%, +0.05%
VClause: 102152 -> 93852 (-8.13%); split: -8.22%, +0.10%
SClause: 101232 -> 101205 (-0.03%); split: -0.03%, +0.00%
Copies: 305189 -> 305651 (+0.15%); split: -0.56%, +0.71%
Branches: 87032 -> 87045 (+0.01%); split: -0.00%, +0.02%
VALU: 2776634 -> 2777097 (+0.02%); split: -0.06%, +0.08%
SALU: 662066 -> 660379 (-0.25%); split: -0.26%, +0.01%
VOPD: 4801 -> 4800 (-0.02%); split: +1.21%, -1.23%

Totals from 5680 (7.12% of 79825) affected shaders: (Vangogh)
MaxWaves: 111282 -> 111290 (+0.01%)
Instrs: 4955907 -> 4950709 (-0.10%); split: -0.15%, +0.04%
CodeSize: 26026264 -> 26014272 (-0.05%); split: -0.10%, +0.05%
VGPRs: 320784 -> 320776 (-0.00%); split: -0.03%, +0.03%
Latency: 35645457 -> 35584438 (-0.17%); split: -0.32%, +0.15%
InvThroughput: 8233912 -> 8236524 (+0.03%); split: -0.10%, +0.13%
VClause: 107017 -> 96804 (-9.54%); split: -9.69%, +0.15%
SClause: 98633 -> 98592 (-0.04%); split: -0.05%, +0.01%
Copies: 394041 -> 393584 (-0.12%); split: -0.52%, +0.40%
Branches: 120235 -> 120231 (-0.00%); split: -0.02%, +0.01%
VALU: 3183571 -> 3183114 (-0.01%); split: -0.06%, +0.05%
SALU: 735546 -> 734143 (-0.19%); split: -0.20%, +0.01%

Totals from 2507 (3.96% of 63370) affected shaders: (Vega10)

MaxWaves: 13643 -> 13637 (-0.04%)
Instrs: 1496453 -> 1496135 (-0.02%); split: -0.11%, +0.09%
CodeSize: 7777880 -> 7776608 (-0.02%); split: -0.09%, +0.07%
VGPRs: 134164 -> 134104 (-0.04%); split: -0.11%, +0.07%
Latency: 17465181 -> 17483075 (+0.10%); split: -0.36%, +0.47%
InvThroughput: 8830470 -> 8851751 (+0.24%); split: -0.09%, +0.33%
VClause: 42012 -> 38825 (-7.59%); split: -8.00%, +0.42%
SClause: 34586 -> 34549 (-0.11%); split: -0.12%, +0.01%
Copies: 137896 -> 137668 (-0.17%); split: -0.86%, +0.69%
VALU: 1092468 -> 1092240 (-0.02%); split: -0.11%, +0.09%
SALU: 132956 -> 132569 (-0.29%); split: -0.34%, +0.05%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38135>
2025-11-11 11:31:52 +00:00
Daniel Schürmann
65ba8a0e8b aco/scheduler: refactor downwards dependency check
We can also ignore killed operands when checking for RAR dependencies
as these cannot appear later anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38135>
2025-11-11 11:31:52 +00:00
Daniel Schürmann
ce3cc03153 aco/scheduler: use hashmap for RAR_dependencies
Store information about the (relative) position of the RAR dependency.
This will allow to correct for register-demand changes when scheduling across.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38135>
2025-11-11 11:31:52 +00:00
Daniel Schürmann
6c0dd8164f aco/scheduler: remove MoveState::RAR_dependencies_clause
Since moving clauses as batch, this can easily be derived from RAR_dependencies.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38135>
2025-11-11 11:31:52 +00:00
Daniel Schürmann
5ef47ba231 aco/scheduler: assert that the register demand stays within pre-determined bounds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38135>
2025-11-11 11:31:52 +00:00
Daniel Schürmann
82ba730994 aco/scheduler: remove unused include
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38135>
2025-11-11 11:31:51 +00:00
Kenneth Graunke
9ffae42975 brw: Store brw_urb_inst::offset in bytes on Xe2
Xe2 uses byte offsets rather than OWord offsets.  We've been storing the
per-slot offsets in bytes on Xe2 for a while, but kept the global offset
immediate in OWords for some reason, choosing to lower it during logical
send lowering.

This patch makes both offsets (global immediate, per-slot) in the same
units, so they could be added together if necessary without scaling.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38343>
2025-11-11 10:55:44 +00:00
Kenneth Graunke
cde3a34a43 brw: Use nir_intrinsic_[set_]base rather than poking at const_index[0]
Much clearer, especially since we're dealing with at least four
different kinds of intrinsics.  These helpers were introduced years ago,
but probably didn't exist when we first wrote this code.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38343>
2025-11-11 10:55:43 +00:00
Kenneth Graunke
439c156831 brw: Add an assertion that writemasks can be fully ignored
I noticed that our backend was completely ignoring writemasks, despite
them appearing on many of the intrinsics we're implementing.

Rhys Perry pointed out that nir_lower_mem_access_bitsizes is removing
all non-trivial writemasking today, so ssbo/global/shared/scratch/etc.
stores should only ever see all components enabled.  Which means what
we're doing is legitimate, if non-obvious.  Add an assert to make it
obvious.

Thanks a lot to Rhys for helping me rediscover what made this work.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38343>
2025-11-11 10:55:42 +00:00
Kenneth Graunke
6151eb4372 nir: Drop writemask from all Intel memory store intrinsics
The backend has been fully ignoring all writemasks for a long time,
so it really doesn't make sense to have them on our custom intrinsics.

I'm not sure they even make sense for some of the block intrinsics.

Also, the store_ssbo -> store_ssbo_intel pass was not setting writemask
at all, leaving it at the default value of 0 (aka write nothing, if it
had been respected...)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38343>
2025-11-11 10:55:41 +00:00
Roland Scheidegger
d6fd8b4201 llvmpipe: do bounds checking for shared memory
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Just compare against the size that was declared.
This is probably overkill. I couldn't figure out what vulkan says wrt
OOB access of shared memory. D3D however (which is very strict about
these things) says that for TGSM writes the entire contents of the TGSM
becomes undefined, for reads the result is undefined. Hence, rather
than masking out such accesses, to avoid the segfaults it would be
enough to just clamp the offsets to valid values.
nir doesn't seem easily able to tell us if an access is guaranteed
in-bound (unlike for ssbo access), so assume always potentially OOB.

v2: fix rusticl - for cl we don't know the shared size at compilation
time, this is only provided at launch_grid() time, the nir shader info
shared_size might be zero. Hence pass through the size via cs jit
context, there already actually was a member in there which looks
like it was intended for that (interestingly enough, the cs jit context
was actually unused, since resources are passed elsewhere nowadays).

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38307>
2025-11-11 09:28:30 +00:00
Erik Faye-Lund
4490275332 pvr: rework pds_state array length logic
This attempts to avoid needing hwdefs in headers. It's not perfect, but
hopefully a step in the right direction.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:14 +01:00
Erik Faye-Lund
1eab712245 pvr: move static_asserts to source-files
This avoids needless dependencies on HW-defs in header files.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:14 +01:00
Erik Faye-Lund
b2b8ec1a4c pvr: move non-rogue helpers to pvr_hw_utils.h
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:14 +01:00
Erik Faye-Lund
02b5e78f0d pvr: rename rogue_get_slc_cache_line_size
This isn't really rogue-specific, so let's rename it to not cause any
confusion.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:14 +01:00
Erik Faye-Lund
e7fb4a9948 pvr: factor out pvr_sampler
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:14 +01:00
Erik Faye-Lund
cf08978985 pvr: break out pvr_instance and pvr_physical_device
These files shouldn't not be per-arch, so break them out to their own
modules before we start making things multi-arch.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:11 +01:00
Erik Faye-Lund
4d0ab70caa pvr: move queue function to pvr_queue.c
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:11 +01:00
Erik Faye-Lund
5e400e7449 pvr: remove needless include
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:11 +01:00
Erik Faye-Lund
428fadd71f pvr: remove unused macros
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
2025-11-11 10:13:11 +01:00
Tapani Pälli
2741ddd75a anv: fix issues found with indirect data stride
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Use tristate for the aligned setting, otherwise it is always
first disabled which contributes to the condition if we set the
new stride active.

v2: set ByteStride in dword units and take secondary cmdbuf
    in to account (Lionel)

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38349>
2025-11-11 05:05:43 +00:00
Alyssa Rosenzweig
997b3ebbdb poly: fix cull distance
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
More fallout from strict NIR validation but easy to fix. I hit this when
attempting to CTS changes for parent_instr.

Closes: #14245
Fixes: 2f6b4803ab ("nir/validate: expand IO intrinsic validation with nir_io_semantics")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38356>
2025-11-11 01:34:24 +00:00
Christian Gmeiner
9c31b9b342 etnaviv: blt: Add Z16_UNORM format translation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Passes dEQP-GLES3.functional.fbo.msaa.4_samples.depth_component16

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38362>
2025-11-11 00:30:21 +01:00
Christian Gmeiner
0ca826692a etnaviv: blt: Add S8_UINT_Z24_UNORM format translation
Passes dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_color

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38361>
2025-11-10 23:59:18 +01:00
Timothy Arceri
595a2fdbd2 glsl: assign block indices in the order they appear
The hash lookup should be negligible. This makes things
predictable rather than having hash table modifications causing
the order to change, and fixes things for some seemingly buggy games.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13802
Fixes: be5a15f11d ("util/hash_table: start with 16 entries to reduce reallocations")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38300>
2025-11-10 21:52:25 +00:00
Iván Briano
aa97c23484 brw: shut -Wmaybe-uninitialized up
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Release builds are noisy about flush_type and scope being used
uninitialized, even though they are always set.
Initialize them to the final else values to make GCC happy.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38357>
2025-11-10 21:06:50 +00:00
Aitor Camacho
f458825d95 kk: Force vertex attribute rebinding when pipeline changes
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38325>
2025-11-10 20:50:54 +00:00
Sagar Ghuge
16f66ffe55 intel/common: Consider 0 threads while setting TG
In ray tracing dispatch, we have dispatch.threads set to 0 since we
calculate the local_size_x/y/z based on the launch sizes.

This change takes 0 threads into an account and returh the TG size 8 in
such scenarios. Before this change, we were setting TG size to 2.

Fixes: 0c4e1c9efc ("intel/common: Add helper for compute thread group dispatch size")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38229>
2025-11-10 12:09:30 -08:00
Samuel Pitoiset
6929333b0f ac/surface: ban 256KB swizzle modes for non-MSAA images on GFX11+
This seems to hurt more than it helps and AMD drivers also disable
256 KB for non-MSAA.

While we are at it, remove an useless check about GFX12 APUs because
they don't exist.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14237
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38219>
2025-11-10 19:29:22 +00:00
Georg Lehmann
9ef0c96f26 nir/opt_algebraic: optimize open coded pack_32_2x16
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 4 (0.00% of 80287) affected shaders:
Instrs: 6231 -> 6101 (-2.09%)
CodeSize: 35916 -> 35156 (-2.12%)
Latency: 72190 -> 71317 (-1.21%)
InvThroughput: 20817 -> 19962 (-4.11%)
VALU: 3145 -> 3029 (-3.69%)
VOPD: 310 -> 312 (+0.65%)

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37937>
2025-11-10 19:04:32 +00:00
Ian Romanick
d9bed33c11 nir/opt_if: Both parts of logic-joined conditions can be evaluated
For cases like 'if (X && Y)', both X and Y must be true in the then
branch. Their values are unknown in the else branch. Similarly, 'if (X
|| Y)' must have both X and Y false in the else branch.

The shader-db results are pretty bad, especially on Skylake. Ouch. The
fossil-db results are good enough that they make up for it.

v2: s/alu/alu_src/ in nir_src_parent_instr(use_src) !=
&alu_src->instr. Noticed by Rhys.

shader-db:

Lunar Lake
total instructions in shared programs: 17203905 -> 17196251 (-0.04%)
instructions in affected programs: 668828 -> 661174 (-1.14%)
helped: 352 / HURT: 2

total cycles in shared programs: 879896264 -> 888462774 (0.97%)
cycles in affected programs: 330523984 -> 339090494 (2.59%)
helped: 187 / HURT: 167

total spills in shared programs: 3318 -> 3329 (0.33%)
spills in affected programs: 4 -> 15 (275.00%)
helped: 0 / HURT: 4

total fills in shared programs: 1903 -> 1917 (0.74%)
fills in affected programs: 7 -> 21 (200.00%)
helped: 0 / HURT: 4

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total instructions in shared programs: 19969129 -> 19961439 (-0.04%)
instructions in affected programs: 665860 -> 658170 (-1.15%)
helped: 354 / HURT: 0

total cycles in shared programs: 884509249 -> 887353784 (0.32%)
cycles in affected programs: 323242817 -> 326087352 (0.88%)
helped: 208 / HURT: 146

total spills in shared programs: 4801 -> 4808 (0.15%)
spills in affected programs: 14 -> 21 (50.00%)
helped: 0 / HURT: 6

total fills in shared programs: 4454 -> 4467 (0.29%)
fills in affected programs: 17 -> 30 (76.47%)
helped: 0 / HURT: 6

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
total instructions in shared programs: 19913774 -> 19906147 (-0.04%)
instructions in affected programs: 667348 -> 659721 (-1.14%)
helped: 351 / HURT: 3

total cycles in shared programs: 861253468 -> 864535803 (0.38%)
cycles in affected programs: 325577148 -> 328859483 (1.01%)
helped: 180 / HURT: 174

total spills in shared programs: 3440 -> 3455 (0.44%)
spills in affected programs: 18 -> 33 (83.33%)
helped: 0 / HURT: 8

total fills in shared programs: 1946 -> 1961 (0.77%)
fills in affected programs: 18 -> 33 (83.33%)
helped: 0 / HURT: 8

Skylake
total instructions in shared programs: 19031768 -> 19023604 (-0.04%)
instructions in affected programs: 671633 -> 663469 (-1.22%)
helped: 347 / HURT: 7

total cycles in shared programs: 868474831 -> 868132073 (-0.04%)
cycles in affected programs: 320499758 -> 320157000 (-0.11%)
helped: 246 / HURT: 108

total spills in shared programs: 4024 -> 4063 (0.97%)
spills in affected programs: 28 -> 67 (139.29%)
helped: 0 / HURT: 18

total fills in shared programs: 3722 -> 3746 (0.64%)
fills in affected programs: 34 -> 58 (70.59%)
helped: 0 / HURT: 18

fossil-db:

Lunar Lake
Totals:
Instrs: 928574038 -> 928568364 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 40916656 -> 40916672 (+0.00%)
Send messages: 41467974 -> 41467909 (-0.00%); split: -0.00%, +0.00%
Loop count: 970202 -> 970191 (-0.00%)
Cycle count: 106297789925 -> 106301305901 (+0.00%); split: -0.00%, +0.01%
Spill count: 3424464 -> 3424452 (-0.00%); split: -0.00%, +0.00%
Fill count: 6525458 -> 6525119 (-0.01%); split: -0.01%, +0.00%
Max live registers: 193525368 -> 193524886 (-0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 232027347 -> 232026610 (-0.00%); split: -0.00%, +0.00%

Totals from 1130 (0.06% of 2018793) affected shaders:
Instrs: 2662692 -> 2657018 (-0.21%); split: -0.27%, +0.06%
Subgroup size: 16 -> 32 (+100.00%)
Send messages: 112689 -> 112624 (-0.06%); split: -0.07%, +0.01%
Loop count: 5723 -> 5712 (-0.19%)
Cycle count: 1176696438 -> 1180212414 (+0.30%); split: -0.33%, +0.63%
Spill count: 9895 -> 9883 (-0.12%); split: -0.13%, +0.01%
Fill count: 26892 -> 26553 (-1.26%); split: -1.26%, +0.00%
Max live registers: 215462 -> 214980 (-0.22%); split: -0.30%, +0.08%
Non SSA regs after NIR: 398940 -> 398203 (-0.18%); split: -0.21%, +0.03%

Meteor Lake, DG2, Tiger Lake, Ice Lake, and Skylake had similar results. (Meteor Lake shown)
Totals:
Instrs: 1000318839 -> 1000314218 (-0.00%); split: -0.00%, +0.00%
Send messages: 45548952 -> 45548887 (-0.00%); split: -0.00%, +0.00%
Loop count: 1026441 -> 1026430 (-0.00%)
Cycle count: 92411461807 -> 92395024225 (-0.02%); split: -0.02%, +0.00%
Spill count: 3665265 -> 3665221 (-0.00%); split: -0.00%, +0.00%
Fill count: 6504830 -> 6504801 (-0.00%); split: -0.00%, +0.00%
Max live registers: 121790079 -> 121789811 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 38062488 -> 38062648 (+0.00%)
Non SSA regs after NIR: 256900770 -> 256900038 (-0.00%); split: -0.00%, +0.00%

Totals from 1124 (0.05% of 2284852) affected shaders:
Instrs: 2724110 -> 2719489 (-0.17%); split: -0.24%, +0.07%
Send messages: 112096 -> 112031 (-0.06%); split: -0.07%, +0.01%
Loop count: 5697 -> 5686 (-0.19%)
Cycle count: 960659254 -> 944221672 (-1.71%); split: -1.91%, +0.20%
Spill count: 13791 -> 13747 (-0.32%); split: -0.40%, +0.08%
Fill count: 43216 -> 43187 (-0.07%); split: -0.14%, +0.08%
Max live registers: 114877 -> 114609 (-0.23%); split: -0.31%, +0.07%
Max dispatch width: 12768 -> 12928 (+1.25%)
Non SSA regs after NIR: 412320 -> 411588 (-0.18%); split: -0.20%, +0.03%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38321>
2025-11-10 18:30:42 +00:00
Ian Romanick
3e0c9ad316 nir/opt_if: Conditionally do not propagate constants through bcsel
In some cases propagating through a bcsel may be harmful. If the bcsel
uses are unlikely to be eliminated in both branch of an if statement,
propagating through it may result in extra moves for phi instructions
and extended live ranges.

v2: Fix missing parameter in call. Noticed by Rhys. I fixed this on the
test machine, but I must have forgotten to propagate the change back to
my dev machine.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38321>
2025-11-10 18:30:41 +00:00
Ian Romanick
a3b6d05a3b nir/opt_if: Specify which branches are valid for evaluate_if_condition
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38321>
2025-11-10 18:30:41 +00:00
Marek Olšák
0216f09e45 nir/lower_interpolation: check IO location correctly
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Vangogh timed out.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38337>
2025-11-10 16:44:36 +00:00
Sergi Blanch Torne
9e63a8a5d0 Revert "ci: disable Collabora's farm due to maintenance"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit a21cd9d60c.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38344>
2025-11-10 14:24:01 +00:00
Ahmed Hesham
6901bb0c6c panfrost/lima/panvk: Define a common vendor ID
Rusticl reports `CL_DEVICE_VENDOR_ID` using the `vendor_id` property
defined in Panfrost. The value is not set so a `0` is reported
instead.

Initialise the value to `0x13B5`, which is Arm's PCI vendor ID.

Add the definition in `lib/pan_props.h` so it can be shared with
Gallium Lima, Panfrost and PanVK.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38283>
2025-11-10 14:01:40 +00:00
Valentine Burley
e91832739b venus/ci: Add missing Collabora farm rules to ANV jobs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38348>
2025-11-10 12:47:26 +00:00
Patrick Lerda
ae049f6fea r600: limit pre-evergreen predicate ready size
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
With the current stack configuration the rv770 seems to be unable
to go beyond three with the "vs-output-array-float-index-wr-before-gs.shader_test"
test. Anyway, the value four seems to be sufficient for the other tests.

This issue was triggered on rv770, for instance, with:
"piglit/bin/shader_runner tests/spec/glsl-1.50/execution/variable-indexing/gs-output-array-float-index-wr.shader_test -auto -fbo"
"piglit/bin/shader_runner tests/spec/glsl-1.50/execution/variable-indexing/vs-output-array-float-index-wr-before-gs.shader_test -auto -fbo"

Fixes: 713edb5998 ("r600/sfn: handle the IF predicate in the scheduler")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38213>
2025-11-10 12:25:38 +00:00
Karol Herbst
92a4ae0ab2 rusticl/spirv: preserve signed zeroes by default
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38327>
2025-11-10 10:52:56 +00:00
Karol Herbst
df344f12cc rusticl/kernel: take no kernel_info reference inside the launch closure
Otherwise patterns like this wouldn't work:

clCreateKernel(prog)
clEnqueueNDRangeKernel
clReleaseKernel
clBuildProgram(prog)

Fixes: bb2453c649 ("rusticl/kernel: move most of the code in launch inside the closure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38327>
2025-11-10 10:52:56 +00:00
Karol Herbst
c0f0baeaca rusticl/queue: fix error code for invalid sampler kernel arg
Fixes: 5795ee0e08 ("rusticl: translate spirv to nir and first steps to kernel arg handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38327>
2025-11-10 10:52:56 +00:00
Karol Herbst
e98abe35c0 rusticl/queue: fix error code for invalid queue properties part 2
Fixes: 2c202eb787 ("rusticl: verify validity of property names and values")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38327>
2025-11-10 10:52:56 +00:00
Karol Herbst
e83400cab2 rusticl/queue: fix error code for invalid queue properties part 1
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38327>
2025-11-10 10:52:56 +00:00
Lucas Fryzek
a824754de0 lvp: Enable VK_FORMAT_R4G4B4A4_UNORM_PACK16
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36558>
2025-11-10 10:10:07 +00:00
Eric Engestrom
f689322d27 ci: track src/android_stub/ changes
Fixes: 932f51d593 ("ci: Include enough Android headers to let us compile test EGL")
Suggested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38346>
2025-11-10 09:27:07 +00:00
Eric Engestrom
2ec3e536fd ci: track src/c11/ changes
It's used by mesa_util, so let's just consider changes to it can affect
any job.

Fixes: b2ddec4e98 ("c11: Implement c11/time.h with c11/impl/time.c")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38346>
2025-11-10 09:27:07 +00:00
Erik Faye-Lund
d607082b90 radeonsi/ci: document flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38345>
2025-11-10 09:13:07 +00:00
Lionel Landwerlin
c478b6355a anv/blorp/iris: rework Wa_14025112257
Drivers already have to track this workaround, so remove the logic
from Blorp and let the driver manage this.

Also in Anv don't accumulate this workaround, emit it directly in
place right after COMPUTE_WALKER. Accumulating can be problematic when
you want to dispatch concurrent compute shaders that do not need any
cache flush interaction (typical example with the internal
simple_shader framework).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3e0ad0176b ("anv: Emit state cache invalidation after every compute dispatch")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38306>
2025-11-10 08:57:06 +00:00
Christian Gmeiner
0c31313b6e etnaviv: Disable trilinear filtering for shadow samplers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The Vivante GPUs have a hardware bug where trilinear filtering
(MIP=LINEAR) produces incorrect results when used with depth/stencil
textures that have shadow comparison enabled, leading to GPU hangs.

Work around this by forcing MIP=NEAREST for depth/stencil formats,
downgrading from trilinear to bilinear filtering as done by binary blob
too.

Fixes dEQP-GLES3.functional.texture.shadow.*.linear_mipmap_linear.*
except DEPTH32F ones on all GPUs I have access to.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38308>
2025-11-10 08:20:53 +00:00
Sergi Blanch Torne
a21cd9d60c ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-11-10 08:00 UTC
* End: 2025-11-10 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37938>
2025-11-10 07:09:36 +00:00
spencer-lunarg
f8e5e7cd7d lavapipe: Fix crash when using zero queues
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When using VK_KHR_maintenance9 the user can pass a null pointer
to VkDeviceQueueCreateInfo and we will create a dummy queue for
them.

Tested with new dEQP-VK.pipeline.no_queues.*
https://gerrit.khronos.org/c/vk-gl-cts/+/18717

Signed-off-by: spencer-lunarg <spencer@lunarg.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38288>
2025-11-10 02:10:43 +00:00
Dave Airlie
179e744f75 c11/threads: fix build on c23
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
C23/glibc is now including once_init in stdlib.h

https://patchwork.sourceware.org/project/glibc/patch/78061085-f04a-0c45-107b-5a8a15521083@redhat.com/#213088

Just fix up our use of it.

Cc: mesa-stable
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38298>
2025-11-10 07:01:50 +10:00
Vinson Lee
1889f1a779 gfxstream: Fix GfxStreamVulkanMapper.cpp build error
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
../src/gfxstream/guest/platform/kumquat/vulkan-mapper/GfxStreamVulkanMapper.cpp: In static member function ‘static GfxStreamVulkanMapper* GfxStreamVulkanMapper::getInstance(std::optional<DeviceId>)’:
../src/gfxstream/guest/platform/kumquat/vulkan-mapper/GfxStreamVulkanMapper.cpp:208:30: error: ‘os_get_option’ was not declared in this scope
  208 |         const char* driver = os_get_option(VK_ICD_FILENAMES);
      |

Fixes: 222b85328e ("mesa: replace most occurrences of getenv() with os_get_option()")
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/38331>
2025-11-09 03:10:37 +00:00
Yiwei Zhang
894c47e384 pps/meson: minor refactor for pps_deps
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38332>
2025-11-08 18:39:00 -08:00
Yiwei Zhang
07a182a4bc pps/meson: amend missing util deps for os_get_option usage
..otherwise -Dperfetto=true fails to build

Fixes: 222b85328e ("mesa: replace most occurrences of getenv() with os_get_option()")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38332>
2025-11-08 18:38:52 -08:00
Karol Herbst
87550fc657 st/interop: fix fence leak
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14050
Fixes: 1396dc1c38 ("mesa/st, dri2, wgl, glx: Modify flush_objects interop func to export a fence_fd")
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38310>
2025-11-08 18:22:41 +00:00
Mel Henning
6e936ebc9c docs/nvk: Fix description of supported GPUs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This description was incorrect in that it impiled we supported Hopper
and Blackwell A, which is not currently the case (see nvk_is_conformant
in nvk_physical_device.c).

Fixes: edd0cb6d56 ("docs/nvk: Update hardware support")
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38320>
2025-11-08 17:23:58 +00:00
Mel Henning
c33e278fc0 nak/nvdisasm_tests: Skip SM70 on cuda 13
cuda 13 drops support for sm70, including nvdisasm support. This matches
the default sm list to the detected nvdisasm version.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38322>
2025-11-08 17:08:10 +00:00
Mel Henning
31e47c178d nak/nvdisasm_tests: Turn sm_list() into a function
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38322>
2025-11-08 17:08:10 +00:00
Faith Ekstrand
f1cb63a21d nil: Add support for Blackwell 8 and 16-bit modifiers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Backport-to: 25.2
Reviewed-by: James Jones <jajones@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36336>
2025-11-07 23:00:31 +00:00
Faith Ekstrand
3247452b2c drm-uapi: Import the new NVIDIA modifiers
Imported from kernel commit eef295a850820 of drm-misc-fixes

Backport-to: 25.2
Reviewed-by: James Jones <jajones@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36336>
2025-11-07 23:00:31 +00:00
Sagar Ghuge
14194e59a4 anv: Drop unwanted untyped flush for AS query
CmdWriteAccelerationStructuresPropertiesKHR writes the data with MI
commands, we no longer dispatch shaders to write the properties.
As a result, we don't need to flush untyped cache.

Fixes: f0e18c475b ("intel: remove GRL/intel-clc")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38291>
2025-11-07 22:04:25 +00:00
Ian Romanick
4687bd43d2 vulkan: Fix incorrect assert
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
You can have a group with 0 shaders in it. See also febe90e109
("vulkan: remove incorrect assert"). Fixes assertion failure while
compiling fossils/q2rtx/q2rtx-rt-pipeline.976f4ab1c0fee975.1.foz on
Intel platforms.

Fixes: e05a9b77b6 ("vulkan/runtime: split rt shaders hashing from compile")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38318>
2025-11-07 21:10:14 +00:00
Benjamin Cheng
82d944b388 radv/video: Fix dummy DPB addresses
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes the VVL PositiveVideoDecodeAV1.* tests, which trigger error
concealment. These DPB addresses would not be normally used, but get
used by the error concealment path.

Fixes: d103b76ad6 ("radv/video: add VK_KHR_video_decode_av1 support.")
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38311>
2025-11-07 18:16:48 +00:00
Danylo Piliaiev
9c4d2a1f51 tu: Add a reason for concurrent binning disablement to RP tracepoint
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38258>
2025-11-07 17:50:03 +00:00
Danylo Piliaiev
6b0df4b01a tu: Add concurrent_binning_barrier tracepoint
Makes easy to spot the synchronization points for CB.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38258>
2025-11-07 17:50:03 +00:00
Dylan Baker
829ff578e4 docs: update calendar for 25.3.0-rc4
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/38309>
2025-11-07 17:44:24 +00:00
Dylan Baker
678827cc43 docs: update calendar for 25.3.0-rc3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38309>
2025-11-07 17:44:24 +00:00
Dylan Baker
e3996c3379 docs: update calendar for 25.3.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38309>
2025-11-07 17:44:23 +00:00
Dylan Baker
8f1e7aaa3c docs: Extend calendar entries for 25.3 by 1 releases.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38309>
2025-11-07 17:44:21 +00:00
Ludvig Lindau
290c830416 pan/v9+: Change texel buffer limits
Increase texel buffer size limit and lower uniform texel buffer
alignment limit.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Ludvig Lindau
4573110e4e pan/v9+: Make texel buffers use BufferDescriptor
Texel buffers are currently described by a TextureDescriptor,which leads
to restrictive limits on size and alignment.
These limits can be avoided by using a BufferDescriptor instead.

This requires first embedding a ConversionDescriptor into some of the
currently empty space of the BufferDescriptor, and modifying the
compiler so that instead of outputting TEX_FETCH, it will:

1. Load the ConversionDescriptor with LD_PKA
2. Get the buffer address with LEA_BUF[_IMM]
3. Use LD_CVT to get the value

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
af28c453ba panvk: Increase maxBufferSize to UINT32_MAX
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
7408a09050 pan/format: Add PAN_BIND_TEXEL_BUFFER
Expands the format table with a dedicated bit for texel buffer use. We
can fit this by setting the size of the hw-field to 21, which is fine as
we never encode more than 21 bits (see MALI_PACK_FMT).

This bit is set for all formats that support PAN_BIND_SAMPLER_VIEW and
PAN_BIND_STORAGE_IMAGE.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
c4ec6ea060 pan/va: Add late lowering passes for texel buffers
Adds a pass that lowers texel buffer accesses for textures/images to use
BufferDescriptors. This needs to be done late in case the resource
indices must be lowered first.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
b3b6fba548 nir: Add pan intrinsics for texel buffer access
Will be used by panfrost to access texel buffers.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Ludvig Lindau
6da1c1d025 pan/genxml: Add ConversionDesc to v9+ BufferDescriptor
Add a field in BufferDescriptor to hold a ConversionDescriptor to
prepare for changing texel buffers to use BufferDescriptor instead of
TextureDescriptor

Also re-orders the descriptor based on word offset where appropriate.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Ludvig Lindau
4a3d5acc1d pan/genxml: Move BufferDescriptor for v9+
This change is required by the next commit.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
dfb6a101f1 pan/genxml: Remove reg_format from v9+ ConversionDesc
The Register Format-field in ConversionDescriptor is not used since v9
and should be left as zero.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Ludvig Lindau
6058cd2dfa pan/va: Add LD_CVT
Adds LD_CVT instruction for loading memory with conversion.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
a9e3b679f1 pan/va: Add LEA_BUF
Adds the non-immediate version of LEA_BUF_IMM.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
68a14e8166 pan/va: Change LEA_BUF_IMM src description
Gives the src for LEA_BUF_IMM a more descriptive name and specifies the
size of the register.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
3e3da8cf82 panfrost: Rename (LD|LEA)_BUFFER to (LD|LEA)_PKA
This aligns with internal naming and removes confusion with
LEA_BUF[_IMM].

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Ludvig Lindau
00b5275fe8 panfrost: Make instrs_equal check res table/index
Add resource table and index check to instruction equality function.
This prevents CSE from mistakenly eliminating LEA_BUF_IMM instructions
that load from different resources, but with the same buffer offset.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
15868cf6e9 pan/format: Disable PAN_BIND_STORAGE_IMAGE for RGBA4/BGRA4
The RGBA4/BGRA4 formats had the PAN_BIND_STORAGE_IMAGE set, but we
cannot support that.

Fixes: d95423686f ("pan/format: Add PAN_BIND_STORAGE_IMAGE flag")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
1e2ca4dad6 pan/format: Fix mapping for I16F
This was mapped to RG16F, while R16F should be correct.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Lars-Ivar Hesselberg Simonsen
89293120f0 panvk: Fix IUB decode
The base address used for bounds checking the entry was wrong. Directly
pass the end_of_entry address instead.

Fixes: db4bcd48d7 ("panvk: Fix IUB decode")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
2025-11-07 17:03:53 +00:00
Faith Ekstrand
35cdddf632 nir: Simplify assign_io_var_locations()
The size and stage parameters are left-overs from history.  Originally,
the function acted on a list and so it needed an explicit stage and size
output.  Now that it takes a NIR shader and a mode, we can just take the
stage from the shader and set num_(in|out)puts.

The one caller that actually used the explicit output parameter was
turnip.  However, given that the helper sorts and re-numbers all the I/O
variables, it's not like changing num_(in|out)puts instead of writing it
to some other location is that big of a deal.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38297>
2025-11-07 16:29:56 +00:00
Lionel Landwerlin
51cfdf3a9d anv: limit maxComputeSharedMemorySize to 48KiB
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38302>
2025-11-07 16:01:58 +00:00
Dave Airlie
04a0d512fa intel/elk: drop a bunch of tables for unused elk gens.
I just saw this flash past in a fedora compile.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38299>
2025-11-07 15:37:54 +00:00
Christian Gmeiner
c346f2b673 util/log: Add MESA_LOG_PREFIX environment variable to control log prefixes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add a new MESA_LOG_PREFIX environment variable that allows fine-grained
control over log prefixes in file logger output on Linux. The variable
accepts a comma-separated list of options:
- "tag": include the tag prefix (e.g., "MESA:")
- "level": include the level prefix (e.g., "info:")

By default, both tag and level are included. Users can customize the
prefix by setting MESA_LOG_PREFIX to any combination (e.g., "tag",
"level", "tag,level", or empty string for no prefix), making the output
more flexible and readable for different use cases.

Other loggers (syslog, Android logcat, Windows debugger) are unaffected
and continue to include tag and level information as appropriate for
their format.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38217>
2025-11-07 13:38:52 +00:00
Pohsiang (John) Hsu
672c26535a mediafoundation: remove unused code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38301>
2025-11-07 13:02:49 +00:00
Pohsiang (John) Hsu
e4630c3567 mediafoundation: remove private CODECAPI_AVEncVideoEnableFramePsnrYuv as this is published
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38301>
2025-11-07 13:02:49 +00:00
Pohsiang (John) Hsu
1528a88643 mediafoundation: periodic clang-format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38301>
2025-11-07 13:02:48 +00:00
Eric Engestrom
03aa1e382a lavapipe/ci: mark more tests as flaky
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/38305>
2025-11-07 12:46:08 +00:00
Eric Engestrom
c0044aa8f1 lavapipe/ci: document fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38305>
2025-11-07 12:46:08 +00:00
Lucas Fryzek
4e6120f5af anv: Enable host_image_copy on emulated formats
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37691>
2025-11-07 12:14:31 +00:00
Lucas Fryzek
b558968f8e anv: Implement host_image_copy astc emulation on CPU
Refactor the intermediate buffer copy path to use a generic callback
approach, making the code more maintainable and easier to extend with
new format conversions.

The core copy_intermediate() function is now format-agnostic, accepting
a conversion callback that handles the actual data transformation. This
moves format-specific logic (RGB<->RGBA conversion and ASTC
decompression) into dedicated callback functions, making the conversion
path explicit at each call site rather than hidden inside the copy
function.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37691>
2025-11-07 12:14:31 +00:00
Lucas Fryzek
1c4235b529 anv: For HIC only convert tile worth of memory at a time
Instead of allocating a buffer for the entire RGB->RGBA conversion
process. Just allocate a smaller buffer that is the size of a tile and
do the conversion one tile at a time.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37691>
2025-11-07 12:14:31 +00:00
Lucas Fryzek
06cb90c07c util: Move ASTC unpack routines to common util
Move ASTC decompression code from mesa/main to src/util to make it
available for use by Vulkan drivers. This allows the Intel ANV driver
to use CPU-based ASTC decompression for host image copy operations
on hardware that doesn't natively support ASTC formats.

The _mesa_unpack_astc_2d_ldr() function signature is updated to use
pipe_format instead of mesa_format for better integration with the
util format system.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37691>
2025-11-07 12:14:31 +00:00
Christian Gmeiner
0be53b2ed8 anv: Fix needs_temp_copy() incorrectly matching depth/stencil formats
The needs_temp_copy() function was incorrectly identifying some
depth/stencil formats as needing RGB<->RGBA conversion.

VK_FORMAT_D32_SFLOAT_S8_UINT maps to PIPE_FORMAT_Z32_FLOAT_S8X24_UINT,
which has 3 channels (F32 depth, UP8 stencil, X24 padding). The
component count check (== 3) was matching this as an RGB color format,
causing depth/stencil images to incorrectly use the RGB conversion path.

Add an explicit vk_format_is_depth_or_stencil() check before the
component count test to ensure depth/stencil formats always use the
direct copy path.

Fixes: f97b51186f ("anv: intermediate RGB <-> RGBX copy for HIC")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37691>
2025-11-07 12:14:31 +00:00
Samuel Pitoiset
bbaaf2fec7 radv: move back ac_sqtt_{init,finish}() to the right places
Now that radv/tests no longer create compute pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38285>
2025-11-07 12:19:38 +01:00
Samuel Pitoiset
d371061309 radv/tests: use vkGetPipelineKeyKHR() instead of compiling pipelines
Getting the pipeline key is enough for this set of tests.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38285>
2025-11-07 12:15:38 +01:00
Job Noorman
fda0490784 ir3: enable nir_opt_uub
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Enable nir_opt_uub in ir3_optimize_loop. To make sure we don't interfere
with nir_opt_load_store_vectorize, nir_opt_uub's lowering of imul to
umul_16x16 is only enabled after vectorizing.

Totals from 140908 (9.33% of 1510605) affected shaders:
MaxWaves: 1687210 -> 1713516 (+1.56%); split: +1.59%, -0.03%
Instrs: 118073810 -> 116316350 (-1.49%); split: -1.57%, +0.09%
CodeSize: 252147038 -> 247992436 (-1.65%); split: -1.77%, +0.13%
NOPs: 22177569 -> 22101617 (-0.34%); split: -1.29%, +0.95%
MOVs: 5361215 -> 5246163 (-2.15%); split: -2.86%, +0.72%
COVs: 1728869 -> 1693953 (-2.02%); split: -2.26%, +0.24%
Full: 2083701 -> 2058689 (-1.20%); split: -1.24%, +0.04%
(ss): 3013912 -> 2993026 (-0.69%); split: -1.54%, +0.85%
(sy): 1746154 -> 1711155 (-2.00%); split: -2.45%, +0.45%
(ss)-stall: 10509576 -> 10514455 (+0.05%); split: -0.79%, +0.83%
(sy)-stall: 47895875 -> 47061446 (-1.74%); split: -2.53%, +0.79%
STPs: 213699 -> 213523 (-0.08%); split: -0.12%, +0.03%
LDPs: 77629 -> 77469 (-0.21%); split: -0.32%, +0.11%
Preamble Instrs: 33860856 -> 33320325 (-1.60%); split: -2.03%, +0.43%
Early Preamble: 62136 -> 62115 (-0.03%); split: +0.02%, -0.05%
Constlen: 8306896 -> 8295976 (-0.13%); split: -0.17%, +0.04%
Last helper: 48512847 -> 48446850 (-0.14%); split: -0.34%, +0.20%
Last baryf: 1457776 -> 1454490 (-0.23%); split: -0.51%, +0.29%
Subgroup size: 12116544 -> 12118400 (+0.02%); split: +0.02%, -0.00%
Cat0: 24687449 -> 24577585 (-0.45%); split: -1.27%, +0.82%
Cat1: 7154983 -> 7004889 (-2.10%); split: -2.65%, +0.55%
Cat2: 47291859 -> 46934527 (-0.76%); split: -0.80%, +0.05%
Cat3: 27659651 -> 26640290 (-3.69%); split: -3.69%, +0.00%
Cat5: 3278715 -> 3278703 (-0.00%); split: -0.00%, +0.00%
Cat6: 1672689 -> 1551384 (-7.25%); split: -7.25%, +0.00%
Cat7: 3047494 -> 3048002 (+0.02%); split: -0.44%, +0.45%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37869>
2025-11-07 10:23:32 +00:00
Job Noorman
c17ec6eeb0 ir3: add options parameter to ir3_optimize_loop
The next commit wants to conditionally run some optimizations. This
prepares for that.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37869>
2025-11-07 10:23:32 +00:00
Job Noorman
b36cc29049 ir3: removed unused parameter from ir3_optimize_loop
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37869>
2025-11-07 10:23:30 +00:00
Job Noorman
fd4b483bbc ir3: add support for umul24
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37869>
2025-11-07 10:23:29 +00:00
Job Noorman
3908a228bd nir: add opt_uub pass
Add a pass that uses nir_unsigned_upper_bound to simplify some ALU
operations:
- iand src, mask: if mask is constant with N least significant bits set
  and uub(src) < 2^N, the iand does nothing and can be removed.
- ult src, const: if uub(src) < cmp -> true
- uge src, const: if uub(src) < cmp -> false
- ilt src, const: if uub(src) >= 0 && cmp <  0 -> false
-                 if uub(src) >= 0 && cmp >= 0 -> ult src, const
- ige src, const: if uub(src) >= 0 && cmp <  0 -> true
-                 if uub(src) >= 0 && cmp >= 0 -> uge src, const
- umin src, const: if uub(src) <= const -> src
- umax src, const: if uub(src) <= const -> const
- imin src, const: if uub(src) >= 0 && const <  0 -> const
-                  if uub(src) >= 0 && const >= 0 -> umin src, const
- imax src, const: if uub(src) >= 0 && const <  0 -> src
-                  if uub(src) >= 0 && const >= 0 -> umax src, const
- imul src0, src1: if uub(srci) < UINT16_MAX -> umul_16x16 src0, src1
- imul src0, src1: if uub(srci) < UINT24_MAX -> umul24 src0, src1
- imul src0, src1: if uub(srci) < UINT23_MAX -> imul24 src0, src1

The imul optimization needs to be explicitly enabled using a pass
option. This is useful since 1) most backends don't support umul_16x16,
and 2) some passes (e.g., nir_opt_load_store_vectorize) need to analyze
imuls so lowering them before running such a pass makes their job more
difficult.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37869>
2025-11-07 10:23:29 +00:00
Job Noorman
0b348fb375 nir: add has_umul_16x16 option
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37869>
2025-11-07 10:23:29 +00:00
Mario Kleiner
ba82d36dce wsi/display: Allow atomic modeset for change of Colorspace or HDR poperties
At least some drivers need a full modeset to change the Colorspace
property or to en-/disable HDR mode. E.g., at least amdgpu-kms as
tested under Linux 6.8 on Polaris needs it. Otherwise the atomic
commit for disabling HDR in _wsi_display_cleanup_state() will fail,
and the connector stays stuck in HDR mode after vkDestroySwapchainKHR().

Fixes: 1ed78dd7ec ("wsi/display: Clean up DRM hdr/color state on swapchain destruction")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37880>
2025-11-07 09:50:40 +00:00
Mario Kleiner
19b2e3b81b wsi/display: Initially set default HDR metadata from EDID for HDR modes
For a selected non-default imageColorSpace during swapchain creation,
make sure that proper HDR setup also works even if a client app does not
explicitly call vkSetHdrMetadataEXT() in time.

Assign the EDID provided metadata here, so the 1st atomic commit will
set Colorspace and HDR metadata properties on the connector, to make sure
HDR or other wide color gamut modes get enabled.

Without this, the chain->color_outcome_serial would stay at zero and
the properties would not ever get assigned during drm_atomic_commit(),
leaving HDR disabled on the display sink.

Fixes: 13137393f6 ("wsi/display: Expose HDR10 colorspace based on EDID")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37880>
2025-11-07 09:50:40 +00:00
Mario Kleiner
19dc09aded wsi/display: Accept 0 nits for HDR light level properties for "undefined"
CTA-861-G section 6.9.1 Static Metadata Type 1 declares that zero values
for different groups of HDR Metadata properties are allowed, including
zero nits values for max display mastering luminance, max content light
level, max frame-average light level and min display mastering luminance.

A zero value is meant to be treated by the video sink as "undefined" /
"unknown", and handled accordingly. This is common for dynamically
generated visual content.

Therefore don't assert on some minimum nits level > 0, but only check for
a non-negative level.

Fixes: b4176393a0 ("wsi/display: Implement VK_EXT_hdr_metadata on KHR_display swapchain")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37880>
2025-11-07 09:50:40 +00:00
Benjamin Cheng
3b9e2e9edc radeonsi/vcn: Re-enable AV1 unidir for new FW
The previous bitrate overshoot issue is fixed with new FW.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38287>
2025-11-07 09:18:01 +00:00
David Rosca
a9b2e9e480 radeonsi/vcn: Update spec, slice, quality and deblock params each frame
These params may change every frame, so we need to always send
them to FW, not just in begin session.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38257>
2025-11-07 09:00:17 +00:00
David Rosca
7845ba5a8d radeonsi/vcn: Only allow to enable pre-encode on first frame
The quality level may change every frame, but we can only enable
pre-encode on first frame because it changes context buffer layout
and currently we only allow the context buffer to grow (append recon
pics at the end).

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38257>
2025-11-07 09:00:17 +00:00
David Rosca
b8c317c459 radeonsi/vcn: Drop vcn_enc_2_0 encode() override
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38257>
2025-11-07 09:00:16 +00:00
David Rosca
b2c733d5ad radeonsi/vcn: Remove before_encode() func
This is no-op.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38257>
2025-11-07 09:00:16 +00:00
Valentine Burley
204b83d80f ci: Remove Piglit replayer from test-vk container/rootfs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We've been building the Piglit replayer in the test-vk container/rootfs,
but all trace-replay testing in CI is actually done using the test-gl
rootfs.

Despite the naming, the "gl" and "vk" rootfs variants don't correspond to
the graphics API being tested - just the different sets of tools
bundled.
The required tools for trace replay are already included in the test-gl
rootfs, so there's no need to build or use the test-vk variant for this
purpose.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38282>
2025-11-07 08:22:32 +00:00
spencer-lunarg
41c700fdbf llvmpipe: Remove unnecessary includes
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: spencer-lunarg <spencer@lunarg.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38202>
2025-11-06 22:39:33 +00:00
spencer-lunarg
171581aeae llvmpipe: Remove trailing whitespace
Signed-off-by: spencer-lunarg <spencer@lunarg.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38202>
2025-11-06 22:39:33 +00:00
Alyssa Rosenzweig
af872180e1 agx: use sparse live-sets
fixes O(N^2) memory usage and runtime around liveness/scheduling/spilling/RA,
and proves out the design for the common code sparse bitsets (I did need to make
an adjustment for this - worth the effort).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
2025-11-06 21:34:33 +00:00
Natalie Vock
0cb1fca8fa nir: Use sparse bitset for liveness information
Some shaders, especially RTPSO shaders that have parts of the PSO
inlined, can become absolutely huge. Using a sparse bitset avoids
quadratic complexity in memory consumption for the liveness information.

This reduces peak memory usage in worst-case tests (hammering
compilation of many huge RTPSOs on 32 threads concurrently) by ~60%,
from 43GB to 18GB.

CPU time (seconds) differences for a workload with mostly small shaders:
Difference at 95.0% confidence
        -5.27 +/- 1.08963
        -0.88811% +/- 0.183626%
        (Student's t, pooled s = 0.629735)

Peak resident set usage for the mostly-small workload:
Difference at 95.0% confidence
        30809 +/- 13394.3
        1.59276% +/- 0.69246%
        (Student's t, pooled s = 7741.09)

CPU time for the heavy workload did not show any difference.

Co-authored-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
2025-11-06 21:34:33 +00:00
Natalie Vock
a8b75dd0f4 util: Add sparse bitset data structure
Useful for potentially huge bitsets that are expected to be mostly
filled with zeroes, reducing memory consumption by assuming bits being
zero by default (without wasting memory to store zeroes).

Co-authored-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
2025-11-06 21:34:33 +00:00
Natalie Vock
1920a99115 util/bitset: Wrap __size in braces
Otherwise funny things can happen with the < operator because of
precedence rules.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
2025-11-06 21:34:33 +00:00
Dylan Baker
12e22d5bc1 anv: prevent potential, but unlikely, overflow
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The code in question multiplies `uint32_t`s together and assigns them to
a `uint64_t`. It seems rather unlikely at there would be an overflow,
but we might as well do the cast.

CID: 1649587
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38289>
2025-11-06 21:07:11 +00:00
Dylan Baker
d5199b07d2 anv: assert that we don't overflow
Our exposed limits say we shouldn't be able to, but let's add an assert
in case something changes, and to help Coverity out.

CID: 1662103
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37583>
2025-11-06 20:45:41 +00:00
Danylo Piliaiev
01cbd0f24a tu: Fix renderpass-level tracepoints not showing up in binning
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
They should be cloned not only per-tile but also for binning IB.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38240>
2025-11-06 19:05:49 +00:00
Danylo Piliaiev
c04e375588 tu: Use cmd->rp_trace u_trace for draw calls
Fixes: 707c97f634 ("tu: Add tracepoints around draws, with shader sha1s.")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38240>
2025-11-06 19:05:49 +00:00
Yiwei Zhang
4ec2a921d3 panvk: fix mem alloc size for VkBuffer backed by imported blob AHB
For AHB VkBuffer import, the allocationSize comes from the raw external
AHB props query and it can be larger than the underlying buffer memory
requirement. So we must respect the allocationSize for the actual mem
import to support mapping the whole AHB size, and the dedicated buffer
info has to be stripped to obey the spec.

Test: CtsNativeHardwareTestCases no longer crashes on debug build panvk

Fixes: 66bbd9eec8 ("panvk: implement AHB image deferred init and memory alloc")
Tested-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38274>
2025-11-06 18:26:01 +00:00
Alyssa Rosenzweig
2d98d44e63 brw,elk: drop unused spirv->nir routines
Unused since switching to vtn_bindgen2.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38246>
2025-11-06 17:47:41 +00:00
Emma Anholt
31a4a5ee8c docs: Give more reproducible instructions for how to build the docs.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I routinely don't update the docs because the build (hawkmoth in
particular) is a pain.  The prior instructions almost worked, except that
on Debian you need to use a venv (which is a good idea to do for py3-clang
as well for reproducibility, anyway), and the versions that were listed
didn't actually run any more due to a revoked dependency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38266>
2025-11-06 17:42:45 +00:00
Faith Ekstrand
4909af6bae panvk: Advertise VK_KHR_pipeline_binary
Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/216
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38284>
2025-11-06 11:33:55 -05:00
Faith Ekstrand
acd00c07f6 panvk: Initialize the disk cache earlier
We want to know whether or not we successfully initialized before
filling out physical device properties.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38284>
2025-11-06 11:33:55 -05:00
Aksel Hjerpbakk
bbe6fff677 panvk: include cmd stages for semaphores on submit
CTS regressed due to c2a6fb6419 not considering cmd stages for
signaling and waiting. Before this patch panvk did consider cmd stages,
but not semaphore stage masks.

With this fix we consider both which is what the spec requires

Fixes: c2a6fb6419 ("panvk: cull semaphores in unrelated subqueues")

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38138>
2025-11-06 15:57:22 +00:00
Faith Ekstrand
60ad7e8da2 nvk: Advertise VK_KHR_pipeline_binary
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:29 +00:00
Lionel Landwerlin
21aafaea16 anv: enable KHR_pipeline_binary support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12802
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:29 +00:00
Faith Ekstrand
cb7df84430 vulkan/runtime: Add an environment variable to validate shader binaries
Setting MESA_VK_VALIDATE_SHADER_BINARIES will cause the shader code to
round-trip every shader through [de]serialize and only ever use the
deserialized version.  This catches bugs where the driver may drop
things in the [de]serialization process.  It also deserializes the new
shader again and compares it against the original to ensure that
deserialize -> serialize is idempotent.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:29 +00:00
Faith Ekstrand
59a89cd762 vulkan/runtime: Add a vk_compile_shaders() helper
This is just a wrapper around ops->compile() for now but we'll extend it
in the next commit to add some validation.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:29 +00:00
Lionel Landwerlin
5c47ac640b vulkan/runtime: implement VK_KHR_pipeline_binary
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Co-Authored-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:28 +00:00
Lionel Landwerlin
2e42e03cec vulkan/runtime: track imported stages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:28 +00:00
Lionel Landwerlin
708cc72b11 vulkan/runtime: switch precomp shaders to blake3 hashes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:27 +00:00
Lionel Landwerlin
e9c1947ed6 vulkan/runtime: use only blake3_hash to shader key
To match the VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR of only 32B.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:26 +00:00
Lionel Landwerlin
e05a9b77b6 vulkan/runtime: split rt shaders hashing from compile
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:26 +00:00
Lionel Landwerlin
08ed1c3da2 vulkan/runtime: split graphics shaders hashing from compile
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:25 +00:00
Lionel Landwerlin
b2d6ead1ee vulkan/runtime: split compute shader hashing from compile
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:24 +00:00
Faith Ekstrand
440e71bdbd vulkan/runtime: Add a get_push_range_for_stage() helper
This is already duplicated a few times and we're about to duplicate it
more.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:23 +00:00
Lionel Landwerlin
9a5b0bbba4 vulkan/runtime: use stage flags to track valid stages
We'll want to have only hashes in vk_pipeline_stage so the
vk_pipeline_stage_is_null() helper won't work.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:23 +00:00
Lionel Landwerlin
8e93938c3f vulkan/runtime: keep the set layouts on the stack until pipeline creation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:21 +00:00
Lionel Landwerlin
ab0bcefab1 vulkan/runtime: split precomp shader hashing from precomp loading
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:21 +00:00
Lionel Landwerlin
cbc8ec2cc4 vulkan/runtime: drop blake3 hash on precomp shaders
In order to implement VK_KHR_pipeline_binary, we need to be able to
build hash from pipeline creation structures without looking at the
cache.

The blake3 hash on precomp shaders prevents that as its loading from
cache and potentially apply transformation to NIR.

Let's stick to the hash generated by vk_pipeline_hash_shader_stage(),
it does not look at NIR (except for internal shaders) and already hash
the same information :
  * shader code (SPIR-V, identifier, hash)
  * robustness state
  * specialization constants
  * pipeline flags
  * entry point name
  * subgroup information

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:20 +00:00
Lionel Landwerlin
6279645fed vulkan/runtime: drop some geometry shader hashing
Following bc64ea2815 ("vulkan: fix shader linking with common
pipelines") we're always linking pre-rasterization shaders together
and the shader hashes are hashed together, so there is no point
hashing :
  - a bitfield of active shaders
  - merged tesselation information

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:19 +00:00
Lionel Landwerlin
fc6d17a290 vulkan/runtime: simplify robustness state hashing
We're doing the same in vk_pipeline_precomp_shader_create().

Also fixes valgrind warning due to uninitialized fields

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:19 +00:00
Lionel Landwerlin
f56e118ecd vulkan/runtime: split out partitioning logic
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06 15:27:18 +00:00
Faith Ekstrand
69d7fcd613 pan: Move point size and viewport lowering to postprocess
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Panvk calls pan_preprocess_nir() from its preprocess hook that it hands
off to the Vulkan pipeline code.  That hook gets called before we have
the opportunity to lower geometry shaders.  This means that we get our
viewports lowered for the VS and then the geometry shader is trying to
work on lowered viewports, which is wrong.  Instead, we want to lower
later and only apply the viewport transform in the shader that runs as
the hardware VS.

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06 14:57:32 +00:00
Faith Ekstrand
6c5f981ba8 pan/bi: Move lower_noperspective*() to postprocess()
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06 14:57:32 +00:00
Faith Ekstrand
0ccadf7a86 nir: Check the deref mode in lower_point_size()
This is more robust because it ensures that we only ever check the
location on something that we know is an outupt.  Also, if it's an
output then we know (thanks, validation!) that it's a variable.

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06 14:57:31 +00:00
Faith Ekstrand
5ed35866c2 nir: Handle lowered I/O in lower_viewport_transform()
While we're here, make the variable handling a little more robust by
checking the deref mode before assuming there's a reachable variable.

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06 14:57:31 +00:00
Faith Ekstrand
949a4458ea pan/bi: Call constant folding in postprocess()
The comment explicitly calls out pan_nir_lower_store_component(), which
is in a different function call so it's a bit weird to have it in the
caller.  Also, we already do this in postprocess() on midgard so it
makes more sense to just move it into bifrost.

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06 14:57:31 +00:00
Faith Ekstrand
0fae56e100 pan: roll lower_texture() into postprocess()
Every caller of pan_shader_lower_texture() immediatly called
pan_shader_postprocess() and every caller of pan_shader_postprocess()
lowered textures except blend shaders and those don't texture anyway.

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06 14:57:30 +00:00
Samuel Pitoiset
dcb9ca1aa6 radv/ci: remove RADV_PERFTEST=video_encode,video_code for GFX6-7
It's not supported at all, so no need to force enable all video
extensions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38280>
2025-11-06 14:35:19 +00:00
Daniel Schürmann
f37bdd664d amd/common: rename ac_fake_hw_db.h -> ac_surface_test.h
As the surface tests are the only user now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:07 +00:00
Daniel Schürmann
7e0ba40264 radeonsi: use ac_null_device_create() when AMD_FORCE_FAMILY is set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:07 +00:00
Daniel Schürmann
4d68056e83 radv: delete winsys/null/*
The null device works without winsys, and now can be found in
amd/common/ac_null_device.c.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:07 +00:00
Daniel Schürmann
7d6de8b17e amd, radv: create null device without winsys
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:07 +00:00
Daniel Schürmann
04ebbc3c41 radv: remove radeon_winsys::get_chip_name() and use info->marketing_name directly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:07 +00:00
Daniel Schürmann
797ddfe4d2 radv/device: return early in radv_CreateDevice() if creating a null device
Also reorder initialization, so that everything required for compilation
is done first.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:07 +00:00
Daniel Schürmann
23ef756496 radv/null_device: set more options which affect compilation
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:06 +00:00
Daniel Schürmann
4ad9fb9d2e radv/null_device: don't attempt to upload shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:06 +00:00
Daniel Schürmann
6c2d614412 radv: hash keep_executable_info into shader key rather than device cache key
for consistency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:06 +00:00
Daniel Schürmann
5ef8930636 radv: skip shader cache if trap handler is enabled
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06 13:53:06 +00:00
Jose Maria Casanova Crespo
a58db214bb v3dv: Enable VK_FORMAT_B8G8R8A8_SNORM format
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38278>
2025-11-06 13:34:53 +00:00
Jose Maria Casanova Crespo
c0774030d5 v3dv: Enable VK_FORMAT_B8G8R8A8_SINT and VK_FORMAT_B8G8R8A8_UINT formats
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38278>
2025-11-06 13:34:53 +00:00
Jose Maria Casanova Crespo
5d24610d50 v3dv: Enable VK_FORMAT_A2R10G10B10_UINT_PACK32 format
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38278>
2025-11-06 13:34:52 +00:00
Erik Faye-Lund
8e2d054544 zink/ci: document a nightly failure
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This started failing at some point between a35a12dd38 and 2f7b1e8453,
but the nightly CI was out for a long time in between, so it's hard to
tell what commit it to blame without bisecting. I'm going to leave that
up to someone else for now.

To complicate things further, it seems like this one only fails in the
nightly runs, but not in pre-merge. So we list it as a flake instead of
a consisten failure.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38279>
2025-11-06 13:11:20 +00:00
Erik Faye-Lund
3e0a9d6402 zink/ci: document a flake
This test has flaked in nightly runs recently:
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/87346974
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/87023195
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/86961007

Let's just document it for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38279>
2025-11-06 13:11:20 +00:00
Natalie Vock
e3404af0ed aco/ra: Handle call ABI constraints
Make sure no caller temporaries stay in call-clobbered registers during
execution of a function call.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:43 +00:00
Natalie Vock
86a8b1753a aco/ra: Handle callee ABI preserved register constraints
Block preserved register ranges while they can't yet be overwritten,
i.e. before p_spill_preserved and after the last p_reload_preserved.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:42 +00:00
Natalie Vock
75b89f233f aco/ra: Don't clear fixed operand sources if they were blocked
That would undo the blocking and allow for conflicting assignments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:42 +00:00
Natalie Vock
d4013e7432 aco/ra: Skip blocked regs in get_reg_impl
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:41 +00:00
Natalie Vock
7ed1aea9c5 aco/ra: Also consider blocked registers as not containing temps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:41 +00:00
Natalie Vock
642b1f0dce aco/ra: Add utility to clear PhysRegInterval
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:40 +00:00
Natalie Vock
f0c613765c aco: Add preload_preserved pseudo instruction
These are helper instructions for the spill_preserved pass to insert
reloads for registers that are preserved by the ABI, yet
clobbered by the callee shader.

There is one p_reload_preserved instruction at the end of each block.
This allows us to insert reloads early, to alleviate the high latency of
scratch reloads.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:39 +00:00
David Rosca
9dbf49de2c radv/video: Support intra only without dpb
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For intra only we need to allocate internal dpb.
This was previously implemented for VP9 decode only, using a buffer.
Change it to image so that we don't have to handle it as special
case everywhere.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:34 +00:00
David Rosca
bd151bf8b2 radv/video: Add NULL checks for picture parameters
Fixes vk_layer_validation_tests PositiveVideoDecode.* and
PositiveVideoDecode*.InlineSessionParams

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:34 +00:00
David Rosca
23a3587aa6 radv/video: Correctly handle no feedback query for encode
Fixes vk_layer_validation_tests PositiveVideoEncodeAV1.*

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:33 +00:00
David Rosca
6a1c6ab95b vulkan/video: Avoid NULL pointers in session parameters
Always copy parameters that are not guarded by a flag, zero init
the structs if not provided by application.

Fixes vk_layer_validation_tests PositiveVideoEncode*.GetEncodedSessionParams

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:31 +00:00
David Rosca
67c0b7a529 vulkan/video: Add chroma subsampling to video session
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:31 +00:00
Benjamin Cheng
4d22427079 vulkan/video: NULL check codec-specific chain
It seems applications are allowed to do no-op updates by not passing any
codec-specific extension structures.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:31 +00:00
David Rosca
5d28425a81 ac/parse_ib: Parse VCN_IB_COMMON_OP_RESOLVEINPUTPARAMLAYOUT
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:30 +00:00
David Rosca
ffb0b862dc ac/parse_ib: Fix parsing multiple engine commands in one VCN IB
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:30 +00:00
Lionel Landwerlin
51893699a2 brw: stop emitting flush operations for begin/end interlock
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
NIR barrier intrinsics are already added for required flushing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38242>
2025-11-06 09:33:25 +02:00
Antonio Ospite
7e15340494 nouveau/drm-shim: remove double '/' in include path
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 purely cosmetic change.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:13 +00:00
Antonio Ospite
222b85328e mesa: replace most occurrences of getenv() with os_get_option()
The standard way to query options in mesa is `os_get_option()` which
abstracts platform-specific mechanisms to get config variables.

However in quite a few places `getenv()` is still used and this may
preclude controlling some options on some systems.

For instance it is not generally possible to use `MESA_DEBUG` on
Android.

So replace most `getenv()` occurrences with  `os_get_option()` to
support configuration options more consistently across different
platforms.

Do the same with `secure_getenv()` replacing it with
`os_get_option_secure()`.

The bulk of the proposed changes are mechanically performed by the
following script:

-----------------------------------------------------------------------
  #!/bin/sh

  set -e

  replace() {

    # Don't replace in some files, for example where `os_get_option` is defined,
    # or in external files
    EXCLUDE_FILES_PATTERN='(src/util/os_misc.c|src/util/u_debug.h|src/gtest/include/gtest/internal/gtest-port.h)'

    # Don't replace some "system" variables
    EXCLUDE_VARS_PATTERN='("XDG|"DISPLAY|"HOME|"TMPDIR|"POSIXLY_CORRECT)'

    git grep "[=!( ]$1(" -- src/ | cut -d ':' -f 1 | sort | uniq | \
      grep -v -E "$EXCLUDE_FILES_PATTERN" | \
      while read -r file;
      do
        # Don't replace usages of XDG_* variables or HOME
        sed -E -e "/$EXCLUDE_VARS_PATTERN/!s/([=!\( ])$1\(/\1$2\(/g" -i "$file";
      done
  }

  # Add const to os_get_option results, to avoid warning about discarded qualifier:
  #   warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  # but also errors in some cases:
  #   error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
  add_const_results() {
    git grep -l -P '(?<!const )char.*os_get_option' | \
      while read -r file;
      do
        sed -e '/^\s*const/! s/\(char.*os_get_option\)/const \1/g' -i "$file"
      done
  }

  replace 'secure_getenv' 'os_get_option_secure'

  replace 'getenv' 'os_get_option'

  add_const_results
-----------------------------------------------------------------------

After this, the `#include "util/os_misc.h"` is also added in files where
`os_get_option()` was not used before.

And since the replacements from the script above generated some new
`-Wdiscarded-qualifiers` warnings, those have been addressed as well,
generally by declaring `os_get_option()` results as `const char *` and
adjusting some function declarations.

Finally some replacements caused new errors like:

-----------------------------------------------------------------------
../src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:127:31: error: no matching function for call to 'strtok'
  127 |          for (n = 0, option = strtok(env_llc_options, " "); option; n++, option = strtok(NULL, " ")) {
      |                               ^~~~~~
/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/string.h:124:17: note: candidate function not viable: 1st argument ('const char *') would lose const qualifier
  124 | char* _Nullable strtok(char* _Nullable __s, const char* _Nonnull __delimiter);
      |                 ^      ~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

Those have been addressed too, copying the const string returned by
`os_get_option()` so that it could be modified.

In particular, the error above has been fixed  by copying the `const
char *env_llc_options` variable in
`src/gallium/auxiliary/gallivm/lp_bld_misc.cpp` to a `char *` which can
be tokenized using `strtok()`.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:13 +00:00
Yonggang Luo
2eee9b79e8 util,vulkan,llvmpipe: Use os_get_option_dup instead getenv
Use os_get_option_dup in
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
src/util/tests/process_test.c
because the string is going to be modified.

Use os_get_option_dup in device_select_layer.c are because the string is being assigned to a
struct member (protection for the future), and also because the consecutive usages (protection for the present).

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:13 +00:00
Yonggang Luo
a8e8422170 d3d12/dozen: Use os_get_option_dup for passing to ID3D12SDKConfiguration_SetSDKVersion
consecutive calling to getenv or os_get_option is invalid usage, so convert to use os_get_option_dup instead

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:12 +00:00
Yonggang Luo
eeb54aa92d util: Add function os_get_option_dup and os_get_option_secure_dup for latter use
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:12 +00:00
Yonggang Luo
de36fed555 util: Add new function os_get_option_internal to improve os_get_option*
This is for take care of GetEnvironmentVariableA/getenv/secure_getenv/os_get_android_option
consistently across windows/posix/android

And also secure_getenv should not directly used in mesa, remove it from u_debug.h

os_get_option_secure is using getenv for windows before, that also pull the drawback of getenv, so convert it also
using GetEnvironmentVariableA on windows instead.

This is done the same as commit bed69133cd for os_get_option_secure

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:12 +00:00
Yonggang Luo
95faaa4553 treewide: Use os_get_option_secure instead secure_getenv
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:11 +00:00
Timothy Arceri
34db720660 mesa: skip redundant uniform update optimisation if unsafe
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If multiple contexts are updating uniform values we can't assume
a uniform update can skip flushing.

Fixes: b32e20e630 ("mesa: skip redundant uniform updates for glUniformHandle")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14129

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38101>
2025-11-06 01:45:11 +00:00
Juston Li
cf5c294df4 anv/android: query and use explicit layout for ahb resolve
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When available, query and use explicit layout info otherwise fallback to
implicit layout with tiling query.

This fixes aligned layouts of multi-planar formats that were getting
misaligned when adding surfaces with implicit layouts.

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38039>
2025-11-05 22:51:44 +00:00
Juston Li
c36f0e73ba anv/android: align AHardwareBuffer naming to ahb
/s/ahw/ahb/ to match common vulkan

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38039>
2025-11-05 22:51:44 +00:00
Lionel Landwerlin
1f1022d161 anv: avoid unnecessary stalling on secondaries
When EXT_descriptor_buffer is not enabled, we can assume we're in
legacy descriptor mode and not do any switching for secondaries.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38256>
2025-11-05 22:27:06 +00:00
Lionel Landwerlin
9c494dbd42 anv: don't use IndirectStatePointersDisable at the end of secondaries
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38256>
2025-11-05 22:27:06 +00:00
Lionel Landwerlin
cff047280a anv: avoid invalid timestamp generation due to skipped commands
We skip the stall emission for STATE_BASE_ADDRESS since this one can
be skipped on Gfx12.5+ and instead add a new sba tracepoint that has
valid timestamps.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0147908a89 ("anv: predicate emission of STATE_BASE_ADDRESS")
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38256>
2025-11-05 22:27:06 +00:00
Aitor Camacho
bea21177f2 kk: Ignore depth clear value if load op is not clear
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is required otherwise Metal validation will report an error.

Acked-By: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38233>
2025-11-05 21:41:57 +00:00
Lionel Landwerlin
9c5b0c28ee anv: enable accelerationStructureCaptureReplay
This should work just like any other buffer capture/replay.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38255>
2025-11-05 21:03:45 +00:00
Emma Anholt
bb532a7a39 v3dv: Fix assertion failure for not-found primary_fd during enumeration.
Found when I had v3dv built in my aarch64 turnip setup.

Fixes: 451a0bd490 ("v3dv: use v3d primary node for VK_EXT_physical_device_drm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38147>
2025-11-05 20:06:47 +00:00
Yiwei Zhang
a3c8740c2e llvmpipe: add missing util/os_file.h header
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14248
Fixes: 125b93595e ("llvmpipe: support sparse resource with LLVMPIPE_MEMORY_FD_TYPE_OPAQUE")
Tested-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38267>
2025-11-05 19:45:51 +00:00
Emma Anholt
4c603b7e5f pps: Remove the cpu.cfg file.
It doesn't look like it would be useful for anything related to Mesa
performance debugging.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:03 +00:00
Emma Anholt
80cdb1641f docs/perfetto: Put V3D at the same level of heading as other drivers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:03 +00:00
Emma Anholt
09793f02bc docs/perfetto: Be more clear about the role of MESA_GPU_TRACES=perfetto
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:02 +00:00
Emma Anholt
ed40f0e22a docs/perfetto: Explain using tracebox, and put commands in the list.
This binary that perfetto builds automatically launches traced and
traced_probes, doesn't need tmux installed, doesn't need you to know tmux
ui, and doesn't need the tmux helper script hacked to not call the wrong
arch's ninja if you cross compiled.

Also, it's silly to send people into an explanation and links to docs,
when we have the instructions they actually want below.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:02 +00:00
Emma Anholt
5ca03e1137 docs/perfetto: Give a hint on how to cross compile the tools.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:01 +00:00
Emma Anholt
09e496d6c0 docs/perfetto: Be helpful and opinionated about config selection.
system.cfg should be your go-to, regardless of driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:01 +00:00
Emma Anholt
2d739be159 docs/perfetto: Add row for panvk support.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:18:59 +00:00
Alyssa Rosenzweig
a72ebeac6d asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
2025-11-05 18:44:23 +00:00
Alyssa Rosenzweig
9c2a2deee6 treewide: use BITSET_BYTES, BITSET_RZALLOC
Via Coccinelle patches:

    @@
    expression bits;
    typedef BITSET_WORD;
    @@

    -BITSET_WORDS(bits) * sizeof(BITSET_WORD)
    +BITSET_BYTES(bits)

    @@
    expression memctx, bits;
    typedef BITSET_WORD;
    @@

    -rzalloc_array(memctx, BITSET_WORD, BITSET_WORDS(bits))
    +BITSET_RZALLOC(memctx, bits)

     @@
     expression memctx, bits;
     @@

     -rzalloc_size(memctx, BITSET_BYTES(bits))
     +BITSET_RZALLOC(memctx, bits)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
2025-11-05 18:44:23 +00:00
Alyssa Rosenzweig
ab4cff4f5c util: add BITSET_RZALLOC
to complement BITSET_CALLOC for when you want a memctx in there.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
2025-11-05 18:44:23 +00:00
Alyssa Rosenzweig
18eacdda3e util: add BITSET_BYTES helper
this comes up a lot.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
2025-11-05 18:44:23 +00:00
Yiwei Zhang
53482178ef glcpp/meson: fix libglcpp generated header dependency
Explicitly declare glcpp-parse.h as a file dependency to ensure
glcpp_parse custom target completes before compiling glcpp-lex.c.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38254>
2025-11-05 18:13:47 +00:00
Valentine Burley
f9bfb3265d freedreno/ci: Move a660-gl-cl job back to pre-merge
The sm8350-hdk devices have been fixed in the lab with help from
Qualcomm.

Also adjust the parallelism of the job, as we're still within the time
limit with just 2 devices instead of 3.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38239>
2025-11-05 17:44:51 +00:00
Valentine Burley
74d3bd58d9 turnip/ci: Increase coverage of a660-vk job
Use 5 devices instead of 3, skip redundant tests, increase
tests_per_group value, and decrease the fraction used.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38239>
2025-11-05 17:44:51 +00:00
Lionel Landwerlin
ff57c31696 brw: avoid invalid URB messages
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Some new CTS tests have geometry shader looking like this :

   void main()
   {
      gl_Position = gl_in[0].gl_Position;
      EmitVertex();
      EndPrimitive();
      // <-- some storage buffer write
   }

The generate shader has :
   - a message to write the position
   - a message to write to the storage buffer
   - a final message to end the thread

This generates an empty EOT URB messages which is apparently not legal
(simulation complains, HW hangs) :

send(8)         nullUD          g126UD          nullUD          0x04088007                0x00000000
                urb MsgDesc: offset 0 SIMD8 write masked  mlen 2 ex_mlen 0 rlen 0 { align1 1Q A@1 EOT };

Instead emit a write with actual data and the mask set at 0 to discard
the effect :

mov(8)          g127<1>UD       0x00000000UD                    { align1 WE_all 1Q };
mov(8)          g125<1>UD       0x00000000UD                    { align1 1Q };
send(8)         nullUD          g126UD          g125UD          0x04088007                0x00000040
                urb MsgDesc: offset 0 SIMD8 write masked  mlen 2 ex_mlen 1 rlen 0 { align1 1Q A@1 EOT };

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38243>
2025-11-05 17:18:09 +00:00
Ian Romanick
34fe598b39 brw: Correctly generate conditional modifier for BFN
Fixes: 4193895145 ("brw/cmod: Enable limited cmod propagation for BFN")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38251>
2025-11-05 16:52:56 +00:00
Christoph Pillmayer
904ba2878f pan: Make W_entry loop aware
This commit changes SSA based spilling of values in loops.

As described in the paper by Hack, W_entry should consider which values
are used inside of the loop since we would really like to avoid spilling
those because we need to do so every loop iteration.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38181>
2025-11-05 16:15:11 +00:00
Christoph Pillmayer
bb7b0b6b1b pan: Add spill cost metric
Our SSA spilling logic should avoid inserting spill code inside loops.
Add a metric that reflects this goal.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38181>
2025-11-05 16:15:11 +00:00
Christoph Pillmayer
47f4b00cb2 pan: Pull out normal block logic from compute_w_entry
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38181>
2025-11-05 16:15:10 +00:00
Samuel Pitoiset
c6d9b9b4e0 radv: support more tessellation parameters with TCS for ESO unlinked shaders
The Vulkan spec change hasn't been released yet but the VKCTS test
is public, so let's merge the fix to make VKCTS green again locally.

Fixes dEQP-VK.shader_object.tessellation.*.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38209>
2025-11-05 15:49:25 +00:00
Samuel Pitoiset
373faab109 radv: use GFX11 packed context regs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is supposed to be optimal for the CP. Only for dGPUs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38187>
2025-11-05 15:15:00 +00:00
Samuel Pitoiset
db3a79a10a radv: add separate functions for emitting framebuffer on GFX11-11.5
To use packed context registers on dGPUs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38187>
2025-11-05 15:15:00 +00:00
Samuel Pitoiset
58a5f5eb6b radv: add GFX11 packed context registers helpers
Tracked registers aren't in common code yet.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38187>
2025-11-05 15:14:58 +00:00
Samuel Pitoiset
3c5ec268ec amd,radeonsi: add GFX11 packed context registers helpers to common code
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38187>
2025-11-05 15:14:58 +00:00
Alessio Belle
a6ca6bcabf pvr: add device info for GE8300 (22.67.54.30)
Requested by the community [1].

[1] https://gitlab.freedesktop.org/imagination/linux-firmware/-/issues/13

Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38211>
2025-11-05 14:47:27 +00:00
Alessio Belle
b83bd94d69 pvr: add device info for GE7800 (15.5.1.64)
Requested by the community [1].

[1] https://gitlab.freedesktop.org/imagination/linux-firmware/-/issues/13

Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38211>
2025-11-05 14:47:26 +00:00
Saroj Kumar
8005bf631c radeonsi: Move binary upload, dump code to new file
Moved helper functions for binary upload and dump
code from si_shader.c to new file si_shader_binary.c

Signed-off-by: Saroj Kumar <saroj.kumar@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38166>
2025-11-05 14:30:02 +00:00
Juan A. Suarez Romero
973a950932 v3dv/ci: add timeout in expected list
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38259>
2025-11-05 13:49:00 +00:00
Collabora's Gfx CI Team
fcecfe54e8 Uprev Piglit to 5309e3401d6b03e8a0bb7bfdc1e0f5bc1ad754af
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ec76cc7a31...5309e3401d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38253>
2025-11-05 12:49:28 +00:00
Kenneth Graunke
183d57aa9e ci: Run intel shader-db on Haswell, Broadwell, and Meteorlake
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This would have caught recent regressions.

Haswell covers crocus.
Broadwell covers iris's oldest platform.
Skylake and derivatives are widely deployed.
Meteorlake is reasonably representative of recent Intel hardware.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38231>
2025-11-05 10:58:00 +00:00
Kenneth Graunke
96b739b449 elk: Disable IO semantic validation when remapping patch offsets
Marek disabled this for brw in 2f6b4803ab
but elk also needs the fix.  Fixes issues in shader-db/open-subdiv/7 on
crocus targeting Haswell.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38231>
2025-11-05 10:58:00 +00:00
Kenneth Graunke
10e2631e79 iris, crocus: Disable new IO slot validation for FB fetch load_output
This is a framebuffer fetch for blend equation advanced lowering.  We're
using a binding table index as the offset, which is not a slot.

Also, validate the shader after setup_binding_table so that we catch
errors here at the right place, rather than deeper in the compiler.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38231>
2025-11-05 10:58:00 +00:00
Georg Lehmann
b2172467d1 aco/gfx10_3: work around NSA hazard
4+ dword NSA can hang if exec becomes non-zero again directly before
the instruction.

Foz-DB Navi21:
Totals from 608 (0.74% of 82161) affected shaders:
Instrs: 945138 -> 946431 (+0.14%)
CodeSize: 5171580 -> 5176864 (+0.10%)
Latency: 13356895 -> 13357113 (+0.00%)
InvThroughput: 3043234 -> 3043236 (+0.00%); split: -0.00%, +0.00%

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9852
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13981
Cc: mesa-stable

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38215>
2025-11-05 10:06:04 +00:00
David Rosca
bcb6e6b6e6 radv/video: Fix AV1 bidir compound encode with order_hint disabled
Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37911>
2025-11-05 09:44:04 +00:00
David Rosca
96db490318 radv/video: Don't require encode FW version >= interface version
Otherwise this breaks backwards compatibility when bumping interface
version for new features.

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37911>
2025-11-05 09:44:04 +00:00
David Rosca
1a8a8db8c5 radeonsi/vcn: Fix AV1 bidir compound encode with order_hint disabled
Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37911>
2025-11-05 09:44:04 +00:00
Yiwei Zhang
4201613de1 venus: enable sparse resource support on lavapipe
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that lavapipe sparse resource support on external memory has been
fixed, expose sparse resource support from venus on lavapipe. Meanwhile,
make remaining failures explicit (failed in lavapipe as well).

This CL also drops an obsolete comment and updates expectations from
full nightly runs.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:40 +00:00
Yiwei Zhang
125b93595e llvmpipe: support sparse resource with LLVMPIPE_MEMORY_FD_TYPE_OPAQUE
Store a dup fd for OPAQUE type as required by sparse binding. Use
os_map_memory_fd_placed to handle binding for opaque fd backed memory,
while the unbind will still correctly share the same code path with
other cases. This adds sparse resource support with OPAQUE type in
addition to DMA_BUF, and venus no longer has to hide sparse resource on
lavapipe.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:40 +00:00
Yiwei Zhang
0d72b86fe9 llvmpipe: refactor llvmpipe_resource_bind_sparse
Improve readability and prepare for opaque fd support.

No behavior change involved.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:40 +00:00
Yiwei Zhang
532eb04006 llvmpipe: split sparse binding part to llvmpipe_resource_bind_sparse
Since it early returns, refactor our with a dedicated helper for
cleaness and to prepare for further refactors.

No behavior change involved.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:40 +00:00
Yiwei Zhang
ab1902e666 llvmpipe: add fd type INVALID and ANONYMOUS
This is mainly to ensure internal anonymous file based memory allocs do
not collide with opaque fd type. Since we are here, add INVALID type and
assign to non-Linux internal alloc.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:40 +00:00
Yiwei Zhang
8f7543e450 util: add os_map_memory_fd_placed for placed mapping support
This completes the opaque fd api coverage, and is needed by lavapipe for
sparse binding support with opaque fd external memory.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:40 +00:00
Yiwei Zhang
743b9a52d9 util: add get_fd_header helper in os_memory_fd
Prepare for placed mapping.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:40 +00:00
Yiwei Zhang
e8f66ef197 llvmpipe: refactor dmabuf and opaque fd handling
This change:
1. add new helpers to handle dmabuf alloc/import/free
2. use FREE to match with alloc macro
3. simplify opaque fd code path

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:39 +00:00
Yiwei Zhang
4d0fbd1c67 llvmpipe: handle os_dupfd_cloexec failure
Make it easy to debug fd leak or hitting open fd limit.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:39 +00:00
Yiwei Zhang
1be7832f3e llvmpipe: handle mmap failure for lp_texture
This makes debugging easier. Also assert that sparse binding is only
used with resource_create_unbacked.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:39 +00:00
Yiwei Zhang
67d54fd5dc llvmpipe: support sparse resource with LLVMPIPE_MEMORY_FD_TYPE_DMABUF
There's already the type, and there's no concurrent usage of fd and
dmabuf fd, so just drop it. This fixes sparse resource to work with
dmabuf external memory for lavapipe. In addition, this makes sparse
resource from venus on lavapipe to work with dmabuf backing.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:39 +00:00
Yiwei Zhang
e0acc5c2b4 llvmpipe: misc fixes for sparse binding
This change:
1. Move size validation within sparse binding, but not escape to
   non-sparse code path.
2. Error out if sparse is requested on unsupported platforms.

Fixes: d747c4a874 ("lavapipe: Implement sparse buffers and images")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:39 +00:00
Yiwei Zhang
66414c6b70 llvmpipe: add a missing alloc error handling in fd import
Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Suggested-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:39 +00:00
Yiwei Zhang
3e07f57d4a llvmpipe: fix udmabuf mmap error check
Upon failing to mmap, MAP_FAILED (void *)-1 is returned instead of NULL.

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:39 +00:00
Yiwei Zhang
3a655c212b llvmpipe: zero is also a valid fd
Fixes: a062544d3d ("llvmpipe: Use an anonymous file for memory allocations")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38074>
2025-11-05 08:26:39 +00:00
Samuel Pitoiset
a0d607bfdb radv,aco: wait for all VMEM loads when the prolog loads large 64-bit attributes
Not the most optimal solution but 64-bit vertex attributes are rarely
used. Could still revisit if we find a real use case that matters.

This fixes recent VKCTS coverage:

dEQP-VK.pipeline.fast_linked_library.vertex_input.component_mismatch.r64g64b64.*_to_dvec2
dEQP-VK.pipeline.shader_object_.*.vertex_input.component_mismatch.r64g64b64.*_to_dvec2

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14243
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38237>
2025-11-05 07:26:45 +00:00
Samuel Pitoiset
ba5bf81aa2 aco: fix reserving VGPRs for 64-bit attributes in VS prologs
Otherwise the fetch index would be overwritten if the attribute format
is 64-bit and more than 2 components are loaded.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14242
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38237>
2025-11-05 07:26:45 +00:00
Eric R. Smith
6f24dad00e panfrost: add 422 AFBC formats
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 infrastructure was already in place for 8 bit (we just
had to add the AFBC mode to use). We also needed to add support for
the 10 bit format (X6R10X6G10_X6R10X6B10_UNORM). Note that this
10 bit format is only supported for AFBC, for linear we have to fall
back to the old multi-plane way of handling it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35771>
2025-11-04 22:28:03 +00:00
Eric R. Smith
417be4f77e dri: check modifier in dri_create_image_from_winsys
When importing an image, check that the specific combination of
format plus modifier is supported, rather than just checking the
format. This will allow drivers to support some YUV formats in
special cases (specific modifiers, like AFBC for panfrost) while
also allowing us to fall back to generic multi-plane formats when
those modifier+format combinations are not supported by
hardware.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35771>
2025-11-04 22:28:03 +00:00
Eric R. Smith
b11f543c4e mesa: Add R16G16_R16B16_UNORM and related formats
Including the 10 bit variant X6R10X6G10_X6R10X6B10_UNORM. Only the
RG_RB variants seem to have fourccs, so those are the only ones being
added for now, although they would, obviously, be easy to add).

These are used for Y210, Y212, and Y216 fourccs. In particular Y210
is interesting for panfrost, as it is the fourcc used to indicate a
10 bit single plane 4:2:2 encoded as AFBC (similar to how YUYV is
the canonical AFBC for 10 bit 4:2:0).

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35771>
2025-11-04 22:28:03 +00:00
Eric R. Smith
55735b6146 pan: Add 16 bit AFBC support (v10+ only)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35771>
2025-11-04 22:28:03 +00:00
Eric R. Smith
7a1ef0cf85 panfrost: update AFBC code to handle tiling for 64bpp formats
We had assumed AFBC superblocks were always tiled in an 8x8 pattern,
but this is true only for 32bpp and lower formats; for larger formats
the pattern is 4x4. This isn't an issue yet, but will be when we
support R16G16B16A16 in AFBC.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35771>
2025-11-04 22:28:03 +00:00
Eric R. Smith
3303a04d4f panfrost: add explicit get_dmabuf_modifier_planes override
This is required because otherwise dri2_get_modifier_num_planes will be
confused: dri2_get_mapping_by_fourcc gives the emulated 2 plane YUYV,
but panfrost itself supports a hardware single plane YUYV. This is
arguably a problem with dri2, but other drivers have implemented
dri2_get_modifier_num_planes so we may as well. It also gives us a
hook for supporting more exotic planar configurations, should that
be necessary in the future.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35771>
2025-11-04 22:28:03 +00:00
Eric R. Smith
09b5802f9f panvk: sanity check block size for unorm format
panvk_meta_get_unorm_format_for_blk_size() requires a block size of 4
or less, but we didn't actually check for that before calling it. Fix
that, and also rename the function because what we actually care about
isn't whether it is a unorm format, but a blendable format.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35771>
2025-11-04 22:28:03 +00:00
Sagar Ghuge
43d98a3f1a anv: Use correct engine class for companion RCS
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 6f138fe723 ("anv: avoid null pointer access in utrace copies on CCS")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38247>
2025-11-04 21:39:23 +00:00
spencer-lunarg
17d8a5d8ae lavapipe: Remove trailing whitespace
Signed-off-by: spencer-lunarg <spencer@lunarg.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38223>
2025-11-04 21:20:47 +00:00
Felix DeGrood
faddb5d497 anv/pps: remove assert for double init
pps initializes perf counter multiple times, once from
GpuDataSource::register_data_source and once from
GpuDataSource::OnSetup. This is fine, except we should replace
failing assert with skip on second call.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38224>
2025-11-04 20:54:34 +00:00
Konstantin Seurer
b962063d72 nir: Remove nir_parallel_copy_instr
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36483>
2025-11-04 18:51:51 +00:00
Konstantin Seurer
3f3faa82b8 nir/from_ssa: Stop using nir_parallel_copy_instr
nir_parallel_copy_instr can be emulated using an intrinsic for each
entry and an array of arrays that is used by the pass to remember which
copies belong together.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36483>
2025-11-04 18:51:50 +00:00
Konstantin Seurer
b20fd0ef48 nir: Remove parallel copy handling from rewrite_uses_to_load_reg
Parallel copies are only created by nir_convert_from_ssa which does not
use the helper.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36483>
2025-11-04 18:51:50 +00:00
Ian Romanick
67a6fc0160 nir/opt_if: See through inot
Consider

    if (!x) {
       if (x) {
          ...
       }
    }

The inner use of `x` must be false, but so far only instances of `!x`
would have been replaced with a constant. See through the `inot` to
replace instances of `x` as well.

shader-db:

Lunar Lake
total instructions in shared programs: 17205147 -> 17204908 (<.01%)
instructions in affected programs: 56037 -> 55798 (-0.43%)
helped: 79 / HURT: 79

total cycles in shared programs: 879847886 -> 879992944 (0.02%)
cycles in affected programs: 5244138 -> 5389196 (2.77%)
helped: 141 / HURT: 125

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
total instructions in shared programs: 19968312 -> 19968069 (<.01%)
instructions in affected programs: 65698 -> 65455 (-0.37%)
helped: 88 / HURT: 104

total cycles in shared programs: 884331007 -> 884469865 (0.02%)
cycles in affected programs: 4839695 -> 4978553 (2.87%)
helped: 172 / HURT: 136

LOST:   3
GAINED: 0

Ice Lake, Skylake, and Broadwell had similar results. (Ice Lake shown)
total instructions in shared programs: 20809765 -> 20809473 (<.01%)
instructions in affected programs: 65976 -> 65684 (-0.44%)
helped: 89 / HURT: 102

total cycles in shared programs: 872466849 -> 872433762 (<.01%)
cycles in affected programs: 5452888 -> 5419801 (-0.61%)
helped: 157 / HURT: 133

total spills in shared programs: 4014 -> 4010 (-0.10%)
spills in affected programs: 30 -> 26 (-13.33%)
helped: 1 / HURT: 0

total fills in shared programs: 3769 -> 3765 (-0.11%)
fills in affected programs: 50 -> 46 (-8.00%)
helped: 1 / HURT: 0

LOST:   3
GAINED: 1

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 910122459 -> 910097570 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 40045664 -> 40046176 (+0.00%)
Send messages: 40724361 -> 40724036 (-0.00%)
Loop count: 970500 -> 970054 (-0.05%)
Cycle count: 105785543442 -> 105794147978 (+0.01%); split: -0.02%, +0.02%
Spill count: 3426093 -> 3426032 (-0.00%); split: -0.00%, +0.00%
Fill count: 6525296 -> 6525210 (-0.00%); split: -0.00%, +0.00%
Max live registers: 188561553 -> 188519064 (-0.02%); split: -0.02%, +0.00%
Max dispatch width: 47958304 -> 47958496 (+0.00%); split: +0.00%, -0.00%
Non SSA regs after NIR: 227303232 -> 227296055 (-0.00%); split: -0.00%, +0.00%

Totals from 15417 (0.78% of 1977988) affected shaders:
Instrs: 16984488 -> 16959599 (-0.15%); split: -0.20%, +0.05%
Subgroup size: 512 -> 1024 (+100.00%)
Send messages: 900193 -> 899868 (-0.04%)
Loop count: 23059 -> 22613 (-1.93%)
Cycle count: 1200149390 -> 1208753926 (+0.72%); split: -1.48%, +2.20%
Spill count: 25838 -> 25777 (-0.24%); split: -0.29%, +0.06%
Fill count: 43627 -> 43541 (-0.20%); split: -0.28%, +0.08%
Max live registers: 2550741 -> 2508252 (-1.67%); split: -1.75%, +0.08%
Max dispatch width: 296736 -> 296928 (+0.06%); split: +0.08%, -0.02%
Non SSA regs after NIR: 3264670 -> 3257493 (-0.22%); split: -0.25%, +0.03%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38196>
2025-11-04 18:04:00 +00:00
Faith Ekstrand
27d9e4ec2a nvk: VK_EXT_shader_uniform_buffer_unsized_array
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38230>
2025-11-04 17:25:04 +00:00
Georg Lehmann
83e9ae2d5c radv: do not report wave32 in gl_SubgroupSize for Doom Dark Ages
The shaders in question use:

(memory_load + (gl_SubgroupSize - 1)) & ~(gl_SubgroupSize - 1)

My guess is that this is supposed to be the subgroup size of whatever
produced the value, not the subgroup size in this shader.
And because in the consumer the workgroup size is 32, we use wave32.

Fixes: a2d3cbac2a ("radv: determine subgroup/wave size early")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14187

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38214>
2025-11-04 16:52:13 +00:00
Yiwei Zhang
763d2418b8 panvk: fix sample shading of internal blend shader for MSAA
Align with gallium side. When fixed-function blending is not available,
the internal blend shader is used. This is handled by a single ST_TILE
in the blend shader with the current sample ID, which requires sample
shading enablement.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38129>
2025-11-04 16:31:32 +00:00
David Rosca
00b8fad3d3 radeonsi/vcn: Fix creating context buffer on VCN5
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
VCN5 needs the context buffer for AV1 encode and when pre-encode
is enabled.
Replace the check for dpb slots (which is always 0 on VCN5) with
check for first encoded frame.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14186
Fixes: a0324576aa ("radeonsi/vcn: Stop using rvid_buffer")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38072>
2025-11-04 14:59:16 +00:00
Alyssa Rosenzweig
17355f716b treewide: use UTIL_DYNARRAY_INIT
Instead of util_dynarray_init(&dynarray, NULL), just use
UTIL_DYNARRAY_INIT instead. This is more ergonomic.

Via Coccinelle patch:

    @@
    identifier dynarray;
    @@

    -struct util_dynarray dynarray = {0};
    -util_dynarray_init(&dynarray, NULL);
    +struct util_dynarray dynarray = UTIL_DYNARRAY_INIT;

    @@
    identifier dynarray;
    @@

    -struct util_dynarray dynarray;
    -util_dynarray_init(&dynarray, NULL);
    +struct util_dynarray dynarray = UTIL_DYNARRAY_INIT;

    @@
    expression dynarray;
    @@

    -util_dynarray_init(&(dynarray), NULL);
    +dynarray = UTIL_DYNARRAY_INIT;

    @@
    expression dynarray;
    @@

    -util_dynarray_init(dynarray, NULL);
    +(*dynarray) = UTIL_DYNARRAY_INIT;

Followed by sed:

    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init(&\(.*\), NULL)/\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init( &\(.*\), NULL )/\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init(\(.*\), NULL)/*\1 = UTIL_DYNARRAY_INIT/g' \{} \;"

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38189>
2025-11-04 13:39:48 +00:00
Alyssa Rosenzweig
f6f23dfdd1 util: add UTIL_DYNARRAY_INIT sentinel
We have the invariant that zero-initializing is legal but it's not
obvious in the source code, so add a sentinel value for it to make code
that uses it crystal clear.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38189>
2025-11-04 13:39:48 +00:00
Lionel Landwerlin
6f138fe723 anv: avoid null pointer access in utrace copies on CCS
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3e0ad0176b ("anv: Emit state cache invalidation after every compute dispatch")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38235>
2025-11-04 13:17:44 +00:00
Lionel Landwerlin
df5f92d114 u_trace: reserve chunk space before emitting copies
Some implementations can emit tracepoints when copying u_trace
buffers. It's important to reserve the slots we want to copy into
before emitting the copies so that both processes don't clash with one
another.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38199>
2025-11-04 12:49:04 +00:00
Danylo Piliaiev
2798ef7bfd vulkan: Always fill DS state for EXT_dynamic_rendering_unused_attachments
If renderpass has D/S attachment, but pipeline has D/S as UNDEFINED,
D/S should be properly disabled for the pipeline. The easiest way is to
ensure that D/S state is valid when pipeline's D/S format is UNDEFINED.
So we always create VkPipelineDepthStencilStateCreateInfo.

CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37550>
2025-11-04 12:03:11 +01:00
Georg Lehmann
22dc06798b aco/optimizer: never unfuse fma
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This shouldn't change anything in practice, and reducing precision
if precise isn't set is weird.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38183>
2025-11-04 07:54:02 +00:00
Georg Lehmann
6610905b43 aco: allow v_fma_mix with denorms for gfx9 chips where it's fused
Only unfused mad unconditionally flushes denorms.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38183>
2025-11-04 07:54:02 +00:00
Georg Lehmann
75e7fb03a5 aco: fix v_mad_mix denorm behavior
It also flushes fp32 denorms, just like v_mad_f32.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38183>
2025-11-04 07:54:02 +00:00
Samuel Pitoiset
95b9801ad2 radv/sqtt: do not try to resize the SQTT buffer for per-submit captures
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Doesn't make sense to try that and it will fail later anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38188>
2025-11-04 06:57:38 +00:00
Andy Hsu
be9e0f2f6a meson: Support intel tools on Android.
Signed-off-by: Andy Hsu <hwandy@google.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38131>
2025-11-04 06:18:19 +00:00
Tapani Pälli
ed34f91545 anv: implement autostrip disable for Wa_14024997852
Note that currently autostrip is disabled globally with
Wa_14021490052 for some gfx versions and steppings.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37975>
2025-11-04 05:17:30 +00:00
Tapani Pälli
7d9cf48fd7 iris: implement autostrip disable for Wa_14024997852
Note that currently autostrip is disabled globally with
Wa_14021490052 for some gfx versions and steppings.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37975>
2025-11-04 05:17:30 +00:00
Tapani Pälli
0ff1dd9e0c intel/genxml: add registers handling autostrip for gfx200
These registers need to be whitelisted by kernel so that we can use
it to disable autostrip at will. This is about Wa_14024997852.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37975>
2025-11-04 05:17:30 +00:00
Tapani Pälli
9a71dcde1b intel/dev: update mesa_defs.json from internal database
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37975>
2025-11-04 05:17:30 +00:00
Ryan Houdek
455eb2c751 freedreno/fdl: Fix typo in tiled_to_linear_2cpp
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The non-aarch64 path was copying in the wrong direction.

Fixes: 7a5a33e0e3 ("freedreno/fdl: Add tiling/untiling implementation for a6xx/a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38226>
2025-11-04 02:48:35 +00:00
stefan11111
37f1d19a68 glx: Add some NULL pointer checks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This prevents mesa from segfaulting if GLX is working on some screens, but not all screens.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38201>
2025-11-04 00:21:19 +00:00
Mel Henning
041216e605 nak/opt_lop: Don't handle modifiers in dedup_srcs
The handling in dedup_srcs was incorrect because it would apply the
modifier from srcs[i] to the LUT without removing the modifier from the
instruction. We can fix and simplify this code by removing all modifiers
before the dedup_srcs() call, which we were doing immediately after the
call anyway.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13966
Fixes: 66c9c40f68 ("nak: Handle modifiers in dedup_srcs() in opt_lop()")
Reviewed-by: Seán de Búrca <sdeburca@fastmail.net>
Reviewed-by: Lorenzo Rossi <git@rossilorenzo.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38220>
2025-11-03 22:46:11 +00:00
Mel Henning
4b1303e29d nak/nvdisasm_tests: Test plop3
Reviewed-by: Seán de Búrca <sdeburca@fastmail.net>
Reviewed-by: Lorenzo Rossi <git@rossilorenzo.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38220>
2025-11-03 22:46:11 +00:00
Ryan Mckeever
f43e1fe603 people: update my name/email
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: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38225>
2025-11-03 22:08:48 +00:00
Ryan Mckeever
dac4322b47 mailmap: update my name and email
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38225>
2025-11-03 22:08:48 +00:00
Lionel Landwerlin
53834ccb6a brw: disable io_semantic validation for mesh intrinsics
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2f6b4803ab ("nir/validate: expand IO intrinsic validation with nir_io_semantics")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38222>
2025-11-03 21:28:22 +00:00
Dylan Baker
74018f41ab anv: try to help coverity understand we're not racing
Coverity notices that in this case part of the decision to go down the
locked path invovles reading a flag, which is turn set inside the
protected code. Additional threads can decide they need to go down the
locked path, and then wait on the lock, even though the first thread
willse the device_registered to true, which would have otherwise
prevented them from going down the locked path.

What Coverity doesn't know, is that it is a violation of the Vulkan API
contract to call this function from two different threads, so in
practice that cann't happen. We'll move the setting of the
image_device_registered out of the locked area to see if that pacifies
Coverity, and if not then we'll just ignore it.

CID: 1662067
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37582>
2025-11-03 20:00:31 +00:00
Konstantin Seurer
aa28fcb610 llvmpipe: Always recompute 1/w
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The value depends on the tgsi_interpolate_loc which is not constant for
the loop. llvm should be able to cse in cases where they are the same.

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38197>
2025-11-03 19:45:29 +01:00
Konstantin Seurer
4d30da6599 gallivm/nir/soa: Use the sign of src1 for imod
This is the behavior specified by the nir opcode, the spirv spec and
required by maintenance8.

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38197>
2025-11-03 19:45:25 +01:00
Konstantin Seurer
25e678a37d lavapipe: Bump MAX_DESCRIPTOR_UNIFORM_BLOCK_SIZE
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38197>
2025-11-03 19:45:21 +01:00
Konstantin Seurer
d6dd96e1c7 lavapipe: Zero image null descriptors
The size queries for images do not use function pointers so we need to
be careful that width, height and depth are 0.

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38197>
2025-11-03 19:45:17 +01:00
Konstantin Seurer
ff145d2ddc lavapipe: Bump maxPrimitiveCount
The vulkan spec requires at least 2^29-1.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14212
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38197>
2025-11-03 19:44:46 +01:00
David Heidelberg
9334b5659c ci: implement debian-cross-riscv64
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Revival of my old effort to get riscv64 testing in!
Now we're at Debian 13 (trixie), we can support RISC-V builds!

Disable llvmpipe suite because of lp_test_arit failure, see
https://gitlab.freedesktop.org/mesa/mesa/-/issues/14123

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37445>
2025-11-03 15:04:57 +01:00
Daniel Schürmann
43f1ad308a radv/shader_info: repack and compact struct radv_shader_info
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
using pahole.

Reduces the size of radv_shader_info from 760 bytes to 640 bytes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37931>
2025-11-03 13:38:38 +01:00
Daniel Schürmann
e1bcbbf3dd radv/shader_info: rename gs_ring_info -> legacy_gs_info and use union with ngg_info
Reduces the size of radv_shader_info from 784 bytes to 760 bytes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37931>
2025-11-03 13:38:38 +01:00
Daniel Schürmann
9b34da3da8 radv/shader_info: use union for precomputed register values of non-overlapping stages
Reduces the size of radv_shader_info from 872 bytes to 784 bytes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37931>
2025-11-03 13:38:38 +01:00
Daniel Schürmann
68ab01b2f2 radv/shader_info: remove unused output_usage_mask
Reduces the size of radv_shader_info from 1000 bytes to 872 bytes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37931>
2025-11-03 13:38:37 +01:00
Karmjit Mahil
9a6ab041fd tu: Use TU_BREADCRUMBS_ENABLED value
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The code was checking for the define to exists, which it always
does, and is set to 0, where it should instead have checked its
value.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38210>
2025-11-03 10:11:41 +00:00
David Rosca
502f7e85e5 radv/ci: Enable video tests on navi21 and navi31
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38184>
2025-11-03 08:39:59 +00:00
David Rosca
874e02003a radv/video: Only use write_memory for encode feedback with full support
write_memory is used after encoding every frame to mark the feedback
buffer as ready. Only use it when write_memory can work without PCIe
atomics support.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38184>
2025-11-03 08:39:59 +00:00
David Rosca
8e1d74bbb4 radv/video: Introduce two levels of write_memory support
Print warning when using write_memory with firmwares that require
PCIe atomics support.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38184>
2025-11-03 08:39:59 +00:00
Samuel Pitoiset
f91e5c9cb7 radv: use radv_get_shader_layout() more with ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38106>
2025-11-03 08:00:35 +00:00
Samuel Pitoiset
e5513826aa radv: fix creating linked graphics ESOs with a compute shader
It's valid to create shader objects with linked VS/FS and with a
compute shader.

This reworks radv_CreateShadersEXT() completely to allow this. Unlinked
shaders are created first, then linked shaders.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14193
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38106>
2025-11-03 08:00:35 +00:00
Valentine Burley
69ddb910e0 panfrost/ci: Enable G610 piglit job
Make `panfrost-g610-piglit:arm64` a pre-merge job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38182>
2025-11-03 07:24:17 +00:00
Valentine Burley
d11d83dee6 panfrost: Don't dump shader disassembly by default on CSF
Dumping disassembly when not explicitly requested to do so was probably
helpful during early CSF bringup. But the CSF code is relatively robust
now, so let's move this to only happen if PAN_DBG_TRACE is set, similar
to what we do in the JM backend.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38182>
2025-11-03 07:24:17 +00:00
Valentine Burley
74d9a90546 panfrost/ci: Drop redundant PAN_MESA_DEBUG variables
This is already set in `.panfrost-test`.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38182>
2025-11-03 07:24:17 +00:00
Janne Grunau
83b97379dc hk: Report the correct plane count in VkDrmFormatModifierProperties2?EXT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes import of planar formats like NV12 in gtk4. Allows
`gst-launch-1.0 v4l2src ! gtk4paintablesink` to use vulkan instead of
falling back to OpenGL.

Closes: #14217
Cc: mesa-stable
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38200>
2025-11-03 07:09:36 +00:00
spencer-lunarg
943d7b246e llvmpipe: Fix warning casting 32-bit int to 8-bit
Signed-off-by: spencer-lunarg <spencer@lunarg.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38207>
2025-11-02 22:42:19 -05:00
Marek Olšák
5d92c92ce5 Revert ABI breakage "amd: Add user queue HQD count to hw_ip info"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit 56d758d321.

It broke ABI between Mesa and libdrm, causing crashes due to stack smashing.

See: https://gitlab.freedesktop.org/mesa/libdrm/-/issues/121#note_3172362

Fixes: 56d758d321
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38203>
2025-11-02 02:54:59 +00:00
Marek Olšák
2f6b4803ab nir/validate: expand IO intrinsic validation with nir_io_semantics
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There are many workarounds.

v2: add more validation

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38113>
2025-11-02 02:21:46 +00:00
Marek Olšák
390023f9fd nir/lower_io: force src offset=0 for any indirect access with num_slots == 1
This reduces indirect indexing of 1-element arrays to indexing with 0.
Without this, we fail an assertion later.

Discovered when writing a test.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38113>
2025-11-02 02:21:46 +00:00
Marek Olšák
9125e34372 amd: lower get_ssbo_size in ac_nir_lower_resinfo
The code for lowering get_ssbo_size will be different in future chips,
so do it in common code to reduce duplication in the future.

Lower get_ssbo_size to ssbo_descriptor_amd + nir_channel.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38097>
2025-11-02 01:42:07 +00:00
Marek Olšák
3e2c11597a nir: add nir_intrinsic_ssbo_descriptor_amd for lowering get_ssbo_size
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38097>
2025-11-02 01:42:07 +00:00
Dave Airlie
6a70406bb2 lavapipe: use vk_query_pool as the base for lvp_query_pool
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This just moves to the common code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 06:14:22 +10:00
Dave Airlie
3fc9c072b2 lavapipe: drop instance pointer from lvp_device.
This can be gotten elsewhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 06:00:38 +10:00
Dave Airlie
f819e269f6 lavapipe: drop physical device pointer from lvp_device
Use the base pointer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:53:02 +10:00
Dave Airlie
b2db496ea3 lavapipe: drop unneeded physical device in sparse image format props
This isn't used here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:50:47 +10:00
Dave Airlie
7aef746de6 lavapipe: drop device pointer from pipeline cache
This is unused

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:43:51 +10:00
Dave Airlie
5875d6cf93 lavapipe: drop device pointer from queue
Just use the copy in the base

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:42:31 +10:00
Dave Airlie
fe5a99175f lavapipe: drop device pointer from pipeline object
Just get it from the base object.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:39:11 +10:00
Dave Airlie
8fae2cb67f lavapipe: drop device pointer from lvp_cmd_buffer
just get it from the vk object.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:38:44 +10:00
Dave Airlie
8e01a11a00 lavapipe: remove image pointer from lvp_image_view
Just use the underlying image pointer and pack the struct a bit
better.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:27:48 +10:00
Dave Airlie
9f0b57ce41 lavapipe: drop unused macro.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:13:29 +10:00
Dave Airlie
49c7b69020 lavapipe: cleanup some whitespace in lvp_private.h
This just has some wierd inconsistent stuff, clean it up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:10:26 +10:00
Dave Airlie
cde13f3674 lavapipe: drop lavapipe specific macro for generic one.
These can just all use the standard VK macro we define.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38198>
2025-11-02 05:01:12 +10:00
Arcady Goldmints-Orlov
be2e4b6fde kk: Enable independentBlend
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38154>
2025-11-01 16:31:27 +00:00
Arcady Goldmints-Orlov
4c7c5a2a11 kk: enable VK_KHR_vertex_attribute_divisor
And also VK_EXT_vertex_attribute_divisor

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38154>
2025-11-01 16:31:26 +00:00
Arcady Goldmints-Orlov
ef66fdf47c kk: enable VK_KHR_workgroup_memory_explicit_layout
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38154>
2025-11-01 16:31:24 +00:00
Alyssa Rosenzweig
aa9f937116 asahi,ail: fix multi-plane imports
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We need to handle plane offsets everywhere. I noticed this broken before but
didn't realize it was a GL driver issue. Fix is easy, wrote this on my sofa
while waking up in the morning.

Fixes gst-launch-1.0 v4l2src ! glimagesink

Note that cheese & snapshot both still hang for some reason due to
libgstpipewire, but the Mesa side should be fine now.

Closes: #14217
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38160>
2025-11-01 14:06:32 +00:00
Ian Romanick
2e8b89ec60 elk: Apply vgrf127 workaround in more cases
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No shader-db changes on Broadwell. Older platforms were not tested.

Fixes: e7b7d572b3 ("intel/fs/ra: Re-arrange interference setup")
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38122>
2025-10-31 22:55:53 +00:00
Ian Romanick
3e6af6c5bb brw: Apply Gfx9 vgrf127 workaround in more cases
No shader-db changes on any Intel platform.

fossil-db:

Skylake
Intel(R) HD Graphics 530 (SKL GT2)
Totals:
Cycle count: 57669758527 -> 57669757913 (-0.00%); split: -0.00%, +0.00%

Totals from 10 (0.00% of 1736875) affected shaders:
Cycle count: 274949 -> 274335 (-0.22%); split: -0.36%, +0.14%

This change is likely due to subtle differences of different registers
being allocated.

In addition, fossils/google-meet-clvk/BgBlur.1f58fdf742c27594.1.foz and
fossils/google-meet-clvk/Relight.1f58fdf742c27594.1.foz stopped failing
EU validation on Gfx9 platforms.

Closes: #14171
Fixes: e7b7d572b3 ("intel/fs/ra: Re-arrange interference setup")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38122>
2025-10-31 22:55:53 +00:00
Caio Oliveira
b7e2041750 anv, hasvk: Don't assert on alignment if the value is known to be zero
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 7be63ef956 ("intel: do not NIH util_is_aligned")
Reported-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38194>
2025-10-31 22:18:50 +00:00
Pohsiang (John) Hsu
59b10dbe80 mediafoundation: add support for initial pool size and max pool size for stats pool
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:47:08 -07:00
Silvio Vilerino
00700bae45 mediafoundation: Check for PIPE_VIDEO_CODEC_UNIT_LOCATION_FLAG_MAX_SLICE_SIZE_OVERFLOW in calls to get_slice_bitstream_data
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:47:04 -07:00
Silvio Vilerino
e0394008ac d3d12: Add buffer size check to d3d12_video_encoder_get_slice_bitstream_data
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:46:58 -07:00
Silvio Vilerino
087b1f4948 mediafoundation: Remove stale call to MFCreateMemoryBuffer
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:46:54 -07:00
Silvio Vilerino
871a1a20ef d3d12: Bump min size in d3d12_video_encoder_calculate_max_output_compressed_bitstream_size
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:46:49 -07:00
Silvio Vilerino
7fb5c10f65 mediafoundation: Add a min slice buffer size stopgap
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:46:44 -07:00
Silvio Vilerino
027b523398 mediafoundation: Fix num_output_buffers for PIPE_VIDEO_SLICE_MODE_AUTO
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:46:40 -07:00
Silvio Vilerino
a3d072a301 d3d12: Fix max slice worst case estimation for PIPE_VIDEO_SLICE_MODE_AUTO
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:46:35 -07:00
Silvio Vilerino
3c983ecdb1 d3d12: Fix hang in d3d12_video_encoder_extract_encode_metadata with PIPE_VIDEO_SLICE_MODE_AUTO
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38195>
2025-10-31 13:46:20 -07:00
Mary Guillemard
3fc652a060 people: Update my email
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: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38192>
2025-10-31 19:11:10 +00:00
Mary Guillemard
0f9d3a5c37 mailmap: Update my email
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38192>
2025-10-31 19:11:10 +00:00
Aitor Camacho
9c9b9208f5 kk: Fix addressModeW for unnormalized coordinates
Acked-By: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38185>
2025-10-31 18:55:31 +00:00
Aitor Camacho
e44a776f47 kk: Avoid Metal validation error due to empty calls
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38174>
2025-10-31 16:54:39 +00:00
Icenowy Zheng
cc60a7a39d gallivm: orcjit: remember Context in addition to ThreadSafeContext
The llvm::orc::ThreadSafeContext object wraps an llvm::Context and keeps
its reference.

As we are no longer able to squeeze out Context from ThreadSafeContext
in LLVM 21, do not let ThreadSafeContext create Context implicitly for
LLVM 21, instead explicitly create Context and then remember it.

This also eliminates the code creating a Context that is never disposed.

Fixes: cd129dbf8a ("gallivm: support LLVM 21")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37684>
2025-10-31 16:22:01 +00:00
Samuel Pitoiset
cb4e0c4140 radv: add a workaround for illegal depth/stencil descriptors with No Man's Sky
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Using descriptors with both depth and stencil aspects is illegal in
Vulkan and this hangs the GPU.

Use NULL descriptors to mitigate the issue. Note that AMDVLK also
ignores them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13325
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38180>
2025-10-31 15:46:55 +00:00
Alyssa Rosenzweig
82b7cdeac9 people: add Yonggang
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:58 +00:00
Alyssa Rosenzweig
83303aa05d pvr: don't NIH alignment helpers
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:58 +00:00
Alyssa Rosenzweig
603bfa34d9 panfrost,tu: use util_is_aligned
I was hoping this would catch more... Oh well.

Via Coccinelle patch:

    @@
    expression x, pot;
    @@

    -align(x, pot) == x
    +util_is_aligned(x, pot)

    @@
    expression x, pot;
    @@

    -ALIGN(x, pot) == x
    +util_is_aligned(x, pot)

    @@
    expression x, pot;
    @@

    -ALIGN_POT(x, pot) == x
    +util_is_aligned(x, pot)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:58 +00:00
Alyssa Rosenzweig
6ac9bfdd1c asahi: do not NIH util_is_aligned
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:58 +00:00
Alyssa Rosenzweig
5f53e6edc0 intel: use util_is_aligned more
Coccinelle + filtering hunks manually.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:58 +00:00
Alyssa Rosenzweig
7be63ef956 intel: do not NIH util_is_aligned
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:57 +00:00
Alyssa Rosenzweig
a014daea8f nir: use alignment helpers more
Coccinelle + filtering hunks manually +

    @@
    expression pt, pot;
    typedef uintptr_t;
    @@

    -util_is_aligned((uintptr_t)(pt), pot)
    +util_ptr_is_aligned(pt, pot)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:57 +00:00
Alyssa Rosenzweig
1ff43db789 util: add util_ptr_is_aligned helper
This composition comes up a bunch.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:57 +00:00
Lionel Landwerlin
24179d96a1 Revert "anv: Convert DEBUG_SPARSE logging to use mesa_log"
This reverts commit bee04c63ba.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38186>
2025-10-31 16:22:48 +02:00
Mike Blumenkrantz
e152c80d18 zink: add back atomics for internal refcounts
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
in extensive testing, using no atomics at all is a bit too loose for
basic/common cases like sharing a vertex bufer between contexts, readily
leading to unintended behavior

keeping the atomics internal ensures that they remain in the same ccx,
which avoids impacting performance

it does require a little trickery to avoid an extra atomic in the buffer
decrement case, however

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38176>
2025-10-31 12:40:43 +00:00
Tapani Pälli
f48df6f45c anv: bring back some lost game drirc workarounds for subgroups
Fixes: d39e443ef8 (" anv: add infrastructure for common vk_pipeline")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38179>
2025-10-31 12:18:37 +00:00
Christian Gmeiner
3c7fa2e6eb anv: Convert DEBUG_HEAPS logging to use mesa_log
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Replace fprintf with the mesa_log API.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38171>
2025-10-31 11:45:47 +00:00
Eric R. Smith
5e380ca7e5 panfrost/panvk: Add size calculations to compiler register code
This helps us to more accurately count the number of registers that
need to be spilled to keep us below the maximum.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37188>
2025-10-31 10:12:21 +00:00
Gert Wollny
43d9765e35 r600/sfn: AR loads are not dependend on the future and other code blocks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If the AR is loaded from a register changing that register in a loop was
resulting in a scheduling failure because the AR load was made dependend
on a later instruction. Fix the dependencies by only using dependencies on
older instruuctions in the same block.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14114
Fixes: d21054b4bc ("r600/sfn: Add pass to split addess and index register loads")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38056>
2025-10-31 09:55:23 +00:00
Christian Gmeiner
bee04c63ba anv: Convert DEBUG_SPARSE logging to use mesa_log
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38177>
2025-10-31 09:19:19 +00:00
Georg Lehmann
cbf5c881a5 aco/opcodes: remove VOP3 alias for new gfx12 VOP2 opcodes
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38156>
2025-10-31 08:31:03 +00:00
Georg Lehmann
0f54136730 aco/isel: emit vop2 v_lshlrev_b64 for gfx12+
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38156>
2025-10-31 08:31:03 +00:00
Georg Lehmann
7ac67e2711 aco/isel: emit vop2 v_max_f64 for gfx12+
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38156>
2025-10-31 08:31:03 +00:00
Georg Lehmann
8397b91934 aco/isel: emit vop2 v_min_f64 for gfx12+
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38156>
2025-10-31 08:31:02 +00:00
Georg Lehmann
2e120d4e26 aco/isel: emit vop2 v_mul_f64 for gfx12+
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38156>
2025-10-31 08:31:01 +00:00
Georg Lehmann
86ea462f4d aco/isel: emit vop2 v_fadd_f64 for gfx12+
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38156>
2025-10-31 08:31:01 +00:00
Georg Lehmann
7d2325b194 aco/lower_to_hw: emit vop2 for gfx12+ fp64 reductions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38156>
2025-10-31 08:31:00 +00:00
Samuel Pitoiset
968fb06a94 radv,vulkan: replace VK_RENDERING_INPUT_ATTACHMENT_NO_CONCURRENT_WRITES_BIT_MESA
The new flag from maintenance10 has similar meaning.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:23 +00:00
Samuel Pitoiset
c8aaf3f5b5 radv: advertise VK_KHR_maintenance10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:22 +00:00
Samuel Pitoiset
14639898d0 radv: add support for controlling sRGB transfer function with resolves
Just need to use UNORM image views.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:22 +00:00
Samuel Pitoiset
0034f5a948 radv: allow ds<->color copies on compute/transfer queues
This should be supported just fine.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:22 +00:00
Samuel Pitoiset
49128926d6 radv: implement new input attachment information for dynamic rendering
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:21 +00:00
Samuel Pitoiset
18fec61c8d radv: reverse the logic for NO_CONCURRENT_WRITES_BITS_MESA
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:21 +00:00
Samuel Pitoiset
d3924f5bd6 radv: add support for depth/stencil resolves with vkCmdResolve2()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:20 +00:00
Samuel Pitoiset
8306256e2a radv: allow NULL pSamplesMask with vkCmdSetSampleMaskEXT()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:19 +00:00
Samuel Pitoiset
d5d2a4ad07 radv: implement vkCmdEndRendering2KHR()
Common runtime code already does CmdEndRendering()->CmdEndRendering2().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043>
2025-10-31 07:51:19 +00:00
Paul Gofman
63aec75981 driconf: add a workaround for Investigation Stories : gunsound
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38152>
2025-10-31 07:27:45 +00:00
Aitor Camacho
3f7ee1fef8 kk: Use our own driverID value
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
LOLed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38175>
2025-10-31 03:07:45 +00:00
Marek Olšák
9def0a6e5b ac/nir: set support_indirect_inputs/outputs in common code
This fixes mesh shader performance of RADV for GravityMark by stopping
the lowering of ClipDistance[64][4] indirect access for mesh shader outputs.

The perf improvement is 14% on Navi48.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38155>
2025-10-31 00:57:46 +00:00
Marek Olšák
86dd74aaeb nir/lower_indirect_derefs: don't lower compact arrays unconditionally to fix perf
This fixes bad mesh shader performance. See the comment.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38155>
2025-10-31 00:57:46 +00:00
Christian Gmeiner
cb6cb2697e etnaviv: isa: Add norm_mul instruction
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Blob generates such norm_mul for glmark2:shadow benchmark on STM32MP257.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38172>
2025-10-31 00:34:57 +01:00
Dylan Baker
79f4eca2f0 anv: Fix potential overflow from doing 32bit math on 64bit types
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
By using a 64bit unsigned to iterate instead of a plain unsigned

CID: 1646981
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35243>
2025-10-30 21:36:58 +00:00
Dylan Baker
a6102f7432 intel/mda: Use a vector to track the contents variable
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I'm not really sure why Coverity doesn't tag the `delete[]` as a
potential leak since it also happens after ASSERT macros, like it did
with the call to `fclose()`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37744>
2025-10-30 20:03:24 +00:00
Dylan Baker
9509d0d8b8 intel/mda: Use GTEST fixtures to manage File handles
Coverity points out that if the asserts fail, then the file won't be
closed, and therefore wont be deleted. We'd like to avoid littering the
temp directory with useless files.

This uses GTEST's `TEST_F` feature with a custom class to manager the
creation and destruction of the tmpfile.

CID: 1666502
CID: 1666525
CID: 1666579
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37744>
2025-10-30 20:03:24 +00:00
Daniel Schürmann
b3615e5d6f nir/algebraic: ad-hoc constant-fold ALU instructions
Slight differences due to different optimization order.
Totals from 135 (0.17% of 79839) affected shaders: (Navi48)
Instrs: 287852 -> 287527 (-0.11%); split: -0.15%, +0.03%
CodeSize: 1522972 -> 1521764 (-0.08%); split: -0.12%, +0.04%
Latency: 1806803 -> 1825754 (+1.05%); split: -0.08%, +1.12%
InvThroughput: 242693 -> 244703 (+0.83%); split: -0.02%, +0.84%
VClause: 4092 -> 4084 (-0.20%)
SClause: 7462 -> 7478 (+0.21%)
Copies: 20509 -> 20401 (-0.53%); split: -0.74%, +0.21%
Branches: 6395 -> 6386 (-0.14%)
PreSGPRs: 7334 -> 7337 (+0.04%); split: -0.03%, +0.07%
PreVGPRs: 6375 -> 6382 (+0.11%)
VALU: 151787 -> 151595 (-0.13%); split: -0.15%, +0.02%
SALU: 52967 -> 52910 (-0.11%); split: -0.23%, +0.12%
VMEM: 6704 -> 6696 (-0.12%)
SMEM: 12099 -> 12129 (+0.25%)

Tested on a small collection of 2518 shaders from Dredge with callgrind using RADV:
baseline:
  nir_opt_algebraic was called 12917 times from radv_optimize_nir()
  nir_opt_cse was called 15204 times from radv_optimize_nir()
  relative time spent in radv_optimize_nir(): 31.48%
  total instruction fetch cost: 28,642,638,021

with nir/algebraic: ad-hoc constant-fold ALU instructions
  nir_opt_algebraic was called 12797 times from radv_optimize_nir()
  nir_opt_cse was called 12963 times from radv_optimize_nir()
  relative time spent in radv_optimize_nir(): 30.63%
  total instruction fetch cost: 28,284,386,123

=> ~1.27% improvement in total compile times

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:07 +00:00
Daniel Schürmann
10be538851 tree-wide: don't call nir_opt_constant_folding after nir_lower_flrp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:07 +00:00
Daniel Schürmann
9039e24751 nir/lower_flrp: ad-hoc constant-fold ALU instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:07 +00:00
Daniel Schürmann
f61cd64af8 nir/builder: add option to immediately constant-fold ALU instructions upon insertion
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:07 +00:00
Daniel Schürmann
280eb2d689 vulkan/nir: call nir_opt_constant_folding() during vk_spirv_to_nir()
This prevents bugged CTS tests from tripping over with the following commits.

dEQP-VK.spirv_assembly.instruction.compute.float_controls.fp32.generated_args.denorm_sstep_denorm_flush_to_zero
dEQP-VK.spirv_assembly.instruction.graphics.float_controls.fp32.generated_args.denorm_sstep_denorm_flush_to_zero_*

These tests exhibit undefined values where the result depends on the ordering
of nir_opt_algebraic and nir_opt_constant_folding.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:07 +00:00
Daniel Schürmann
870616af34 nir/constant_folding: switch to nir_shader_lower_instructions()
Small differences due to implicit DCE.
Totals from 76 (0.10% of 79839) affected shaders: (Navi48)

Instrs: 168051 -> 168044 (-0.00%); split: -0.01%, +0.01%
CodeSize: 893284 -> 893256 (-0.00%); split: -0.01%, +0.01%
Latency: 1082007 -> 1082027 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 155100 -> 155105 (+0.00%)
Copies: 9649 -> 9654 (+0.05%)
VALU: 92504 -> 92509 (+0.01%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:07 +00:00
Daniel Schürmann
d1f2f1222e nir: guard nir_def_as_alu()
We will potentially create load_const_instr instead of ALU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:06 +00:00
Daniel Schürmann
3180656bbc nir: don't use nir_build_alu() with incomplete sources
Ideally we'd have a version that takes nir_scalar arguments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:06 +00:00
Daniel Schürmann
ef9ecc4058 nir: add nir_imul_nuw() and nir_imul_imm_nuw() helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
2025-10-30 19:28:06 +00:00
Sushma Venkatesh Reddy
36d7cd0514 drirc: Add anv_assume_full_subgroups for Detroit: Become Human
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add workaround to assume full 32-thread subgroups. This fixes rendering
corruption when running the Detriot: Become Human game using anv driver.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14120

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38168>
2025-10-30 18:27:34 +00:00
Caio Oliveira
3334284845 brw: Don't set destination of branch instructions
In Gfx9+ the destination should be set to ARF null in all those cases, the
use of IP was a requirement of old versions only.  The already zeroed
bits will encode ARF null, so no need to set.

Skipping the helper avoids setting unwanted bits (like hstride), which
in Gfx12+ are MBZ.

This patch adjust the expectations of the asm tests to remove the dst
type and dst stride fields -- will expect them all zeroed.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36454>
2025-10-30 17:18:15 +00:00
Caio Oliveira
8c45ff9acb brw: Set relevant immediate bits for Gfx9-11 in JIP and UIP helpers
This is better than using the generic helper since will not set unwanted
bits (e.g. hstride) and it is already handling their case for Gfx12+
anyway.

There's an extra helper now for the case where src1 is not used.  In
Gfx9-11 it needs to be set to ARF but with a matching type of src0.

Assembler was updated to follow the same approach.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36454>
2025-10-30 17:18:15 +00:00
Caio Oliveira
adc353da3c brw: Fix MOV_INDIRECT lowering for various platforms
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Even though some platforms support int64 they don't support indirect
movs with 64-bit values.  Effectively this is only supported for non-LP
Gfx9.

This fixes various tests in dEQP-VK.spirv_assembly.instruction.compute.untyped_pointers.*.push_constant.*64*
on BMG.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38125>
2025-10-30 16:06:42 +00:00
Caio Oliveira
538fd7266e brw: Fix EU validation of VxH and Vx1 region
Use same approach as the other code checking for this vstride.  Argument
could be made we want to reuse the same enum value for both the encoded
and decoded version, but for now follow the existing practice.

This will cause
dEQP-VK.spirv_assembly.instruction.compute.untyped_pointers.vulkan_memory_model.type_punning.load.push_constant.int64_to_uint64
and similar tests to fail validation on BMG.  Later patch will fix that.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38125>
2025-10-30 16:06:42 +00:00
Rob Clark
15924e941c loader: Ignore empty override strings
If you somehow have MESA_LOADER_DRIVER_OVERRIDE= in your environment,
you certainly weren't trying to force load the driver named "".

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38165>
2025-10-30 15:44:40 +00:00
Serdar Kocdemir
7bc14977a8 gfxstream: Check host allocation mode for external memory
New host feature allows usage of external_memory_host extension
for external memory support, mainly for software renderers which
don't implement platform specific extensions.

Also moves enablement of queue_family_foreign outside of android,
to allow it also on linux guests (ref: github PR#74), and removes
the check for VK_MVK_moltenvk extension in favor of metal mode.

Test: -gpu lavapipe -feature VulkanNativeSwapchain on windows

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38153>
2025-10-30 15:27:26 +00:00
Jason Macnak
deb48556dc gfxstream: codegen changes for new filenames and namespaces
Bug: n/a
Test: build + CI

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38153>
2025-10-30 15:27:26 +00:00
Gurchetan Singh
a85e9b8d8a gfxstream: fix build after VK 1.4.33.0 spec update
The root cause is "Add initial Vulkan Base support", which refactors
Vulkan versions into smaller features (base + graphics + compute).
Not sure if this is the cleanest solution, but someone needs to
refactor gfxstream codegen anyways.

There's also can issue with VkRenderingArea.

Fixes: 61c71733c8 ("vulkan: update spec to 1.4.330")
TEST=libgfxstream_vulkan.so + gfxstream_backend.so (host) commpiles
     with new changes

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38153>
2025-10-30 15:27:26 +00:00
Faith Ekstrand
ba2645bc6d nvk: Enable ASTC on Tegra
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
2025-10-30 15:11:25 +00:00
Faith Ekstrand
f7412bd229 nvk: Add an NVK_DEBUG=coherent flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
2025-10-30 15:11:24 +00:00
Faith Ekstrand
5a5862c025 nvk: Document some environment variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
2025-10-30 15:11:23 +00:00
Faith Ekstrand
2f6b3b6b91 nvk: Don't re-initialize the descriptor writer if the set matches
The logic here before was wrong.  In the case where the set is the same,
it would avoid the flush but then re-initialize anyway, loosing the
dirty information and causing us not to actually flush out all the
descriptors.

Fixes: 1f0fda22f7 ("nvk: Flush descriptor set maps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
2025-10-30 15:11:23 +00:00
Mike Blumenkrantz
bae22fec7d zink: return mesh pipeline when creating mesh pipelines
Fixes: b05d93e71e ("zink: set gfx_pipeline_state::mesh_pipeline when updating pipeline")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38161>
2025-10-30 14:38:26 +00:00
Rob Clark
532a896f80 freedreno/a6xx: Additional handle import logging
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add additional error logging which can be enabled with
FD_MESA_DEBUG=layout to make it easier to debug handle
import failures.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37144>
2025-10-30 14:13:24 +00:00
Juan A. Suarez Romero
9d6bac7004 broadcom/ci: unlock more CI-Tron jobs
They will be run in parallel with baremetal ones, and after ensuring it
works fine, baremetal will be disabled.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38159>
2025-10-30 13:29:16 +00:00
Lorenzo Rossi
fa2c8c9d39 nak: Fix delay insertion missing WaR
Current code clears register writes after a register read is
encountered, this handles the first WaR but hides the write from the
reads that will succeed the first one. Ignoring subtle WaRaR hazards.
To fix this, we don't clear writes when a register read is encountered.

Thanks to Karol Herbst for finding and distilling this issue.

Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:12 +00:00
Lorenzo Rossi
7c39f69871 nak: Add cross-block instruction delay scheduling
Currently each block schedules instruction independently from other
blocks. Instructions in the block must then be scheduled conservatively
to remove possible hazards that can occur in previous blocks.

Replace the algorithm with an optimistic data-flow pass that takes into
account all the following blocks. Gains a minor performance improvement
across every shader (1-2%) and should never have any runtime performance
degradation.

Benchmarks:
furmark       34932 -> 35597 (+2%)
pixmark-piano 9027  ->  9113 (+1%)

Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:12 +00:00
Lorenzo Rossi
e6d4eaed2a nak/reg_tracker: Add SparseRegTracker
Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:12 +00:00
Lorenzo Rossi
dac8fc93d9 nak: Add latency_upper_bound to ShaderModel
Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:11 +00:00
Lorenzo Rossi
f1eb6d7d7b nak/dataflow: Fix typo in comments
Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:11 +00:00
Christian Gmeiner
aa71c8bfed anv: Convert DEBUG_PIPE_CONTROL logging to use mesa_log_stream
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Replace direct FILE* operations (fputs/fprintf to stdout) with the
mesa_log_stream API for pipe control debug output.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38157>
2025-10-30 10:26:28 +00:00
Eric Engestrom
0fe0acd4c3 util/meson: don't build libmesa_util_clflush unless needed
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: efbecd93ba ("util: Build util/cache_ops_x86.c with -msse2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38146>
2025-10-30 09:04:15 +00:00
Eric Engestrom
ccf33664e8 util/meson: don't build libmesa_util_clflushopt unless needed
Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38146>
2025-10-30 09:04:15 +00:00
Samuel Pitoiset
b2badb2b24 radv: ignore dual-source blending when blending isn't enabled for MRT0
The Vulkan spec says:
    "VUID-vkCmdDraw-maxFragmentDualSrcAttachments-09239
     If blending is enabled for any attachment where either the source
     or destination blend factors for that attachment use the secondary
     color input, the maximum value of Location for any output attachment
     statically used in the Fragment Execution Model executed by this
     command must be less than maxFragmentDualSrcAttachments"

Which means it must be disabled.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14190
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38107>
2025-10-30 07:59:50 +00:00
Samuel Pitoiset
14667eef53 radv: fix reserving enough space for emitting the SPM setup
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
4096 is an arbitrary but large enough number to emit everything needed.

Fixes: 22d73fc077 ("amd,radv,radeonsi: add ac_emit_spm_setup()")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38087>
2025-10-30 07:36:27 +00:00
Samuel Pitoiset
0dcb800a07 radv: remove some RADV_DEBUG deprecated options
They have been marked as deprecated in 25.3, so one release cycle
before they are removed completely.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38085>
2025-10-30 07:16:23 +00:00
Daniel Lang
48d6459701 etnaviv: Use FLOAT type for R32G32B32A32_{U,S}INT vertex formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The hardware requires FLOAT type in NFE.GENERIC_ATTRIB.CONFIG0 when
using 4-component 32-bit integer vertex attributes.

Passes dEQP-GLES3.functional.default_vertex_attrib.*

Signed-off-by: Daniel Lang <dalang@gmx.at>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38136>
2025-10-29 20:55:09 +00:00
Eric Engestrom
fdef10916e asahi/virtio: fix memleak
Fixes: c64a2bbff5 ("asahi: port to stable uAPI")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38149>
2025-10-29 20:41:29 +00:00
Pohsiang (John) Hsu
240b9159f4 mediafoundation: setup wpp logging in more of the files and add some error handling on dpb manager and reference frame tracker
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:28 +00:00
Pohsiang (John) Hsu
ab2457591b mediafoundation: periodic clang-format, no code changes
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:28 +00:00
Pohsiang (John) Hsu
d7e2754116 mediafoundation: for low latency, change stats pool size to 2, this is because there is no synchronization btwn returning MF sample and ProcessInput
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:28 +00:00
Silvio Vilerino
4169a7f36a mediafoundation: Add AVEncVideoReconstructedPictureOutputMode and MFSampleExtension_VideoEncodeReconstructedPicture
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:27 +00:00
Silvio Vilerino
0953924dbe mediafoundation: Add m_bHWSupportReadableReconstructedPicture
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
0aba51691b d3d12: d3d12_video_buffer - Expose associated data with subresource idx
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
db5d42d437 d3d12: video_processor: Use d3d12_video_buffer subresource indices
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
4fe1abe3dd d3d12: Support PIPE_BIND_SHARED resource creation
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
80627e3579 d3d12: Optimize d3d12_video_proc heap allocations
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
484eeb762e d3d12: Support d3d12_video_buffer_creation_mode::place_on_resource in d3d12_video_buffer_from_handle
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:25 +00:00
Silvio Vilerino
e55b2b5064 d3d12: Add get_video_enc_last_slice_completion_fence interop
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:25 +00:00
Silvio Vilerino
a22334e632 d3d12: d3d12_video_proc - Use async residency functions
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:24 +00:00
Silvio Vilerino
5009fe8fd0 d3d12: Implement PIPE_VIDEO_CAP_ENC_READABLE_RECONSTRUCTED_PICTURE
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:24 +00:00
Aitor Camacho
8e47589da8 kk: Add env variables to enable Xcode GPU capture
To enable GPU capture set MESA_KK_GPU_CAPTURE to 1
To dump GPU capture to a directory set MESA_KK_GPU_CAPTURE_DIRECTORY

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38068>
2025-10-29 20:13:53 +00:00
Aitor Camacho
6aff9d0ae8 kk: Fix Xcode GPU capture crash
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38068>
2025-10-29 20:13:53 +00:00
Mel Henning
bf58cfdc48 docs/envvars: Remove references to nine
nine is gone, so no need to document its env vars.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:39 +00:00
Mel Henning
93d51a423a docs/nvk: Document NVK_DEBUG=trash_memory
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:39 +00:00
Mel Henning
edd0cb6d56 docs/nvk: Update hardware support
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:39 +00:00
Mel Henning
b92521a019 docs/nvk: Add some developer hardware docs
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:38 +00:00
Mel Henning
0afd4bc831 docs/nvk: Add a list of external hardware docs
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:38 +00:00
Aitor Camacho
6da54821da kk: Reorder physical device extensions and features
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38137>
2025-10-29 19:33:35 +00:00
Aitor Camacho
6577d6c9f6 docs: Reorder VK_EXT_image_robustness
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38137>
2025-10-29 19:33:35 +00:00
Aitor Camacho
770486e11d docs: Add KosmicKrisp to Vulkan
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38137>
2025-10-29 19:33:35 +00:00
Dmitry Osipenko
bd8377bb04 virtio/vdrm: Fix varying offsets of struct vdrm_device members
Struct virgl_renderer_capset_drm has a varying size depending on whether
AMDGPU driver is enabled or not. This breaks offset of struct vdrm_device
members for non-AMD drivers when Mesa is built with multiple native context
drivers including the AMD driver. Place varying capsets in the end struct
vdrm_device to mitigate the issue.

Fixes: 5736280730 ("virtio/vdrm: add ENABLE_DRM_AMDGPU for c_args")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38096>
2025-10-29 19:14:25 +00:00
Juan A. Suarez Romero
e8cf90c837 broadcom/ci: adjust fractions for nightly jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Try to coverage as much as possible in a 15 minutes budget.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38143>
2025-10-29 18:48:28 +00:00
Eric Engestrom
f91949f67a docs: add sha sum for 25.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38142>
2025-10-29 18:42:59 +00:00
Eric Engestrom
fa92adae55 docs: add release notes for 25.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38142>
2025-10-29 18:42:59 +00:00
Eric Engestrom
f55ce8b1ac docs: update calendar for 25.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38142>
2025-10-29 18:42:59 +00:00
Mike Blumenkrantz
e1a4f53680 lavapipe: maintenance10
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38091>
2025-10-29 18:25:42 +00:00
Georg Lehmann
a17afd5edd aco/tests: add some simple fp64 modifier tests
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38011>
2025-10-29 17:57:53 +00:00
Georg Lehmann
a54f95c52f aco/optimizer: apply fp64 modifiers
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38011>
2025-10-29 17:57:53 +00:00
Georg Lehmann
62e664f8c8 aco/optimizer: fix applying 64bit neg/abs
extract is only valid for <=32bit operands.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38011>
2025-10-29 17:57:53 +00:00
Georg Lehmann
0c8b885e21 aco/isel: emit v_mul_f64 for fp64 fsat
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38011>
2025-10-29 17:57:52 +00:00
Georg Lehmann
9ece74ce79 aco/isel: emit v_mul_f64 with modifiers for fneg/fabs
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38011>
2025-10-29 17:57:52 +00:00
Georg Lehmann
c84f60ef08 aco/optimizer: replace 64bit mul with 1.0/-1.0 with bitwise instruction if possible
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38011>
2025-10-29 17:57:52 +00:00
Mike Blumenkrantz
272cf1db8e zink: don't destroy old push layout when enabling fbfetch descriptor
this may be in use by programs, and adding tracking/refcounting just to
delete a descriptor layout isn't worth the effort

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38141>
2025-10-29 17:28:50 +00:00
Yiwei Zhang
c6ff8ce373 panvk: support VK_EXT_device_memory_report
This change adds the minimum support for VK_EXT_device_memory_report,
which only reports device memory events at this point. We can make it
more useful later (like what's done in ANV) if desired by some tools.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37987>
2025-10-29 17:09:41 +00:00
Gert Wollny
317345cc98 r600/sfn: make sure kill and update_exec don't happen in one group
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
v2: - Correctly test in multi-slot split whether the group has kill if
      we want to add a multi-slot op.
    - update group_has_predicate if an according vector op was added

Fixes: 359bfc3138 ("r600/sfn: make sure that kill and update pred are not in the same group")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38112>
2025-10-29 16:23:34 +00:00
Gert Wollny
0d065a2421 r600/sfn: Track whether a ALU group has a exec flag update
Fixes: 359bfc3138 ("r600/sfn: make sure that kill and update pred are not in the same group")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38112>
2025-10-29 16:23:34 +00:00
Gert Wollny
51e7c477d6 r600/sfn: move some common code into try_readport
Fixes: 359bfc3138 ("r600/sfn: make sure that kill and update pred are not in the same group")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38112>
2025-10-29 16:23:34 +00:00
Gert Wollny
a7f477b51f r600/sfn: extract function to update group after instr insert
Fixes: 359bfc3138 ("r600/sfn: make sure that kill and update pred are not in the same group")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38112>
2025-10-29 16:23:34 +00:00
Alyssa Rosenzweig
b82044c31b nir/lower_two_sided_color: cleanup
while in the area. no functional change

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38124>
2025-10-29 15:52:27 +00:00
Mike Blumenkrantz
343eef990e zink: collapse mesh pipeline fetching and binding conditionals
this avoids taking the wrong conditional if a pipeline fetch fails

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38134>
2025-10-29 15:30:47 +00:00
Mike Blumenkrantz
0b24fd174a zink: collapse gfx pipeline fetching and binding conditionals
this avoids taking the wrong conditional if a pipeline fetch fails

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38134>
2025-10-29 15:30:47 +00:00
Mike Blumenkrantz
b05d93e71e zink: set gfx_pipeline_state::mesh_pipeline when updating pipeline
this otherwise returns null for successive draws without state change

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38134>
2025-10-29 15:30:46 +00:00
Silvio Vilerino
364208f754 pipe: Add PIPE_VIDEO_CAP_ENC_READABLE_RECONSTRUCTED_PICTURE
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38089>
2025-10-29 14:53:47 +00:00
Georg Lehmann
dbc3bbdcef aco/optimizer: rework canonicalized label
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
To not rely on register classes, which are ambiguous.

Stats improvements are coming from the new phi handling.

Foz-DB Navi21:
Totals from 92 (0.12% of 79789) affected shaders:
Instrs: 352577 -> 346634 (-1.69%)
CodeSize: 1941236 -> 1933608 (-0.39%); split: -0.44%, +0.04%
VGPRs: 7888 -> 7832 (-0.71%)
Latency: 4364419 -> 4363894 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 1502867 -> 1501871 (-0.07%); split: -0.07%, +0.00%
SClause: 5021 -> 5005 (-0.32%); split: -0.34%, +0.02%
Copies: 18469 -> 18485 (+0.09%); split: -0.16%, +0.24%
Branches: 6131 -> 6119 (-0.20%)
VALU: 267063 -> 261219 (-2.19%)
SALU: 32294 -> 32228 (-0.20%); split: -0.21%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37867>
2025-10-29 14:29:21 +00:00
Georg Lehmann
c61ee32034 aco/optimizer: add seperate fp16 abs/neg/fcanonicalize labels
In the future, we can't use the register class to detect fp16 vs fp32
because SALU uses s1 for both.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37867>
2025-10-29 14:29:21 +00:00
Georg Lehmann
9e9d9c0373 aco/optimizer: re-index labels
Everything after and including the omod labels will be removed soon.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37867>
2025-10-29 14:29:21 +00:00
Marek Olšák
71f73b21e6 radeonsi/ci: update failures
the failures are not related to ACO

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38070>
2025-10-29 14:11:22 +00:00
Marek Olšák
e26c28f311 radeonsi: enable ACO by default
NIR+ACO is the best SSA-based shader compiler for AMD GPUs that exists.

There are many reasons why NIR+ACO is better than LLVM, and I have a long
list that I've collected over the years, but the major ones are better GPU
performance (faster GPU memory access thanks to better clauses and
scheduling, a lot less SGPR/VGPR spilling, better loop support, slightly
smaller shader binaries), 8x lower shader compile times, and smaller memory
footprint of the IR.

It also shows that NIR is a mature SSA-based shader compiler that helps
drivers generate optimized code very quickly.

And most importantly, radeonsi has slightly better Viewperf performance
with NIR+ACO than LLVM, and that's difficult to ignore.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38070>
2025-10-29 14:11:22 +00:00
Martin Roukala (né Peres)
4713df944b Revert "ci: disable mupuf's farm during the planned electric outtage"
This reverts commit f108c2339de6bab9596d9cf81f7553f961855dfe now that
my electricity is back.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38133>
2025-10-29 13:54:54 +00:00
Zan Dobersek
dc60216470 tu: remove data size assert in tu_GetQueryPoolResults
tu_GetQueryPoolResults() currently asserts that the passed-in data size is
larger than the multiplication result of the specified stride and query
count. Such assert isn't useful when retrieving results for a single query
since the specified stride isn't important and can be any value.

The assert is removed, incorrect data sizing should be easily detectable by
existing validation tools.

Fixes dEQP-VK.query_pool.occlusion_query.stride_max in VKCTS 1.4.4.0.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38028>
2025-10-29 13:32:03 +00:00
Marek Olšák
4799dc9447 ac/surface: pass all ac_compute_surface info via ac_surf_config, not radeon_surf
radeon_surf stops being an input to ac_compute_surface. It's only an output
now.

This makes it clear which fields affect ac_compute_surface.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:44 +00:00
Marek Olšák
966cb36722 amd: constify struct radeon_surf
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:44 +00:00
Marek Olšák
feaa359b43 ac/surface: move surf_index and fmask_surf_index into ac_addrlib
They don't have to be in drivers.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:43 +00:00
Marek Olšák
6857fbba59 ac/surface: pass ac_addrlib* everywhere instead of ADDR_HANDLE
ac_addrlib will contain more stuff.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:42 +00:00
Marek Olšák
0e44a5a1c6 radv: set RADEON_SURF_SHAREABLE for surf_index logic
use_tile_swizzle uses this flag

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:42 +00:00
Marek Olšák
2bbc7d1db6 radv: move more surf_index logic to use_tile_swizzle
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:41 +00:00
Marek Olšák
ca6ba34669 radv: move VK_IMAGE_USAGE_HOST_TRANSFER_BIT checking to ac_surface.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:40 +00:00
Marek Olšák
20eada1bc4 radv: don't check vk_format_is_depth_or_stencil for surf_index
already checked by use_tile_swizzle

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:39 +00:00
Marek Olšák
1271850b9b radv: don't check VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT for surf_index
already checked by use_tile_swizzle

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:39 +00:00
Marek Olšák
f0fde95e20 radv: don't set ac_surf_index::surf_index to NULL
ac_surface.c already checks RADEON_SURF_SCANOUT.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:38 +00:00
Marek Olšák
482cc60345 winsys/amdgpu: don't set ac_surf_info::surf_index = NULL
ac_surface.c already checks RADEON_SURF_Z_OR_SBUFFER.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:36 +00:00
Marek Olšák
55d222c47b ac/surface: add helper use_tile_swizzle to consolidate that logic
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:35 +00:00
Marek Olšák
484a36302d amd: don't use non-existent GL1 packet fields on gfx12
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:34 +00:00
Marek Olšák
12062110ab amd: don't use non-existent GLM packet fields on gfx12
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38093>
2025-10-29 12:50:34 +00:00
Zan Dobersek
607aba5697 tu/a7xx: use DI_SRC_SEL_AUTO_XFB for CmdDrawIndirectByteCountEXT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Use DI_SRC_SEL_AUTO_XFB as the source select mode for
CmdDrawIndirectByteCountEXT. Previously DI_SRC_SEL_AUTO_INDEX was used to
match the proprietary driver, but this mode doesn't correctly utilize the
counter offset value.

Fixes: dEQP-VK.transform_feedback.simple*.*_counter_offset_*

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38108>
2025-10-29 11:28:16 +00:00
Zan Dobersek
ba054f1c33 tu: emit PC_DGEN_SO_CNTL for any shader type during streamout setup
During streamout setup, emit PC_DGEN_SO_CNTL for any shader type if
supported, not just tess eval. This avoids excluding degenerate
primitives from stream output.

Fixes: dEQP-VK.transform_feedback.primitive_restart.*

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38108>
2025-10-29 11:28:16 +00:00
Juan A. Suarez Romero
44022bc33e v3dv: enable forward facing primitive for lines and points
Otherwise these primitives will be discarded.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38105>
2025-10-29 11:10:59 +00:00
Juan A. Suarez Romero
2036240b7c v3d: enable forward facing primitive for lines and points
Otherwise these primitives will be discarded.

This fixes `spec@!opengl 1.1@point-line-no-cull`.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38105>
2025-10-29 11:10:59 +00:00
Job Noorman
e16be20195 rusticl: fix mismatched-lifetime-syntaxes lint warning
This warn-by-default lint introduced in Rust 1.89.0 causes the following
warning:

warning: hiding a lifetime that's elided elsewhere is confusing
   --> ../../src/gallium/frontends/rusticl/core/semaphore.rs:276:14
    |
276 |     fn state(&self) -> MutexGuard<SemaphoreState> {
    |              ^^^^^     -------------------------- the same lifetime is hidden here
    |              |
    |              the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
276 |     fn state(&self) -> MutexGuard<'_, SemaphoreState> {
    |                                   +++

Follow the compiler's suggestion to fix this.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38132>
2025-10-29 10:35:29 +00:00
Martin Roukala (né Peres)
39e2db5dfc ci: disable mupuf's farm during the planned electric outtage
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
My electricity provider has informed me that there could be a power cut
for ~3h today, so let's preemptively disable the farm.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38130>
2025-10-29 10:08:51 +00:00
Christian Gmeiner
84ea560e11 bin/ci: Update python-gitlab to 5.x for Python 3.14 compatibility
Update python-gitlab from 4.x to 5.x to fix AttributeError with
__annotations__ when running on Python 3.14. The 4.x series is
incompatible with Python 3.14 due to changes in how class annotations
are handled.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38123>
2025-10-29 08:16:39 +00:00
Christian Gmeiner
c4c545b287 bin/ci: Fix SyntaxWarning about return in finally block
Remove the finally block with a return statement in GitlabGQL.query()
method. This pattern causes a SyntaxWarning in Python 3.14 as the return
in finally will override any return value or exception from the try/except
blocks.

Move the return statement to the end of the except block where it belongs,
maintaining the same error recovery behavior while fixing the warning.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38123>
2025-10-29 08:16:39 +00:00
Sagar Ghuge
a00560f763 vulkan/runtime: Fix typo in stack size calculation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 69a04151db ("vulkan/runtime: add ray tracing pipeline support")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38115>
2025-10-28 17:00:47 -07:00
Nanley Chery
aa86530056 anv: Allow modifiers on depth images
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The compressed and uncompressed Tile4 modifiers are supported on Xe2+.
The uncompressed TileY and Tile4 modifiers are easily supported on older
platforms.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38095>
2025-10-28 22:05:54 +00:00
Nanley Chery
5a05a39e56 anv: Limit the SCANOUT flag to color images
This will matter with the next patch, when we'll start importing and
exporting depth dmabufs with modifiers.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38095>
2025-10-28 22:05:54 +00:00
Alyssa Rosenzweig
7a71952762 anv: use D3D-compatible texturing for Proton
Intel & AMD Direct3D drivers modify their rounding behaviour for texturing to
match Direct3D expectations. Such behaviour is not conformant in Vulkan, and
Intel hardware lacks a reasonable way to get NVIDIA's behaviour (which uniquely
works for Vulkan & Direct3D). The second best choice is to use
Direct3D-compatible behaviour for Proton (via driconf) and our current
Vulkan-conformant behaviour everywhere else. Given the APIs diverge and there is
no Vulkan extension to control the behaviour explicitly, driconf'ing on the
engineName is the reasonable solution.

anv already has a anv_force_filter_addr_rounding driconf option to force
Direct3D behaviour for certain Direct3D titles. Here we simply apply it to all
D3D10+ titles, aligning us with the Windows driver.

Note that D3D9 does not have this behaviour. We therefore use standard Vulkan
behaviour for D3D9 to avoid breaking D3D9 titles, even though the engineName is
the same as D3D10+.

This is the same solution radv uses, they call it radv_disable_trunc_coord. We
could unify the driconf entries later.

See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38098#note_3166306
for a more detailed analysis, as well as the linked references:

   https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27337
   https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25911
   https://github.com/HansKristian-Work/vkd3d-proton/pull/1884

This fixes misrendering in piles of Direct3D games run on anv via Proton,
including Assassin's Creed Valhalla.

Cc: mesa-stable
Closes: #13886
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Co-authored-by: Calder Young <cgiacun@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38114>
2025-10-28 21:29:20 +00:00
Connor Abbott
ece66be5a1 freedreno: Make BV ROQ registers a7xx-only
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These registers don't exist on a8xx.

Fixes: f0d7f2174e ("freedreno/a7xx: Add BV registers for ROQ status")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38117>
2025-10-28 20:46:42 +00:00
Iván Briano
473119ab91 brw: plug some holes in brw_wm_prog_data
Remove two unused fields, and move a lonely boolean a bit up to plug the
remaining hole.

Because I was looking around and it bothered me.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38116>
2025-10-28 20:24:23 +00:00
Yiwei Zhang
b54cb5840c panvk: use nir_log_shader to log NIR on Android
This makes it easy for NIR debug on Android, while not affecting the
default behavior on Linux.

Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38066>
2025-10-28 19:56:16 +00:00
Connor Abbott
ea24dce5e3 tu/a7xx: Support concurrent binning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:26 +00:00
Connor Abbott
4ac666eaa7 tu: Use predicate bit for perf queries
Start to take advantage of a6xx gen3+ having multiple predicate bits.
For now we define 2 predicate bits, but there will be more for
concurrent binning.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:26 +00:00
Connor Abbott
46438d407d freedreno: Add has_pred_bit feature bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:26 +00:00
Connor Abbott
12779451ee tu: Correctly set GRAS_LRZ_CB_CNTL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:26 +00:00
Connor Abbott
50aa66a7c1 tu: Rewrite visibility stream allocation
The mechanism implemented in the hardware to synchronize against Write
after Read hazards with the visibility stream for concurrent binning is
for BV and BR to keep track of the number of render passes they have
finished and BV waits until
BR_count >= BV_count - vis stream count. For example, if
there are two visibility streams and the user submits three
renderpasses, before starting renderpass #3 BV will wait for BR to
finish renderpass #1. It's assumed that renderpass #3 and #2 use
different visibility streams, so it's safe to start working on #3 once
 #2 is done.

This mechanism is assumed to work across renderpasses and even submits,
and the only way to reset the BR/BV counts is via
CP_RESET_CONTEXT_STATE which is only done by the kernel when
switching contexts. This vastly complicates things for Vulkan,
where we have no idea what order command buffers will be submitted. This
means that we have to defer emitting the actual pointers until
submission time and create patchpoints instead. This gets unfortunately
very complicated with SIMULTANEOUS_USE_BIT where we have to update the
patchpoints on the GPU.

I've taken the liberty of also deferring the allocation of the
visibility stream until submit time. This will help us later move to
per-queue visibility streams, which will be necessary for supporting
multiple simultaneous queues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:25 +00:00
Connor Abbott
416dc87be9 tu: Initialize registers for BV
Start introducing commands to setup BV. We need to run the initial
register setup with both BR and BV enabled, and similarly we need to
setup a bin preamble for BV. A few magic registers are BR-only and
should be skipped when initializing BV. The VPC attribute carveout
registers are a bit special because they must be initialized in BR and
BV bin preambles, so they are pulled into a separate function.

This commit also switches the "default" thread control from BR with
concurrent binning disabled to BR with concurrent binning enabled. GMEM
renderpasses now explicitly disable concurrent binning. This is
necessary because switching from CB enabled to disabled and vice versa
imposes a synchronization, and we want BV to be able to skip over
compute dispatches, sysmem renderpasses, etc. to find the next binning
pass. GMEM renderpasses re-enable concurrent binning at the end to keep
the "default" thread control and avoid having to sprinkle
THREAD_CONTROL(BR) around all the other Vulkan commands that can run
outside of a renderpass (compute dispatch, blits, query pool operations,
etc.).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:24 +00:00
Connor Abbott
9ea3d7c393 tu/cs: Allow conditional execution in substreams
This should work perfectly fine for all modes. The only caveat is that
re-emitting the condition won't happen, but that's fine.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:24 +00:00
Connor Abbott
f12db79c5a tu: Add tu7_thread_control helper
We're about to emit a lot more CP_THREAD_CONTROL. Make it more
ergonomic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:23 +00:00
Connor Abbott
0cf7bd3d6c tu: Use scratch mem for conditional loads/stores on a7xx
With concurrent binning, reading directly from the VSC_STATE registers
for conditional loads/stores doesn't work because BR and BV have their
own copy of VSC registers and the BV is running ahead of BR. Instead,
the blob's solution is to allocate extra space in memory for the
contents of VSC_STATE and upload it there. It has to be allocated
together with draw stream/prim stream because it is also written by BV
and read by BR and therefore it also needs to be duplicated to avoid
hazards. The memory is then read in BR via CP_MEM_TO_SCRATCH_MEM, which
is purpose-made for this.

Make turnip use this strategy on a7xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:23 +00:00
Connor Abbott
7c4cd508fb tu: Refactor VSC bo initialization
Make it easier to add more parts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:22 +00:00
Connor Abbott
f0d7f2174e freedreno/a7xx: Add BV registers for ROQ status
Add the BV equivalent of various registers used by crashdec to determine
where the SQE (actually now BR) is.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:22 +00:00
Connor Abbott
88b855ccea freedreno: Decode CP_RESOURCE_LIST
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:22 +00:00
Connor Abbott
1c35684814 freedreno: Add synchronization-related control registers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:22 +00:00
Connor Abbott
b5f1108045 freedreno/crashdec: Add support for CP_BV_MEMPOOL
The BV mempool is even further cut down compared to the "small mem pool"
layout which seems to be used by a610. It also shrinks the block size to
4 chunks instead of 8. This layout happens to be shared by a702, so
abstract out the layout into a "mempool size" enum.

While we're here, fix a bug with how the mempool offset for chunks is
printed. This accounts for the test diff.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:22 +00:00
Connor Abbott
3f70b05784 freedreno/registers: Fix encoding fields in 64b registers
This was already broken for BINDLESS_BASE, but we didn't notice it
because we weren't using the builders. We have to cast fields that we OR
in, and we need to return uint64_t from the legacy field functions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:22 +00:00
Connor Abbott
ba427bc274 freedreno: Expand a7xx LRZ metadata definition
As expected there is a second copy of the metadata for the second
buffer, and pointers to the current buffer that are updated when
flipping.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:22 +00:00
Connor Abbott
77b68ee78b freedreno/a7xx: Document GRAS_LRZ_CB_CNTL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:21 +00:00
Connor Abbott
efc4bb5174 freedreno: Document BV BIN_PREAMBLE usage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36590>
2025-10-28 19:33:20 +00:00
Job Noorman
32b646c597 nir: print in_bounds info for deref_type(_ptr_as)_array
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: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38110>
2025-10-28 14:21:01 +00:00
Job Noorman
0a6d698482 spirv: set in_bounds for ptr_as_array
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38110>
2025-10-28 14:21:01 +00:00
Job Noorman
0ac55b786a spirv: don't set in_bounds for structs
The arr::in_bounds field was set unconditionally for every deref created
for a chain. For struct derefs, which don't have this field, this would
write to an unused memory location, which is probably why this never
caused issues.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: f19cbe98e3 ("nir,spirv: Preserve inbounds access information")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38110>
2025-10-28 14:21:01 +00:00
Danylo Piliaiev
62f0ef3445 tu: Faster descriptor set allocator
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
memmove was slow on large number of descriptor when destroying some of
them.

util_vma_heap is perfect for the task, ANV and RADV already use it.
It also simplifies the code.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38053>
2025-10-28 11:20:05 +00:00
Juan A. Suarez Romero
562bb8b62b v3dv: align width to 256 when using simulator
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
2025-10-28 11:03:55 +00:00
Juan A. Suarez Romero
08e2da2379 v3d: set stride alignment when using simulator
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
2025-10-28 11:03:55 +00:00
Juan A. Suarez Romero
d48b276acd broadcom/simulator: add helper to get stride alignment
Some GPUs, like AMD, has specific stride align requirements in order to
display the content correctly.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
2025-10-28 11:03:55 +00:00
Juan A. Suarez Romero
5947eae0af v3d/simulator: create GEM BOs in GTT memory for AMD GPUs
As the BOs created in GPU needs to be accessible from the simulator,
create them in GTT memory, with CPU access.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
2025-10-28 11:03:55 +00:00
Juan A. Suarez Romero
977d4f34dd vc4: set stride alignment when using simulator
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
2025-10-28 11:03:55 +00:00
Juan A. Suarez Romero
aec701d094 vc4/simulator: add helper to get stride alignment
Some GPUs, like AMD, require specific stride alignment in order to
display the content correctly.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
2025-10-28 11:03:54 +00:00
Juan A. Suarez Romero
66d715bac3 vc4/simulator: create GEM BOs in GTT memory for AMD GPUs
As the BOs created in GPU needs to be accessible from the simulator,
create them in GTT memory, with CPU access.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
2025-10-28 11:03:54 +00:00
Valentine Burley
84fa5ecff6 panvk/ci: Add an ANGLE job on G925
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Disable the max-fails feature in deqp-runner for this job, since it
aborts the run due to failures that don't occur otherwise.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38051>
2025-10-28 10:09:28 +00:00
Valentine Burley
3e14c64b28 panvk/ci: Add a VKCTS job on G925
This job runs on MT8196 Rauru Chromebooks.

Also remove the old G725 expectation files, as G725 is a smaller variant
of G925.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38051>
2025-10-28 10:09:28 +00:00
Valentine Burley
c4778f1d27 panfrost/ci: Drop redundant KERNEL_IMAGE_NAME for rock-5b
This was already the default value.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38051>
2025-10-28 10:09:28 +00:00
Valentine Burley
2bec7fb8c7 ci: Update linux-firmware version to pick up more ARM firmware
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38051>
2025-10-28 10:09:28 +00:00
David Rosca
0977ca2854 radeonsi/vce: Don't check ref modification and marking flags
The number of operations is now correctly set to 0 when needed.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38050>
2025-10-28 09:43:26 +00:00
David Rosca
1232a7a754 frontends/va: Always reset H264 slice ref modification and marking count
This way the driver doesn't need to check the flag.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38050>
2025-10-28 09:43:26 +00:00
David Rosca
b6a00adb41 radeonsi/vcn: Support H264 encode pic_order_cnt_type 1
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38052>
2025-10-28 09:14:24 +00:00
David Rosca
8c2de21090 frontends/va: Support H264 encode pic_order_cnt_type 1
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38052>
2025-10-28 09:14:24 +00:00
Benjamin Cheng
cef8eff74d radv/video: Override H265 SPS unaligned resolutions
VCN requires 64x16 alignment for HEVC. When the app requests non-aligned
resolutions, make up for it with conformance window cropping.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38061>
2025-10-28 08:53:35 +00:00
Benjamin Cheng
84b6d8e0d7 radv/video: Override H265 SPS block size parameters
VCN only supports this set of parameters.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38061>
2025-10-28 08:53:35 +00:00
Yogesh Mohan Marimuthu
53b9389563 winsys/amdgpu: use correct vm_timeline_point for userq creation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
doorbell does not require va address mapping from userspace and hence
amdgpu_bo_va_op_common() function is not called and therefore doorbell
bo->vm_timeline_point is not updated. Currently to wait for all mappings
to be ready doorbell vm_timeline_point is used which is incorrect.

This patch updates vm_timeline_point to wait for all bos. The bos
can be real bo or slab bo. slab bo can be from old buffer and hence
there is a check to update vm_timeline_point to wait only if it is
new.

Reported-by: Zhang, ShanYi (Ken) <ShanYi.Zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38059>
2025-10-28 07:23:43 +00:00
Samuel Pitoiset
45affb0e53 radv: advertise VK_EXT_shader_uniform_buffer_unsized_array
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38047>
2025-10-28 07:55:40 +01:00
Aitor Camacho
66bc12a747 kk: Set drawID in root descriptor table
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/38067>
2025-10-28 01:38:34 +00:00
Arcady Goldmints-Orlov
9be352df12 kk: Enable VK_EXT_shader_atomic_float
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38067>
2025-10-28 01:38:34 +00:00
Arcady Goldmints-Orlov
53de36895c kk: enable shaderStencilExport
This requires a small new NIR pass to force the stencil output to be unsigned.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38067>
2025-10-28 01:38:34 +00:00
Arcady Goldmints-Orlov
d3424de889 kk: enable shaderDrawParameters
Currently draw_id is always 0 since we don't support multidraw yet.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38067>
2025-10-28 01:38:34 +00:00
Arcady Goldmints-Orlov
8c9e9555e8 kk: enable logicOp
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38067>
2025-10-28 01:38:34 +00:00
Arcady Goldmints-Orlov
938390c075 kk: enable dualSrcBlend
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38067>
2025-10-28 01:38:34 +00:00
Faith Ekstrand
a9e0adc679 nvk: Advertise VK_KHR_maintenance10
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38094>
2025-10-27 16:20:32 -04:00
Faith Ekstrand
268a1db7cc nvk: Advertise the new maintenance10 format features
We don't actually advertise compute-only or depth-only queues right now
but nothing in the spec says you have to advertise the queues in order
to advertise the bits.  Setting them now ensures we don't forget them
when compute-only or transfer-only queues get added.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38094>
2025-10-27 16:19:43 -04:00
Faith Ekstrand
0a5a456259 nvk: Switch to CmdEndRendering2KHR()
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38094>
2025-10-27 16:19:43 -04:00
Faith Ekstrand
6e3eeb6118 nvk: Plumb attachment flags through to MSAA resolve
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38094>
2025-10-27 16:19:43 -04:00
Faith Ekstrand
bbbf037303 vulkan/meta: Handle VkResolveImageModeInfoKHR
This contains resolve modes which override the format-based defaults as
well as resolve flags to allow disabling sRGB conversion.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38094>
2025-10-27 16:19:43 -04:00
Faith Ekstrand
b5d5836fd1 vulkan/meta: Handle VK_RENDERING_ATTACHMENT_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38094>
2025-10-27 16:19:43 -04:00
Faith Ekstrand
127de27015 vulkan/util: Add a vk_format_srgb_to_linear() helper
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38094>
2025-10-27 16:19:43 -04:00
Lionel Landwerlin
3955787ab2 anv: implement VK_KHR_maintenance10
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38045>
2025-10-27 19:20:09 +00:00
Lionel Landwerlin
cf81feb660 vulkan/render_pass: handle maintenance10 resolve flags
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38045>
2025-10-27 19:20:09 +00:00
Lionel Landwerlin
c5740c2548 vulkan/render_pass: Add a missing sType
Fixes: 3a204d5cf3 ("vulkan/render_pass: Add a better helper for render pass inheritance")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38045>
2025-10-27 19:20:09 +00:00
Lionel Landwerlin
2899cd84e4 vulkan/runtime: enable null pointer to vkCmdSetSampleMaskEXT()
For VK_KHR_maintenance10

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38045>
2025-10-27 19:20:08 +00:00
Tim Van Patten
2bb7c1e459 docs/envvars: Add section: Android System Properties
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add documentation describing Android system property usage in Mesa. For
example, how environment varible names are translated by
os_get_option(), how to get/set values, and corresponding example
commands.

A new section is added to doc/envvars.rst which points to the full
details within the new "Android System Properties" section in
docs/android.rst.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37942>
2025-10-27 19:15:19 +00:00
Marek Olšák
41a8c4d37c zink: fix mesh and task shader pipeline statistics
Fixes: 9d0e73335a - zink: enable GL_EXT_mesh_shader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38086>
2025-10-27 18:45:28 +00:00
Job Noorman
c544f42a79 ir3/ra: reset merge set preferred reg when unavailable
When a reg's merge set has a preferred reg but is currently unavailable,
it's often preferable to reset its preferred reg and assign a new one,
as this potentially reduces the number of movs needed for the as of yet
unallocated regs.

Totals from 18278 (11.10% of 164705) affected shaders:
Instrs: 14380961 -> 14340094 (-0.28%); split: -0.58%, +0.29%
CodeSize: 28522270 -> 28460942 (-0.22%); split: -0.44%, +0.23%
NOPs: 2771602 -> 2759456 (-0.44%); split: -1.17%, +0.73%
MOVs: 589951 -> 577832 (-2.05%); split: -6.63%, +4.57%
COVs: 233094 -> 232938 (-0.07%); split: -0.11%, +0.05%
Full: 276629 -> 276632 (+0.00%); split: -0.00%, +0.00%
(ss): 364508 -> 365702 (+0.33%); split: -0.73%, +1.06%
(sy): 177032 -> 176310 (-0.41%); split: -0.98%, +0.57%
(ss)-stall: 1512210 -> 1512312 (+0.01%); split: -0.92%, +0.93%
(sy)-stall: 5783986 -> 5723012 (-1.05%); split: -1.93%, +0.88%
Preamble Instrs: 2905654 -> 2904919 (-0.03%); split: -0.09%, +0.07%
Last helper: 3397081 -> 3390054 (-0.21%); split: -0.57%, +0.36%
Last baryf: 136198 -> 136439 (+0.18%); split: -0.07%, +0.25%
Cat0: 3061954 -> 3051187 (-0.35%); split: -1.11%, +0.76%
Cat1: 874681 -> 843044 (-3.62%); split: -6.57%, +2.96%
Cat2: 5226994 -> 5226663 (-0.01%); split: -0.01%, +0.00%
Cat7: 357258 -> 359126 (+0.52%); split: -0.33%, +0.85%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37811>
2025-10-27 18:22:58 +00:00
Connor Abbott
f58b24467a tu: Zero MSRTSS temporary image before creating it
In the dynamic rendering case, the images are allocated statically out
of the command buffer and may be reused, so we have to make they are
zeroed to match the normal tu_CreateImage() path. Otherwise we may get
garbage from previous usages of the image.

Fixes: f6c7f16322 ("tu: Implement VK_EXT_multisampled_render_to_single_sampled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38032>
2025-10-27 17:56:02 +00:00
Connor Abbott
c0b5c04b84 tu: Fix attachment stores with subpasses with partial views
Subpasses can have different view masks, although this isn't often used.
So we can't use the view mask of the last subpass when deciding what to
store, instead we have to use the same used_views field that's used by
loads and clears.

Noticed by upcoming tests for VK_QCOM_multiview_per_view_render_areas.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38064>
2025-10-27 17:31:43 +00:00
Connor Abbott
6c3ed74ed2 tu: Rename tu_render_pass_attachment::clear_views to used_views
It's not just used for clears, it was already used for loads and it
needs to be used for stores too so clear_views was a confusing name.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38064>
2025-10-27 17:31:42 +00:00
Valentine Burley
45a762727c venus/ci: Skip slow test on ANV with Cuttlefish
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/38080>
2025-10-27 15:50:15 +01:00
Faith Ekstrand
b407fef097 Update the Vulkan-profiles wrap to 1.4.330 and re-enable zink_check_requirements
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14176
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38080>
2025-10-27 10:04:48 -04:00
Mike Blumenkrantz
a2ef369abf zink: disable primitiveFragmentShadingRateMeshShader feature
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
features are auto-enabled, but some of them cause validation errors
which are simple to work around

Fixes: 90f3c57337 ("zink: hook up VK_EXT_mesh_shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38077>
2025-10-27 09:07:37 -04:00
Mario Kleiner
3ca1cee8b0 hk: Enable VK_KHR_present_id[2] and VK_KHR_present_wait[2]
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These extensions are implemented in shared Vulkan/WSI code and
not driver specific. A Vulkan driver just needs to support
VK_KHR_timeline_semaphore, which Honeykrisp already supports
since its inclusion into Mesa.

Successfully tested on Apple MacBookAir 2020 with M1 SoC on
top of KDE KWin 6.4 and GNOME mutter 48.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38069>
2025-10-27 12:27:23 +00:00
Danylo Piliaiev
d1fe9a152e tu/lrz: Disable LRZ writes when draw doesn't write to all attachments
Not writing to color attachments in the same as blending from LRZ
viewpoint.

Though there is one case when we can avoid disabling LRZ writes,
when a renderpass starts with depth-only draw calls, or consists entirely
of them, but also has color attachments.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38034>
2025-10-27 11:14:31 +00:00
Danylo Piliaiev
7ee9835475 tu/lrz: Disable LRZ when CmdSetRenderingAttachmentLocations is used
Same case as a drawcall not writing to some color attachments, but not
trying to make LRZ work in cases where we can prove that LRZ can work.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38034>
2025-10-27 11:14:30 +00:00
Danylo Piliaiev
31cb49d6cb tu/lrz: Fold disable_write_for_rp check into tu_lrz_disable_write_for_rp
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38034>
2025-10-27 11:14:29 +00:00
Lionel Landwerlin
f6f2a73bbc anv: expose VK_EXT_shader_uniform_buffer_unsized_array
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: 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/38046>
2025-10-27 10:01:48 +00:00
Job Noorman
f84d85790e ir3/ra: fix assert during file start reset
While accounting for an input register's merge set when resetting the
file start after the preamble, we implicitly assume that the allocated
register is the preferred one by asserting that the register's merge set
offset is not smaller than its physreg (to prevent an underflow).
However, inputs are not guaranteed to have their preferred register
allocated which causes the assert to get triggered.

Fix this by only taking the whole merge set into account for inputs that
actually got their preferred register allocated.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 9d4ba885bb ("ir3/ra: make main shader reg select independent of preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37905>
2025-10-27 09:32:51 +00:00
Valentine Burley
b6e281d0b1 zink/ci: Document ANV flake
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37935>
2025-10-27 08:51:04 +00:00
Ritesh Raj Sarraf
09f5b991b8 ci/virgl: Mark test job for Linux 6.16
The virgl-traces job is timing out randomly in different trace jobs with
the 6.17 kernel. Until we have a fix, mark these tests as Linux 6.16
only

Signed-off-by: Ritesh Raj Sarraf <ritesh.sarraf@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37935>
2025-10-27 08:51:04 +00:00
Ritesh Raj Sarraf
4c006a8b01 freedreno/ci: Drop KERNEL_TAG retargeting the new Linux 6.17.3
The changes carried in msm-fixes-for-mesa-ci-14102025 have been merged
in this uprev to v6.17.3

Signed-off-by: Ritesh Raj Sarraf <ritesh.sarraf@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37935>
2025-10-27 08:51:04 +00:00
Ritesh Raj Sarraf
3da45bb00a ci: Use Linux 6.17.3 for mesa gfx-ci
Signed-off-by: Ritesh Raj Sarraf <ritesh.sarraf@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37935>
2025-10-27 08:51:04 +00:00
Samuel Pitoiset
a31d3c764c amd,radv,radeonsi: move GFX12 push SH REGS helpers to common code
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38000>
2025-10-27 08:30:02 +00:00
Samuel Pitoiset
bddd7919d3 amd,radv,radeonsi: add ac_buffered_sh_regs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38000>
2025-10-27 08:30:02 +00:00
Samuel Pitoiset
91bd46d34e amd,radv,radeonsi: add ac_{gfx11_reg_pair,gfx12_reg}
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38000>
2025-10-27 08:30:01 +00:00
Samuel Pitoiset
846b707045 amd,radv,radeonsi: move some GFX12 emit helpers to common code
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38000>
2025-10-27 08:30:00 +00:00
Samuel Pitoiset
2009815d61 radv: add radv_wait_for_vm_map_updates drirc and enable for Forza Horizon 5
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13321
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38031>
2025-10-27 07:56:45 +00:00
Samuel Pitoiset
fc0cfaae1c radv/amdgpu: add a way to wait for VM updates at alloc time
RADEON_FLAG_VM_UPDATE_WAIT can be passed to wait for VM updates at
allocation time instead of delaying them at submit time. There is no
reason to delay the waiting when the memory is bound to images/buffers
because in DX12 ressources are allocated and bound immediately.

This flag will be used to workaround an use-before-alloc in FH5
(game bug) which causes GPU hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38031>
2025-10-27 07:56:44 +00:00
Samuel Pitoiset
bbaffa22ff radv/amdgpu: use radv_amdgpu_bo_va_op() for BOs from pointer
No logical changes because ac_drm_bo_va_op() sets
AMDGPU_VM_PAGE_{READABLE,EXECUTABLE,WRITEABLE}.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38031>
2025-10-27 07:56:44 +00:00
Samuel Pitoiset
f9af7f7b2a radv: use radv_buffer_get_va() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38031>
2025-10-27 07:56:44 +00:00
Sagar Ghuge
89fbcc8c34 brw/rt: fix ray_object_(direction|origin) for closest-hit shaders
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We were returning world BVH level for origin/direction, this commit
fixes by retuning correct object BVH level origin/direction.

Fixes: aaff191356 ("brw/rt: fix ray_object_(direction|origin) for closest-hit shaders")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36853>
2025-10-27 01:42:22 +00:00
Sagar Ghuge
3edeb1e191 brw/rt: Move nir_build_vec3_mat_mult_col_major helper to header
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36853>
2025-10-27 01:42:22 +00:00
jglrxavpok
09e091fbdf radv/aco: Print source location debug info inside ACO disassembly if we have the information
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/36443>
2025-10-26 15:12:58 +00:00
Natalie Vock
50e65dac79 nir/lower_shader_calls: Repair SSA after wrap_instrs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Wrapping jump instructions that are located inside ifs can break SSA
invariants because the else block no longer dominates the merge block.
Repair the SSA to make the validator happy again.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37957>
2025-10-26 11:38:51 +00:00
Collabora's Gfx CI Team
8d37098deb Uprev ANGLE to e9626fbced6841d804e7eaf48bb078770822032b
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
8ed16003f2...e9626fbced

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37858>
2025-10-26 00:08:20 +00:00
Collabora's Gfx CI Team
74afb200d3 Uprev Piglit to ec76cc7a31f03c4f4f9d6e3b00f8a70c8ee0fb32
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
2ac68e5fb5...ec76cc7a31

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37968>
2025-10-25 07:46:22 +00:00
Taras Pisetskyi
dcd9b90aff drirc/anv: force_vk_vendor=-1 for Wuthering Waves
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12459

Signed-off-by: Taras Pisetskyi <taras.pisetskyi@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38023>
2025-10-25 06:05:09 +00:00
Yiwei Zhang
ee57fef755 venus: enable sparse only queue family along with feedback
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that both ffb and sfb support feedback suspend and resume, we no
longer need to filter out sparse only queue family.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38049>
2025-10-25 00:02:59 +00:00
Yiwei Zhang
13e9bc2ff9 venus: allow timeline semaphore feedback to suspend and resume
Similar idea with fence feedback, but a bit tricky in the resume
condition. See comments for details.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38049>
2025-10-25 00:02:59 +00:00
Yiwei Zhang
ecb385f088 venus: rename async_wait_mtx to counter_mtx
The lock scope will be extended to support semaphore feedback suspend
and resume later. So give it a general name.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38049>
2025-10-25 00:02:59 +00:00
Yiwei Zhang
b187c1ab92 venus: update sfb cmd lookup to follow ffb
Now sfb cmd can be VK_NULL_HANDLE on incompatible queues. Avoid passing
that to set cmd, and explicitly assert below.

Test: dEQP-VK.synchronization2.basic.timeline_semaphore.multi_queue can
properly assert on the driver side when assert is enabled.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38049>
2025-10-25 00:02:59 +00:00
Yiwei Zhang
2c08e6d8bb venus: allow fence feedback to suspend and resume
Previously, we either have to filter out incompatible queue or disable
fence feedback. Now we track whether the queue can do feedback, and will
mark the fence feedback not pollable if the fence is submitted on an
incompatible queue.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38049>
2025-10-25 00:02:59 +00:00
Yiwei Zhang
30b41c2b57 venus: add vn_queue_family_can_feedback helper
No behavior change. This is to prepare for better feedback
compatibility support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38049>
2025-10-25 00:02:59 +00:00
Marek Olšák
dd4df28ef2 radeonsi: mostly fix NGG streamout overflow queries when XFB is disabled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When XFB was disabled, we were incrementing primitives_generated but not
primitives_emitted, which caused the overflow query to return true, but
it should have returned false because XFB was disabled.

This disables counting primitives_generated when there is no
primitives_generated query. When both primitives_generated and the overflow
query are enabled simultaneously and XFB is disabled, it will be incorrect
again, but that had been equally incorrect with the non-NGG codepath too,
just not discovered because of the lack of tests.

This commit just changes NGG streamout queries to behave the same as legacy.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849>
2025-10-24 22:58:17 +00:00
Marek Olšák
02db1fbe82 radeonsi: cosmetic changes for queries
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849>
2025-10-24 22:58:17 +00:00
Marek Olšák
6651781731 radeonsi: allow queries to return more than UINT32_MAX
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849>
2025-10-24 22:58:16 +00:00
Marek Olšák
956868b06a radeonsi: return false from si_update_ngg early on gfx11+
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849>
2025-10-24 22:58:16 +00:00
Marek Olšák
d9408eec59 radeonsi: rename num_active_shader_queries -> streamout.num_ngg_queries
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849>
2025-10-24 22:58:16 +00:00
Marek Olšák
cec9402542 radeonsi: rename si_get_strmout_en -> si_get_streamout_enable_state
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849>
2025-10-24 22:58:16 +00:00
Mary Guillemard
fb4010e641 asahi: Update CI expectations
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38060>
2025-10-24 22:41:53 +00:00
Mary Guillemard
d37ba302d0 hk: Allocate the temp tile buffer in copy_image_to_image_cpu
We may require a bigger more than 16KiB to handle the image copy.
We now always allocate a buffer to handle it properly fixing the
remaining failures on VKCTS 1.4.4.0 for HIC.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38060>
2025-10-24 22:41:53 +00:00
Mary Guillemard
887f06a966 hk: Make width and height per block in HIC
We were assuming that every formats used for HIC had a block widgh and
height of 1x1.

This is wrong for compressed formats like BC5, ASTC, ect.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38060>
2025-10-24 22:41:53 +00:00
Konstantin Seurer
95a89f7b33 radv: Report smaller bvh sizes when possible
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37830>
2025-10-24 21:17:10 +00:00
Konstantin Seurer
7809af5e46 radv: Always use compact bvh encoding
The compact encoding will make it possible to allocate less space for
internal nodes

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37830>
2025-10-24 21:17:10 +00:00
Alejandro Piñeiro
5d70bf3c98 mesa/st: add a warning if can't set SoftFP64
Without this warning, if a driver try to use the
nir_lower_fp64_full_software option, would get a crash without any
message pointing that the problem is that doesn't fulfill the
requirements of current mesa fp64 sw implementation.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Marek Ol¨ák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38025>
2025-10-24 20:52:36 +00:00
Silvio Vilerino
53bcab0288 d3d12: Video Encode - Flush the pipe context async while submitting encode
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:58 +00:00
Silvio Vilerino
8be89cf426 d3d12: Video Encode - Remove redundant buffer barriers
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:58 +00:00
Silvio Vilerino
eea34f5950 d3d12: Video Encode - Remove unnecessary resource waits and syncs since we sync batch fence
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:58 +00:00
Silvio Vilerino
8fdaac83a9 d3d12: Remove redundant d3d12_promote_to_permanent_residency overload
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:57 +00:00
Silvio Vilerino
7e1982a7eb d3d12: Use EnqueueMakeResident with GPU Wait for video permanent residency promotions
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:56 +00:00
Silvio Vilerino
ca3ba3f924 mediafoundation: Remove unused AllocatePipeResourceFromAllocator
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:56 +00:00
Silvio Vilerino
e873beb33c mediafoundation: Cleanup MaxL1References variables
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:56 +00:00
Silvio Vilerino
4b75fcac47 mediafoundation: Optimize STL usage in reference_frames_tracker_hevc.cpp
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:56 +00:00
Silvio Vilerino
2b34f30e00 mediafoundation: encode.cpp: Remove redundant lock() and memset()
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:55 +00:00
Silvio Vilerino
9b97a2ef93 mediafoundation: Fix width/height typo in alignment calculation
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:55 +00:00
Silvio Vilerino
a1f602e17f d3d12: Fix d3d12_promote_to_permanent_residency always making resident
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:55 +00:00
Silvio Vilerino
31c9874891 d3d12: d3d12_video_encoder_references_manager_hevc remove double resize() and add reserve() to cached vectors
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:54 +00:00
Silvio Vilerino
ed53936308 d3d12_video_encoder_nalu_writer_h264: Reuse per frame scratch allocations
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:54 +00:00
Silvio Vilerino
900cdf3a7c d3d12_video_encoder_nalu_writer_hevc: Reuse per frame scratch allocations
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:54 +00:00
Pohsiang (John) Hsu
80da774734 mediafoundation: fix sporadic build failure with u_inlines.h not found on test target
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
2025-10-24 19:45:54 +00:00
Sagar Ghuge
006085e676 anv: Call brw_nir_lower_rt_intrinsics_pre_trace lowering pass
Call this pass before nir_lower_shader_calls().

Fixes: d39e443e ("anv: add infrastructure for common vk_pipeline")
Cc: mesa-stable
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38041>
2025-10-24 19:07:58 +00:00
Alyssa Rosenzweig
b824ef83ab util/dynarray: infer type in append
Most of the time, we can infer the type to append in
util_dynarray_append using __typeof__, which is standardized in C23 and
support in Jesse's MSMSVCV. This patch drops the type argument most of
the time, making util_dynarray a little more ergonomic to use.

This is done in four steps.

First, rename util_dynarray_append -> util_dynarray_append_typed

    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_append(/util_dynarray_append_typed(/g' \{} \;"

Then, add a new append that infers the type. This is much more ergonomic
for what you want most of the time.

Next, use type-inferred append as much as possible, via Coccinelle
patch (plus manual fixup):

    @@
    expression dynarray, element;
    type type;
    @@

    -util_dynarray_append_typed(dynarray, type, element);
    +util_dynarray_append(dynarray, element);

Finally, hand fixup cases that Coccinelle missed or incorrectly
translated, of which there were several because we can't used the
untyped append with a literal (since the sizeof won't do what you want).

All four steps are squashed to produce a single patch changing every
util_dynarray_append call site in tree to either drop a type parameter
(if possible) or insert a _typed suffix (if we can't infer). As such,
the final patch is best reviewed by hand even though it was
tool-assisted.

No Long Linguine Meals were involved in the making of this patch.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38038>
2025-10-24 18:32:07 +00:00
Alyssa Rosenzweig
07f98f330a util: require typeof support
It is in C23 and Jesse reports that his MSMSVCV has it.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com> [over IRC]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38038>
2025-10-24 18:32:07 +00:00
Caio Oliveira
a8449171d3 iris: Enable GL_KHR_shader_subgroup_* extensions for Gfx >= 9 when possible
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For platforms that don't have native float64 support, skip the
arithmetic and clustered ops.  While they would work, the lowering
for float64 for those increase significantly the shader for some
of those operations.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35844>
2025-10-24 16:41:29 +00:00
Caio Oliveira
4f628c9e8c brw: Consolidate late lowering of int64 operations
Instead of doing selectively and with different supporting passes, just
run the complete set (special algebraic before and cleanup optimizations
after) at the end of brw_postprocess_nir_opts().

No changes to fossil-db on ICL, TGL, ACM and BMG.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35844>
2025-10-24 16:41:29 +00:00
Samuel Pitoiset
4c2207e76b spirv: Update the JSON and headers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38042>
2025-10-24 16:00:55 +00:00
Samuel Pitoiset
a5ee985d52 vulkan: exclude non-existant Shader64BitIndexingEXT SPIR-V capability
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38042>
2025-10-24 16:00:55 +00:00
Samuel Pitoiset
61c71733c8 vulkan: update spec to 1.4.330
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38042>
2025-10-24 16:00:55 +00:00
Faith Ekstrand
13199c37c1 zink: Disable building the zink_check_requirements tool for now
The vulkan header update is going to break it.  We'll re-enable as soon
as LunarG does a header update in Vulkan-profiles.  Until then, I've
filed a tracker issue:

https://gitlab.freedesktop.org/mesa/mesa/-/issues/14176

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38042>
2025-10-24 16:00:55 +00:00
Mary Guillemard
64131475a8 hk: Remove unused allocation in queue_submit
Unused and leaking memory, found with address sanitizer.

Fixes: c64a2bbff5 ("asahi: port to stable uAPI")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38054>
2025-10-24 15:44:03 +00:00
Mary Guillemard
7e636d52f1 hk: Disable 1x in sampleLocationsSampleCounts
We don't support it, everyone dropped support for that, let's not expose it.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38054>
2025-10-24 15:44:03 +00:00
Mary Guillemard
8447b99f61 hk: Fix maxVariableDescriptorCount with inline uniform block
Same problem as NVK on VKCTS 1.4.4.0

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38054>
2025-10-24 15:44:03 +00:00
Dylan Baker
a5b9f428f9 intel/compiler/brw: Add assert that we don't have a negative value
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Coverity notices that `nir_get_io_index_src_number` could return -1, and
that we use it to index an array. It cannot understand that -1 only
happens for unhandled enum values, but all of these are handled. Add an
assert to help it out.

CID: 1667234
Fixes: 37a9c5411f ("brw: serialize messages on Gfx12.x if required")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38007>
2025-10-24 15:13:10 +00:00
Dylan Baker
83c52f75d0 intel/compiler/brw: fix potential unsigned overflow
Coverity notices that if `util_last_bit()` returns 0, and we subtract 1,
then the unsigned will overflow before being converted. We could cast to
eliminate that error, but the entire optimization function would do
nothing if tex->required_params == 0 (the way that we would get here),
so let's just not do work if we know we don't need to *and* avoid this
overflow.

CID: 1667241
Fixes: efcba73b49 ("brw: switch to new sampler payload description scheme")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38009>
2025-10-24 07:52:09 -07:00
Faith Ekstrand
fd55e874ed panvk: Enable the disk cache
Assuming disk I/O isn't painfully slow compared to running the whole
compiler (OS file system caching should help), this should massively
reduce the number of shaders compiled.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
2025-10-24 13:52:57 +00:00
Faith Ekstrand
9912c9a842 panvk: Use the build SHA for the pipeline/binary cache UUIDs
This way we get the same cache UUIDs for identical sources and build
environments, even if they're built at different times.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
2025-10-24 13:52:57 +00:00
Faith Ekstrand
4f8327188b panvk: Add an in-memory shader cache
This one just hangs out and prevents unnecessary duplicate compilation.
We set .weak_ref = true so it doesn't actually hold references forever.
It just hangs onto any shaders that exist in some VkPipeline or VkShader
somewhere.  But if an app compiles a pipeline it already has, it will
let us avoid a duplicate compile, even if the app doesn't provide a
pipeline cache.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
2025-10-24 13:52:55 +00:00
Faith Ekstrand
64ad337036 panvk/shader: Use the right copy size for deserializing dynamic UBOs/SSBOs
Fixes: 563823c9ca ("panvk: Implement vk_shader")
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
2025-10-24 13:52:55 +00:00
Faith Ekstrand
a546484ed9 panvk/shader: [de]serialize desc_info.max_varying_loads
Fixes: de86641d3f ("panvk: Limit AD allocation to max var loads in v9+")
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
2025-10-24 13:52:55 +00:00
Faith Ekstrand
9a50527c54 panvk/shader: Implement [de]serialization of ASM and NIR strings
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38019>
2025-10-24 13:52:54 +00:00
Juan A. Suarez Romero
a35c8249de broadcom/ci: unlock more CI-Tron jobs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Run ubsan with CI-Tron jobs in parallel with baremetal jobs for a while.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38048>
2025-10-24 10:00:26 +00:00
Juan A. Suarez Romero
b01bdbabe1 broadcom/ci: disable baremetal jobs already running with CI-Tron
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38048>
2025-10-24 10:00:26 +00:00
Juan A. Suarez Romero
69c774b631 broadcom/ci: document some of the failures
Explain why some of the tests are failing, as a helper for the future.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Polygon stipple

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38048>
2025-10-24 10:00:26 +00:00
Juan A. Suarez Romero
20ccd8cc95 v3d/ci: add new flakes for rpi5
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38048>
2025-10-24 10:00:26 +00:00
Benjamin Cheng
c7883e3a71 radeonsi/vcn: Check and override primary_ref_frame
The primary_ref_frame is used to load CDF data and has to match between
VCN and the header. Unless the default CDF tables are used, VCN
currently always assumes the CDF data will be loaded from
reference_frame_index (for VCN4) or lsm_reference_frame_index[0] (for
VCN5). This may cause conflict with the application provided
primary_ref_frame.

Check to make sure the primary_ref_frame is the same frame as the used
reference, and override it if necessary.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38030>
2025-10-24 09:30:08 +00:00
Lars-Ivar Hesselberg Simonsen
e8c0fdbc45 panvk: Only call req_res when required
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Rather than calling REQ_RES during subqueue_init, only call it during
submit the first time we see a command buffer that requires the use of
specific resources.

This ensures queues processing compute-only workloads (i.e. not actually
requiring tiler/fragment resources) don't preempt vertex/fragment work
on other queues due to resource congestion.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37890>
2025-10-24 08:01:51 +00:00
Samuel Pitoiset
849d41dbf8 radv: implement a new descriptor sets allocator
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The previous implementation was horribly slow with a larger number
of descriptor sets.

The new approach uses util_vma_heap (like ANV) which is a perfect fit.

This fixes stuttering in Indiana Jones because that games seems to use
a huge number of descriptor sets which can also be freed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13901
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37976>
2025-10-24 06:25:17 +00:00
Samuel Pitoiset
9b6d89f4ca radv: use a linked-list for storing descriptor pool sets
Only when pool entries aren't freed yet. This will make the new
allocation strategy much simpler.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37976>
2025-10-24 06:25:17 +00:00
Samuel Pitoiset
4d33d3f507 radv: add radv_bind_{graphics,rt,compute}_pipeline() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38004>
2025-10-24 05:59:06 +00:00
Samuel Pitoiset
54a6c81d3a radv: dirty dynamic descriptors when required
The user SGPRS might be different and dynamic descriptors need to be
re-emitted again

This fixes a regression with ANGLE, and VCKTS is currently missing
coverage.

Fixes: a47952d495 ("radv: upload and emit dynamic descriptors separately from push constants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14146
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38004>
2025-10-24 05:59:06 +00:00
Faith Ekstrand
998dbd43d3 nvk: Capture/replay buffer addresses for EDB capture/replay
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 3f1c3f04be ("nvk: Advertise VK_EXT_descriptor_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38040>
2025-10-24 02:57:04 +00:00
Faith Ekstrand
a13474939d nvk: Look at the right pointer in GetDescriptorInfo for SSBOs
It doesn't actually matter but we shouldn't poke at the wrong union
field.

Fixes: 77db71db7d ("nvk: Implement GetDescriptorEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38040>
2025-10-24 02:57:04 +00:00
Faith Ekstrand
d39221cef3 nvk: Emit inactive vertex attributes
VK_KHR_maintenance9 requires that vertex attributes in shaders which map
to vertex attributes that aren't bound at the API return a consistent
value.  In order to do this, we need toemit SET_VERTEX_ATTRIBUTE_A, even
for unused attributes.  The RGBA32F format was chosen to ensure we
return (0, 0, 0, 0) from unbound attributes.

Fixes: 7692d3c0e1 ("nvk: Advertise VK_KHR_maintenance9")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38040>
2025-10-24 02:57:04 +00:00
Qiang Yu
e36c277af9 radeonsi: init task shader args
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:18 +00:00
Qiang Yu
69c10426a4 radeonsi: don't put descs in user sgpr for task shader
task shader know user sgprs after shader variant creation
for draw_id arg. Simply disable this optimization for task
shader now.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:18 +00:00
Qiang Yu
a7bccad3f2 radeonsi: add radeon_emit_alt_hiz_packets for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:17 +00:00
Qiang Yu
644061fdbc radeonsi: add si_emit_buffered_gfx_sh_regs_for_mesh
For mesh shader support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:16 +00:00
Qiang Yu
04912c585c radeonsi: lower mesh shader outputs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:16 +00:00
Qiang Yu
ca43c361bd radeonsi: handle primitive indices for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:15 +00:00
Qiang Yu
01fc4efd77 radeonsi: support fragment shader per primitive input
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:15 +00:00
Qiang Yu
dfc679e791 radeonsi: support mesh shader per primitive output
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:15 +00:00
Qiang Yu
16656ebaaf radeonsi: compute vs_output_ps_input_cntl for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:14 +00:00
Qiang Yu
a982e5bb8a radeonsi: add mesh shader bits for dirty_shaders_mask
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:14 +00:00
Qiang Yu
0ddc1d21f2 radeonsi: dump shader key for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:13 +00:00
Qiang Yu
f513d47266 radeonsi: compile mesh shader with ACO only
RADV only support mesh shader with ACO. So left LLVM
support later.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:13 +00:00
Qiang Yu
fc81d7e7d4 radeonsi: si_select_hw_stage support mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:13 +00:00
Qiang Yu
351070c46c radeonsi: si_get_output_prim_simplified support mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:12 +00:00
Qiang Yu
8ef07d4d8b radeonsi: support mesh shader per vertex output
mesh shader uses per vertex output store, and
si_nir_assign_param_offsets assert output store to be
scalar.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:12 +00:00
Qiang Yu
845f333111 radeonsi: select key for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:11 +00:00
Qiang Yu
e42ada1723 radeonsi: add mesh shader debug options
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:11 +00:00
Qiang Yu
282a0ae20c radeonsi: add mesh shader state create/delete/bind
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:10 +00:00
Qiang Yu
8cae067adc radeonsi: export si_set_user_data_base for mesh shader usage
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:10 +00:00
Qiang Yu
43cf109f47 radeonsi: emit shader pointer for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:09 +00:00
Qiang Yu
a44d91d065 radeonsi: call si_shader_change_notify when vs bind
vs may be null when mesh shader enabled. mesh shader and
vertex shader may share the GS user sgpr, so need to call
si_shader_change_notify to mark shader pointers dirty.

Also remove some init code which will be done anyway when
vs bind first shader in si_shader_change_notify now.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932>
2025-10-24 02:07:09 +00:00
Ian Romanick
f1bbc3d4e4 nir/algebraic: Don't generate integer min or max that will need to be lowered
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In !35844, there was some discussion about allowing 64-bit bcsel that
would be lowered in the driver. One challenge there would be if a 64-bit
bcsel was transformed into integer min or max by an algebraic
optimization. I believe these were the only algebraic patterns that
could create new integer min or max that would not be immediately
constant folded.

There were no shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38033>
2025-10-23 22:35:27 +00:00
Caio Oliveira
6fe5d7b0a4 intel/mda: Allow to specify directories with -f
If you have before/after mda files in separate directories, this make
easier to import them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37806>
2025-10-23 22:21:14 +00:00
Jordan Justen
84a67b5ab4 intel/dev: Add NVL-S/U PCI IDs (with FORCE_PROBE required)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Ref: bspec 74201
Ref: c002b1764e
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38020>
2025-10-23 21:47:29 +00:00
Jordan Justen
ac1a7e19e8 intel/dev: Add NVL-S/U device info
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38020>
2025-10-23 21:47:29 +00:00
Jordan Justen
84bba237ca intel/dev: Add INTEL_PLATFORM_NVL_U platform enum
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38020>
2025-10-23 21:47:28 +00:00
Mauro Rossi
7bbbfa6670 util: Fix gnu-empty-initializer error
Fixes the following building error happening with clang:

../src/util/os_file.c:291:29: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct epoll_event evt = {};
                            ^
1 error generated.

Fixes: 17e28652 ("util: mimic KCMP_FILE via epoll when KCMP is missing")
Cc: "25.3"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37944>
2025-10-23 21:11:30 +00:00
Connor Abbott
8d276e0d70 tu: Fix RT count with remapped color attachments
The index of each RT is the remapped color attachment index, so we have
to use the remapped indices when telling the HW the number of RTs.

This fixes KHR-GLES3.framebuffer_blit.scissor_blit on ANGLE once we
enabled VK_EXT_multisampled_render_to_single_sampled, which switched
ANGLE to using dynamic rendering with
VK_KHR_dynamic_rendering_local_read.

Fixes: d50eef5b06 ("tu: Support color attachment remapping")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37990>
2025-10-23 20:17:32 +00:00
Zan Dobersek
75da8229f9 tu: don't advertise sample location support for VK_SAMPLE_COUNT_1_BIT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Hardware doesn't support programmable sample locations with 1x MSAA, so
VK_SAMPLE_COUNT_1_BIT shouldn't be included in the
VkPhysicalDeviceSampleLocationsPropertiesEXT::sampleLocationSampleCounts
bitmask. With this sample count MSAA will also be disabled through relevant
control registers, effectively forcing all samples to the center position.

Fixes failures in VK_SAMPLE_COUNT_1_BIT tests under
dEQP-VK.pipeline.*.*.sample_locations_ext.verify_interpolation.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38026>
2025-10-23 19:46:23 +00:00
Lionel Landwerlin
2689056c82 anv: destroy sets when destroying pool
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14169
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38035>
2025-10-23 19:25:21 +00:00
Lionel Landwerlin
e450297ea9 anv/brw: fix output tcs vertices
brw_prog_tcs_data::instances can be divided by vertices per threads on
earlier generations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a91e0e0d61 ("brw: add support for separate tessellation shader compilation")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38036>
2025-10-23 18:54:05 +00:00
Felix DeGrood
cbcfaca647 intel/ds: reduce min sampling period of pps-producer to 5us
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37991>
2025-10-23 18:22:20 +00:00
Sushma Venkatesh Reddy
69dc01405d intel/perf: Update perf scripts to get additional performance counters
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There are a number of metrics that are of interest for compute workloads
analysis which were missing in the initial PTL OA support (MR: 35298).
Updated oa_ptl.xml file provides these metrics.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13663
Tested-by: Arselan Alvi <arselan.alvi@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37072>
2025-10-23 16:59:09 +00:00
Sushma Venkatesh Reddy
44c1dcd0ed intel/dev: Add geometry, color and depth pipes count
Geometry, Color and Depth pipelines count are needed for collecting some
metrics from perfetto.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37072>
2025-10-23 16:59:09 +00:00
Felix DeGrood
f448a4668b intel/tools: add cmdbuf/queue annotation parsing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
intel_measure now prints annotations when using '--verbose'.

Filter out internal Renderdoc events when using '--trace'

Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37983>
2025-10-23 15:31:10 +00:00
Felix DeGrood
a21de67fdd intel/tools: make eop default
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37983>
2025-10-23 15:31:10 +00:00
Felix DeGrood
8c10226374 intel/tools: add eop timestamp to intel_measure
Adds end of pipe to end of pipe timestamp parsing. Does not require
inserting stall between events to get accurate values but events
will sometimes be running in parallel.

Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37983>
2025-10-23 15:31:09 +00:00
Felix DeGrood
5ba9776bc5 intel/tools: make frame and cb index base-0 in intel_measure
Better reflects original utrace data.

Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37983>
2025-10-23 15:31:09 +00:00
Samuel Pitoiset
3440272406 radv/ci: update comments around video failures
They are expected failures and they will always fail unless we have
new firmwares (which is unlikely to happen).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38021>
2025-10-23 16:56:26 +02:00
Samuel Pitoiset
f5384df105 radv/ci: stop skipping dEQP-VK.descriptor_indexing.* on Cezanne
The fix is included in VKCTS now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38021>
2025-10-23 16:56:26 +02:00
Xaver Hugl
14fcf145e3 vulkan/wsi: remove support for VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's not really clear whether or not it should use gamma 2.2 or the piece-wise
transfer function, or how clients would use it for wider gamut in general.
Currently no compositors I know of support ext_srgb, so this shouldn't affect
applications in practice.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Fixes: 4b663d56 ("vulkan/wsi: implement support for VK_EXT_hdr_metadata on Wayland")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36444>
2025-10-23 13:02:32 +00:00
Simon Perretta
c60232c0c5 pvr: temporarily disable gs_rta_support on all cores
The gs_rta_support feature is currently bugged and may cause the
driver to assert; disabling it will instead use a fallback method
which is functional.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38024>
2025-10-23 13:18:56 +01:00
Alejandro Piñeiro
75eee7f38b panfrost: cleanup outputs_read/outputs_written at pan_shader_info
With this commit we do two things:

  * Remove pan_shader_info.fs.outputs_written because it is not used,
    as there is already pan_shader_info.outputs_written

  * For pan_shader_info.fs.outputs_read we direcly copy the nir
    info.outputs_read, without a shift, for consistency and also
    because it is not really required.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38022>
2025-10-23 11:57:37 +00:00
Rhys Perry
f3ff2375ec ac/nir: don't consider quads incomplete inside loops
We move terminates to outside loops, so this doesn't matter anymore.

fossil-db (gfx1201):
Totals from 145 (0.18% of 79839) affected shaders:
Instrs: 174693 -> 174389 (-0.17%); split: -0.18%, +0.01%
CodeSize: 917068 -> 915692 (-0.15%); split: -0.16%, +0.01%
VGPRs: 8340 -> 8184 (-1.87%)
Latency: 2528888 -> 2521006 (-0.31%); split: -0.48%, +0.16%
InvThroughput: 502383 -> 504082 (+0.34%); split: -0.44%, +0.78%
Copies: 15968 -> 15632 (-2.10%); split: -2.14%, +0.04%
PreVGPRs: 5918 -> 5858 (-1.01%)
VALU: 92802 -> 92484 (-0.34%); split: -0.35%, +0.01%
SALU: 29437 -> 29430 (-0.02%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37561>
2025-10-23 11:22:02 +00:00
Rhys Perry
9babec1366 radv,radeonsi: use optimize_txd
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37561>
2025-10-23 11:22:01 +00:00
Rhys Perry
7d552d71e9 ac/nir: optimize txd(coord, ddx/ddy(coord))
This is done in ac_nir_lower_tex so that we can optimize derivative
calculations with a different exec mask than the texture sample by using
the nir_strict_wqm_coord_amd path.

It's also more aware of divergence than nir_lower_tex is.

fossil-db (gfx1201):
Totals from 103 (0.13% of 79839) affected shaders:
MaxWaves: 2610 -> 2620 (+0.38%)
Instrs: 347283 -> 345912 (-0.39%); split: -0.40%, +0.00%
CodeSize: 1892380 -> 1883824 (-0.45%); split: -0.46%, +0.00%
VGPRs: 8028 -> 7824 (-2.54%)
Latency: 3942575 -> 3939623 (-0.07%); split: -0.08%, +0.01%
InvThroughput: 867147 -> 865281 (-0.22%); split: -0.24%, +0.02%
VClause: 6230 -> 6221 (-0.14%); split: -0.19%, +0.05%
SClause: 3910 -> 3914 (+0.10%); split: -0.26%, +0.36%
Copies: 16091 -> 15721 (-2.30%); split: -2.74%, +0.44%
PreSGPRs: 4651 -> 4658 (+0.15%)
PreVGPRs: 6389 -> 6320 (-1.08%); split: -1.17%, +0.09%
VALU: 228715 -> 227490 (-0.54%); split: -0.54%, +0.01%
SALU: 32763 -> 32767 (+0.01%); split: -0.06%, +0.07%
VMEM: 9027 -> 9024 (-0.03%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37561>
2025-10-23 11:22:00 +00:00
Rhys Perry
309ac1f0c0 ac/nir: refactor move_coords_from_divergent_cf a bit
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37561>
2025-10-23 11:21:59 +00:00
Rhys Perry
92beca9aa5 nir/lower_tex: optimize txd(coord, ddx/ddy(coord))
fossil-db (gfx1201):
Totals from 73 (0.09% of 79839) affected shaders:
MaxWaves: 1668 -> 1670 (+0.12%)
Instrs: 352537 -> 347991 (-1.29%); split: -1.29%, +0.00%
CodeSize: 1924140 -> 1887660 (-1.90%); split: -1.90%, +0.00%
VGPRs: 6360 -> 6324 (-0.57%)
Latency: 3891330 -> 3888192 (-0.08%); split: -0.10%, +0.02%
InvThroughput: 789998 -> 783583 (-0.81%); split: -0.84%, +0.03%
VClause: 6409 -> 6408 (-0.02%); split: -0.06%, +0.05%
SClause: 4071 -> 4102 (+0.76%); split: -0.10%, +0.86%
Copies: 16756 -> 16316 (-2.63%); split: -2.94%, +0.32%
PreVGPRs: 5456 -> 5432 (-0.44%); split: -0.57%, +0.13%
VALU: 232982 -> 228117 (-2.09%)
SALU: 32853 -> 32848 (-0.02%); split: -0.05%, +0.03%
VMEM: 9234 -> 9237 (+0.03%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37561>
2025-10-23 11:21:59 +00:00
Rhys Perry
8e7ea4a882 nir/lower_shader_calls: reobtain impl after NIR_PASS
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: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37573>
2025-10-23 10:44:38 +00:00
Rhys Perry
241bbb4977 radv: remove NIR_PASS in insert_rt_case
When NIR_DEBUG=serialize or NIR_DEBUG=clone is used, NIR_PASS recreates
nir_function_impl and nir_variable objects, causing use-after-free since
insert_rt_case() keeps pointers to those in local variables and var_remap.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37573>
2025-10-23 10:44:38 +00:00
Rhys Perry
55018df38d radv: stop rallocing objects which don't belong to the shader under it
This doesn't work with NIR_DEBUG=serialize or NIR_DEBUG=clone.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37573>
2025-10-23 10:44:38 +00:00
Rhys Perry
762a803aa7 radv: remove NIR_PASS in radv_nir_lower_rt_abi
When NIR_DEBUG=serialize or NIR_DEBUG=clone is used, NIR_PASS recreates
nir_function_impl and nir_variable objects, causing use-after-free since
radv_nir_lower_rt_abi() keeps pointers to those in local variables.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37573>
2025-10-23 10:44:38 +00:00
Rhys Perry
42bb81137e ac/nir: stop using NIR_PASS in ac_nir_lower_ngg_nogs()
When NIR_DEBUG=serialize or NIR_DEBUG=clone is used, NIR_PASS recreates
nir_function_impl and nir_variable objects, causing use-after-free since
ac_nir_lower_ngg_nogs() keeps pointers to those in local variables.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13946
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37573>
2025-10-23 10:44:38 +00:00
Jose Maria Casanova Crespo
ac602a15d1 v3dv: use vk_drm_syncobj_copy_payloads helper
Enable in v3dv the improvement implemented at
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827
("vulkan/wsi: Stop calling unnecessarily calling vkQueueSubmit()")

This shows an average improvement in FPS of 1.56% in vkmark stats.

[vertex] device-local=true:        2032 -> 2071 (+1.94%)
[vertex] device-local=false:       2042 -> 2068 (+1.29%)
[texture] anisotropy=0:            1721 -> 1731 (+0.58%)
[texture] anisotropy=16:           1655 -> 1678 (+1.35%)
[shading] shading=gouraud:         1766 -> 1792 (+1.45%)
[shading] shading=blinn-phong-inf: 1704 -> 1731 (+1.60%)
[shading] shading=phong:           1542 -> 1565 (+1.54%)
[shading] shading=cel:             1529 -> 1563 (+2.27%)
[effect2d] kernel=edge:             914 ->  923 (+0.95%)
[effect2d] kernel=blur:             384 ->  386 (+0.52%)
[desktop] <default>:                789 ->  796 (+0.93%)
[cube] <default>:                  2204 -> 2244 (+1.80%)
[clear] <default>:                 2492 -> 2593 (+4.03%)

The improvement is mainly on vkmark but other gfxrecon traces
exercise this code path but without a significant performance
improvement.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37996>
2025-10-23 10:07:05 +00:00
Yiwei Zhang
2e32dd7472 venus: skip feedback cmd record on incompatible queue families
Feedback requires transfer capability, so we must skip feedback cmd
pool initialization on incompatible queue families. Meanwhile, use
pool_handle for all validity check needed.
- fence and semaphore feedback: skip feedback cmd alloc and record when
  pool_handle is VK_NULL_HANDLE
- event feedback: not affected as we patch in-place upon recording
- query feedback: assert the feedback cmd alloc is on supported queue

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38016>
2025-10-23 08:57:12 +00:00
Samuel Pitoiset
457d8926e1 amd,radv,radeonsi: add ac_emit_cp_release_mem()
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:27 +00:00
Samuel Pitoiset
22d73fc077 amd,radv,radeonsi: add ac_emit_spm_setup()
This moves all SPM emit code to common code. This likely also fixes
SPM on GFX11+ for RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:27 +00:00
Samuel Pitoiset
202f8db793 amd,radv,radeonsi: add ac_emit_cp_spi_config_cntl()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:27 +00:00
Samuel Pitoiset
5cb400a97b amd,radv,radeonsi: add ac_emit_cp_inhibit_clockgating()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:26 +00:00
Samuel Pitoiset
bc1080e27f amd,radv,radeonsi: add and use more ac_cmdbuf_XXX helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:26 +00:00
Samuel Pitoiset
a4a834859e radv/amdgpu: remove now unused radeon_emit helpers
Keep radeon_emit_unchecked() for now because it's special.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:25 +00:00
Samuel Pitoiset
0fb21e2299 amd,radv: add ac_emit_cp_indirect_buffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:25 +00:00
Samuel Pitoiset
3efe8ec16b radv/amdgpu: use common emit helpers in radv_amdgpu_cs_chain_dgc_ib()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:25 +00:00
Samuel Pitoiset
50ec03054c amd,radv,radeonsi: add ac_pm4_emit_commands()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956>
2025-10-23 08:29:24 +00:00
Samuel Pitoiset
22cb7b5fe2 radv: bump image limit properties on GFX12
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14150
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974>
2025-10-23 07:56:39 +00:00
Samuel Pitoiset
002ebb4fe5 radv: configure the screen scissor to the maximum image dimension
The framebuffer dimension exposed to apps is still 16k but since the
driver allows 32k image on GFX12+, meta operations might perform
operations (like a copy) using graphics.

While we are at it, use the correct bitfield for setting BR_X/BR_Y on
GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974>
2025-10-23 07:56:38 +00:00
Samuel Pitoiset
bcde1a6650 radv: initialize image properties earlier
This is less error prone and it removes redundant code.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974>
2025-10-23 07:56:37 +00:00
Samuel Pitoiset
3678437ca0 radv: bump maxImageDimension3D to 8192 on GFX10+
This was missing and it aligns to VkImageFormatProperties.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974>
2025-10-23 07:56:36 +00:00
Samuel Pitoiset
5c71ffbc3d radv: bump maxImageArrayLayers to 8192 on GFX10+
This was missing and it aligns to VkImageFormatProperties.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974>
2025-10-23 07:56:36 +00:00
Konstantin Seurer
47ffe2ecd4 aco: Fixup out_launch_size_y in the RT prolog for 1D dispatch
launch_size_y is set to ACO_RT_CONVERTED_2D_LAUNCH_SIZE for 1D
dispatches. The prolog needs to set it to 1 so that the app shader
loads the correct value.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974>
2025-10-23 07:56:35 +00:00
Samuel Pitoiset
067b05d5b9 radv: remove radv_pipeline_layout::push_constant_size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769>
2025-10-23 07:25:41 +00:00
Samuel Pitoiset
d15b411262 radv: remove radv_shader_layout::push_constant_size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769>
2025-10-23 07:25:41 +00:00
Samuel Pitoiset
2985322ed1 radv: gather push constant size from shaders for pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769>
2025-10-23 07:25:41 +00:00
Samuel Pitoiset
97dbf7b895 radv/rt: radv: gather push constant size from shaders for RT
And store the total push constant size to the RT prolog.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769>
2025-10-23 07:25:41 +00:00
Samuel Pitoiset
aa44a5a4ae radv: gather push constant size from shaders for ESO
Instead of using the shader layout which won't exist anymore with heap.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769>
2025-10-23 07:25:41 +00:00
Romaric Jodin
a25e88cd84 aux/trace: remove -I argument
enums2names.py is only uses in one place. I propose to remove the -I
argument that is not strictly necessary as we can already get the
header name from the `-H` argument.

That modification is motivated by the need to help ninja-to-soong to
generate proper rule for the Android build system.

ninja-to-soong can't differenciate output file location and a string
matching the output file name.

Ref #14072

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37785>
2025-10-23 07:03:01 +00:00
Faith Ekstrand
aa0f404f7b nvk: Disable sampleLocationsSampleCounts for 1x MSAA
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Suggested-by: Mel Henning <mhenning@darkrefraction.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14108
Fixes: a34edc7500 ("nvk: Fill out sample locations on Maxwell B+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38018>
2025-10-22 21:55:22 +00:00
Faith Ekstrand
d1793c7a59 nvk: Include the chipset in the pipeline/binary cache UUID
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38018>
2025-10-22 21:55:22 +00:00
Lionel Landwerlin
aa929ea706 nir/lower_io: add missing levels intrinsics to get_io_index_src_number
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c7ac46a1d8 ("nir/lower_io: add get_io_index_src_number support for image intrinsics")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38012>
2025-10-22 21:21:47 +00:00
Aitor Camacho
cf49338ccd kk: Expose missing BC formats
Exposing textureCompressionBC requires all BC formats in Vulkan.
Missing BC formats added in this commit:
 - VK_FORMAT_BC1_RGB_UNORM_BLOCK
 - VK_FORMAT_BC1_RGB_SRGB_BLOCK

Fixes: fa6fa8c19e ("kk: BCn Formats")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38014>
2025-10-22 21:08:27 +00:00
Lionel Landwerlin
f3df267735 brw: handle GLSL/GLSL tessellation parameters
Apparently various tessellation parameters come specified from
TESS_EVAL stage in GLSL while they come from the TESS_CTRL stage in
HLSL.

We switch to store the tesselation params more like shader_info with 0
values for unspecified fields. That let's us merge it with a simple OR
with values from from tcs/tes and the resulting merge can be used for
state programming.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a91e0e0d61 ("brw: add support for separate tessellation shader compilation")
Fixes: 50fd669294 ("anv: prep work for separate tessellation shaders")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37979>
2025-10-22 20:48:59 +00:00
Lionel Landwerlin
8d05b7b72e anv: rename structure holding 3DSTATE_WM_DEPTH_STENCIL state
Cc stable for the next commit.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37979>
2025-10-22 20:48:59 +00:00
Mel Henning
fafb81cd02 treewide: Use vk_collect_dependency_info_src_stages
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37961>
2025-10-22 19:22:17 +00:00
Mel Henning
90d17c0088 vulkan: Add vk_collect_dependency_info_src_stages
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37961>
2025-10-22 19:22:17 +00:00
Valentine Burley
fd2fa0fbc9 tu: Fix maxVariableDescriptorCount with inline uniform blocks
It must not be larger than maxInlineUniformBlockSize.

Fixes VKCTS 1.4.4.0's
dEQP-VK.api.maintenance3_check.support_count_inline_uniform_block*.

Cc: mesa-stable

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38002>
2025-10-22 18:14:00 +00:00
Valentine Burley
17e25b4983 tu: Fix indexing with variable descriptor count
Based on RADV.
The Vulkan spec says:
    "If bindingCount is zero or if this structure is not included in
     the pNext chain, the VkDescriptorBindingFlags for each descriptor
     set layout binding is considered to be zero. Otherwise, the
     descriptor set layout binding at
     VkDescriptorSetLayoutCreateInfo::pBindings[i] uses the flags in
     pBindingFlags[i]."

Fixes dEQP-VK.api.maintenance3_check.* in VKCTS 1.4.4.0.

Cc: mesa-stable

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38002>
2025-10-22 18:14:00 +00:00
Simon Perretta
ff51e6dc9e nir: commonize barycentric intrinsic opt pass
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Introduces an opt pass that attempts to optimize
load_barycentric_at_{sample,offset} with simpler load_barycentric_*
equivalents where possible, and optionally lowers
load_barycentric_at_sample to load_barycentric_at_offset with a position
derived from the sample ID instead.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37658>
2025-10-22 16:48:01 +00:00
Caio Oliveira
e38491eb18 mesa/st: Lower to ALU scalar after fp64 subgroup lowering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The subgroup lowering may generate new fp64 vector operations, so
ensure that those are lowered before calling nir_lower_doubles().

Issue spotted by Georg Lehmann.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38003>
2025-10-22 15:35:34 +00:00
Isaac Marovitz
fa6fa8c19e kk: BCn Formats
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37967>
2025-10-22 15:21:29 +00:00
Jarrett Johnson
a62f285607 kk: advertise multiDrawIndirect
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37962>
2025-10-22 15:08:13 +00:00
Olivia Lee
bca29b1c92 hk: fix data race when initializing poly_heap
hk_heap is called during command buffer recording, which may be
concurrent, so writing dev->heap without synchronization is a data race.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37973>
2025-10-22 14:54:24 +00:00
Benjamin Cheng
b6d6c1af73 radv/video_enc: Cleanup slice count assert
This was left over when first enabling multiple slice encoding.

Fixes: 63e952ff2c ("radv/video: Support encoding multiple slices")
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37999>
2025-10-22 14:31:45 +00:00
Alyssa Rosenzweig
05481f56a0 brw: use the right int8/int16 division lowering
lowering bitsize before lowering idiv is silly, since then it forces us
down the software int32 division path instead of the much faster
int8/int16 lowered path. Relevant CTS tests:

dEQP-VK.spirv_assembly.type.scalar.i16.div_comp,
dEQP-VK.spirv_assembly.type.scalar.i8.rem_comp,

Go from:

SIMD8 shader: 46 instructions. 1 loops. 4716 cycles. 0:0 spills:fills
SIMD8 shader: 1008 instructions. 0 loops. 3600 cycles. 0:0 spills:fills, 8 sends

to:

SIMD8 shader: 17 instructions. 1 loops. 2556 cycles. 0:0 spills:fills
SIMD8 shader: 464 instructions. 0 loops. 1394 cycles. 0:0 spills:fills, 8 sends

No stats change on fossil-db (which has very little int8/int16 and even
less integer division, apparently).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37966>
2025-10-22 10:00:36 -04:00
Aksel Hjerpbakk
c2a6fb6419 panvk: cull semaphores in unrelated subqueues
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Skip waiting/signaling on semaphores with stages not related
to a given subqueue

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37810>
2025-10-22 11:48:50 +00:00
Aksel Hjerpbakk
1381228329 panvk: refactor vk_stage_to_subqueue_mask
- rename vk_stage_to_subqueue_mask -> vk_stages_to_subqueue_mask
- handle stage masks instead of single stages.
- Add which sync scope it is reading to better reason with the mask semantics.
- Handle ALL_COMMANDS as well as TOP/BOTTOM (using sync scopes)
- add timestamp utility vk_stage_to_timestamp_subqueue_mask

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37810>
2025-10-22 11:48:50 +00:00
Julian Orth
9fde755357 kopper: disable color management for wayland surfaces
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise clients cannot use color management themselves.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37693>
2025-10-22 10:22:41 +00:00
Pierre-Eric Pelloux-Prayer
90103fe618 radeonsi: propagate shader updates for merged shaders
In case of merged shaders (eg: VS+GS), a change to VS should trigger
a GS update.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13935
Fixes: b1a34ac95d ("radeonsi: change do_update_shaders boolean to a bitmask")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37882>
2025-10-22 09:45:49 +00:00
Pierre-Eric Pelloux-Prayer
091f18ea57 radeonsi: set VS dirty bit from si_vs_key_update_inputs
Since it has to be done for every caller we might as well
do it from a single place.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37882>
2025-10-22 09:45:49 +00:00
Pierre-Eric Pelloux-Prayer
d3f8571e84 radeonsi: limit the sqtt buffer size
We don't want the buffer size to wraparound to 0.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37882>
2025-10-22 09:45:49 +00:00
Lars-Ivar Hesselberg Simonsen
a7bf37e3bd panvk/v9+: Reduce maxBoundDescriptorSets to 7
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Until now, the driver has been using a single set for internal state
while leaving maxBoundDescriptorSets to the remaining 15.

This gives us no room for optimizations of driver sets, which might
become an issue in the future.

To remedy this, we therefore reduce maxBoundDescriptorSets to 7. This
aligns with the proprietary driver and gives us the space to optimize
the driver sets.

We might increase this in the future if we see that we don't need all
the driver sets we now reserve.

Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37978>
2025-10-22 10:38:35 +02:00
Eric Engestrom
4ab65cdaa4 docs: update/fix vk spec urls
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37993>
2025-10-22 09:23:34 +02:00
Faith Ekstrand
efbecd93ba util: Build util/cache_ops_x86.c with -msse2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
__builtin_ia32_clflush() requires -msse2 so we need to set -msse2 at
least for building that file.  Fortunately, there are no GPUs that
actually need userspace cache flushing that can ever be bolted onto a
pre-SSE2 x86 CPUs.

Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14134
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37958>
2025-10-22 03:36:10 +00:00
Faith Ekstrand
3739d7a90c util: Don't advertise cache ops on x86 without SSE2
Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37958>
2025-10-22 03:36:10 +00:00
Olivia Lee
a410d90fd2 panfrost: fix cl_local_size for precompiled shaders
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
nir_lower_compute_system_values will attempt to lower
load_workgroup_size unless workgroup_size_variable is set. For precomp
shaders, the workgroup size is set statically for each entrypoint by
nir_precompiled_build_variant. Because we call
lower_compute_system_values early, it sets the workgroup size to zero.
Temporarily setting workgroup_size_variable while we are still
processing all the entrypoints together inhibits this.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 20970bcd96 ("panfrost: Add base of OpenCL C infrastructure")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37799>
2025-10-22 00:15:49 +00:00
Aitor Camacho
02a1ec1021 kk: Hash vertex input state
We embed vertex fetching into vertex shaders and therefore
we require hashing that state so the hash works as expected.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37992>
2025-10-21 23:59:33 +00:00
Lorenzo Rossi
dc0dcc993b nvk: implement VK_EXT_discard_rectangles
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33476>
2025-10-21 23:17:38 +00:00
Lorenzo Rossi
4c62e09505 vulkan: increase MESA_VK_MAX_DISCARD_RECTANGLES
Turing and newer Nvidia cards can work with up to 8 discard rectangles

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33476>
2025-10-21 23:17:38 +00:00
Rhys Perry
b18421ae3d amd/lower_mem_access_bit_sizes: fix shared access when bytes<bit_size/8
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This can happen with (for example) 32x2 loads with
align_mul=4,align_offset=2.

This patch does bit_size=min(bit_size,bytes) to prevent num_components
from being 0.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 52cd5f7e69 ("ac/nir_lower_mem_access_bit_sizes: Split unsupported shared memory instructions")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37953>
2025-10-21 22:10:34 +00:00
Rhys Perry
64ec757688 nir/lower_mem_access_bit_sizes: increase chunk limit
Not sure about creating u64vec16 loads, but creating unaligned loads is
possible with opt_if_rewrite_uniform_uses.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37953>
2025-10-21 22:10:34 +00:00
Rhys Perry
e89b22280f amd/lower_mem_access_bit_sizes: be more careful with 8/16-bit scratch load
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.3
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37953>
2025-10-21 22:10:34 +00:00
Rhys Perry
8829fc3bd6 amd/lower_mem_access_bit_sizes: improve subdword/unaligned SMEM lowering
Summary of changes:
- handle unaligned 16-bit scalar loads when supported_dword=true
- increases the size of 8/16/32/64-bit buffer loads which are not dword
  aligned, which can create less SMEM loads.
- handles when "bytes" is less than "bit_size / 8"

fossil-db (gfx1201):
Totals from 26 (0.03% of 79839) affected shaders:
Instrs: 12676 -> 12710 (+0.27%); split: -0.30%, +0.57%
CodeSize: 67272 -> 67384 (+0.17%); split: -0.24%, +0.40%
Latency: 44399 -> 44375 (-0.05%); split: -0.09%, +0.04%
SClause: 352 -> 344 (-2.27%)
SALU: 3972 -> 3992 (+0.50%)
SMEM: 554 -> 528 (-4.69%)

fossil-db (navi21):
Totals from 6 (0.01% of 79825) affected shaders:
Instrs: 2192 -> 2186 (-0.27%)
CodeSize: 12188 -> 12140 (-0.39%)
Latency: 10037 -> 10033 (-0.04%); split: -0.12%, +0.08%
SMEM: 124 -> 118 (-4.84%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: fbf0399517 ("amd/lower_mem_access_bit_sizes: lower all SMEM instructions to supported sizes")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37953>
2025-10-21 22:10:34 +00:00
Rhys Perry
79b2fa785d amd/lower_mem_access_bit_sizes: don't create subdword UBO loads with LLVM
These are unsupported.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14127
Fixes: fbf0399517 ("amd/lower_mem_access_bit_sizes: lower all SMEM instructions to supported sizes")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37953>
2025-10-21 22:10:33 +00:00
Dylan Baker
38e1a43f53 intel/mda: Fix potential underflow in printing code
The actual chances of this happening seem dubious, but the cleaned up
code seems nice. printf returns a value >= 0 on success, which is the
number of characters it writes a return < 0 means that an error
occurred, and then errno is set. Which negative value doesn't seem to be
specified, but it also seems unlikely that any implementation would
return `-MAX_INT`...

Anyway, this is fixed by converting the generic `print_repeated` to a
`print_separator` that avoids the need to do arithmetic at all by just
stopping the loop at 1 instead of 0, and then printing a newline.

CID: 1666497
CID: 1666256
CID: 1666531
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37746>
2025-10-21 21:55:53 +00:00
Dylan Baker
f25e59b951 intel/mda/tests: use an ASSERT on fread()
Coverity is pointing out that we should check this, and in reality if
this isn't what we expect the rest of the test is probably invalid
anyway.

CID: 1666504
CID: 1666544
CID: 1666552
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37750>
2025-10-21 14:39:18 -07:00
Mel Henning
28fbc6addb nvk: VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR
This was missed in the original maintenance9 MR.

Fixes the flakes in test
dEQP-VK.synchronization2.op.single_queue.event.write_ssbo_compute_read_ssbo_compute.buffer_16384_maintenance9

Fixes: 7692d3c0 ("nvk: Advertise VK_KHR_maintenance9")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37964>
2025-10-21 20:57:41 +00:00
Karol Herbst
e7dca5a6ca nak: fix MMA latencies on Ampere
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Fixes: 7a01953a39 ("nak: Add Ampere and Ada latency information")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37941>
2025-10-21 20:12:30 +00:00
Karol Herbst
cf4df97093 nak: improve fp16 latencies on Ampere
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37941>
2025-10-21 20:12:30 +00:00
Karol Herbst
85480200f8 nak: simplify SM80 HMMA latency categorization
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37941>
2025-10-21 20:12:30 +00:00
Karol Herbst
3bbf3f7826 nak: ensure deref has a ptr_stride in cmat load/store lowering
With untyped pointer we might get a deref_cast with a 0 ptr_stride. But we
were supposed to ignore the stride information on the pointer anyway, so
let's do that properly now.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Fixes: 05dca16143 ("nak: extract nir_intrinsic_cmat_load lowering into a function")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37941>
2025-10-21 20:12:30 +00:00
Karol Herbst
f632bfc715 nak: extract cmat load/store element offset calculation
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Fixes: 05dca16143 ("nak: extract nir_intrinsic_cmat_load lowering into a function")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37941>
2025-10-21 20:12:30 +00:00
Konstantin Seurer
d423554e9e radv/bvh: Pair compress triangles in more cases
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:55 +00:00
Konstantin Seurer
c0f332f1cb vulkan/bvh: Add leaf.h to vk_bvh_includes
Otherwise, the shader will not recompile when the file was modified.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:55 +00:00
Konstantin Seurer
020bd86d30 vulkan: Remove the vk_ir_triangle_node::id field
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:55 +00:00
Konstantin Seurer
c18a7d0e2b radv: Emit compressed primitive nodes on GFX12
The normal encode pass writes batches to a section in build scratch
memory. Those batches contain information about the internal node and
the primitive nodes. The encoder is split to avoid the register
pressure of the compressor and maximize occupancy.

The compressor works in two passes because one pass can not guarantee
that every primitive node (except) has at least two triangles. This
guarantee is used to advertise a smaller acceleration structure size to
the application.

During compression, every invocation processes at most two triangles.
Groups of 8 invocations are used to support the maximum triangle count
of 16 that the hardware supports.

The first step of compression is loading the triangle(s). Shared
vertices are deduplicated early to avoid doing it in the compression
loop. The compression loop tries to add triangles to a list of triangles
until the computed node size needed for storing the triangles reaches
the hardware node size. For this, each invocation first deduplicates
vertices with the triangles that have already been picked. It then
computes the node size of the picked triangles plus the candidate
triangles of the current invocation. The invocation that computed the
smallest size is added to the list.

Because it may not be possible to fit every triangle into the same node,
there can be multiple hardware nodes which are written in parallel for
optimal performance. If there are no nodes with only one triangle, all
nodes are written. If there is, compression of the batch is aborted and
the index of the batch is written to build scratch memory. The second
compression pass will repeat the steps above but only for those aborted
batches. The nodes with only one triangle can and are now merged.

It can not be determined during box node encode which triangles will be
compressed together so the encoder also has to fix up the parent box
node's child infos.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:55 +00:00
Konstantin Seurer
c5f9fe5e3b radv/rra/gfx12: Properly validate geometry indices
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:54 +00:00
Konstantin Seurer
82728380a2 vulkan/bvh: Add some debug helpers
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:54 +00:00
Konstantin Seurer
639cc4d937 vulkan: Bump MAX_ENCODE_PASSES to 4
Triangle compression will be performed in two extra passes.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:54 +00:00
Konstantin Seurer
6a53aae6b2 vulkan: Add vk_ir_header::driver_internal
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:54 +00:00
Konstantin Seurer
2ee8bfefe6 radv/bvh: Add radv_first_active_invocation
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965>
2025-10-21 19:32:53 +00:00
Yiwei Zhang
bd53bbbc57 panvk: support VK_EXT_external_memory_acquire_unmodified
Upon acquiring an external image from external/foreign queue family,
skip AFBC metadata invalidation if the app has explicitly requested
acquireUnmodifiedMemory. This also applies to CRC which may or may not
get hooked up later.

Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37972>
2025-10-21 19:15:58 +00:00
Konstantin Seurer
990f1868ec vulkan/cmd_queue: Free all elements of struct arrays
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37710>
2025-10-21 19:50:47 +02:00
Konstantin Seurer
a3e77fe5d2 vulkan/cmd_queue: Fix indentation for struct array copies
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37710>
2025-10-21 19:49:54 +02:00
Faith Ekstrand
38950083ae panvk: Fix integer dot product properties
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We already set has_[su]dot_4x8[_sat] in nir_shader_compiler_options so
we're already getting the opcodes.  We just need to advertise the
features properly.  If bifrost_compile.h is to be believed, those are
all available starting at gen 9.

Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/218
Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/219
Fixes: f7f9b3d170 ("panvk: Move to vk_properties")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37980>
2025-10-21 17:24:41 +00:00
Silvio Vilerino
d380e54422 d3d12: Fix d3d12_video_enc.cpp(4794,33): Error C4244: initializing: conversion from uint64_t to SIZE_T, possible loss of data
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:23:36 -07:00
Silvio Vilerino
44d8e999e2 mediafoundation: Also set pSyncObjectQueue = m_spStagingQueue when DX11 input sample
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:23:31 -07:00
Silvio Vilerino
d2cbbccaaa mediafoundation: Only wait on pSyncObjectQueue for stats completion if any stat was enabled
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:23:27 -07:00
Silvio Vilerino
4f7aa40222 mediafoundation: Allocate pro-rated buffer sizes for multi-slice encoding
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:23:21 -07:00
Silvio Vilerino
b454c35318 mediafoundation: Only use sliced mode when CODECAPI_AVEncSliceGenerationMode is set, disregarding num slices configured
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:23:11 -07:00
Silvio Vilerino
71aecf4a93 mediafoundation: SliceGeneration=1: Zero copy IMFSample output with wrapped ID3D12Resource frame/slice buffers
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:23:06 -07:00
Silvio Vilerino
45e56e4c96 d3d12: Only check for GetDeviceRemovedReason in debug builds
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:23:01 -07:00
Silvio Vilerino
4e1bb2111f d3d12: d3d12_promote_to_permanent_residency to accept res array batch
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:56 -07:00
Silvio Vilerino
07224f6d15 d3d12: Make output metadata frame buffer READBACK and use direct Map() in get_feedback
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:48 -07:00
Silvio Vilerino
e4d8a49fcd d3d12: Only check H264 video caps if configuration changed between frames
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:40 -07:00
Silvio Vilerino
8fd82cb339 d3d12: d3d12_video_encoder_get_slice_bitstream_data use regular Map/Unmap
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:34 -07:00
Silvio Vilerino
1dc76fcaa8 d3d12: Use readback heaps for staging bitstream allocations
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:30 -07:00
Silvio Vilerino
9b131f1407 d3d12: Video Encode - Make some parameters const & instead of by value
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:24 -07:00
Silvio Vilerino
1ffefc3e32 d3d12: Use cached heap allocations for output bitstreams instead of allocating per frame
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:18 -07:00
Silvio Vilerino
adbb07e927 d3d12: Use cached heap allocations for barriers instead of allocating per frame
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:14 -07:00
Silvio Vilerino
b076cfdf22 d3d12: Remove unused d3d12_video_encoder::m_transitionsBeforeCloseCmdList
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:10 -07:00
Silvio Vilerino
6f9c49f6f5 d3d12: Only check HEVC video caps if configuration changed between frames
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:05 -07:00
Silvio Vilerino
e3ab866fea d3d12: Only call CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO when video format changes
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:01 -07:00
Silvio Vilerino
ca2a1e470a d3d12: Remove per frame allocation slice_sizes(picture->num_slice_descriptors)
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:54 -07:00
Silvio Vilerino
53e07e78c7 d3d12: Cache ID3D12VideoEncodeCommandList4 instance if supported
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:50 -07:00
Silvio Vilerino
b1ea2b06eb d3d12: Cache ID3D12VideoEncoderHeap1 instance if supported
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:46 -07:00
Silvio Vilerino
a51c3b5bd0 d3d12: Cache ID3D12VideoDevice4 instance if supported
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:41 -07:00
Silvio Vilerino
702e299f33 d3d12: Remove multiple index calc in d3d12_video_encoder_prepare_input_buffers
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:36 -07:00
Silvio Vilerino
2ffaa9a9f4 d3d12: Remove multiple index calc in d3d12_video_encoder_begin_frame
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:31 -07:00
Silvio Vilerino
712607bbec d3d12: Optimize d3d12_video_encoder_flush
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:26 -07:00
Silvio Vilerino
63db1254ff d3d12: Use a separate queue for encode resolve operations
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:21 -07:00
Silvio Vilerino
416398aecb mediafoundation: Only attach stats to last slice mfsample
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:17 -07:00
Silvio Vilerino
80c8994455 mediafoundation: Add pLastSliceFence shortcircuit wait for auto slice mode async slices mode
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:12 -07:00
Silvio Vilerino
fd546c1cde mediafoundation: Refactor frame, multi slice and combine slice IMFSample emission to make it simpler
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:07 -07:00
Silvio Vilerino
f4f619e26e d3d12: Implement last slice signal by splitting Encode/Resolve in two ECL
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:01 -07:00
Silvio Vilerino
134274488d mediafoundation: Attach stats deferred buffers to all samples for simplicity
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:55 -07:00
Silvio Vilerino
b4592bbb77 mediafoundation: Add some more trace logging
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:49 -07:00
Silvio Vilerino
43112ce1a4 mediafoundation: Emit multiple MFSamples per slice when CODECAPI_AVEncSliceGenerationMode = 1i
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:43 -07:00
Silvio Vilerino
3de675eef5 mediafoundation: Prepare for multi sample multi slice
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:38 -07:00
Silvio Vilerino
e612709141 mediafoundation: Add support for setting CODECAPI_AVEncSliceGenerationMode
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:21 -07:00
Silvio Vilerino
a6f84de5b0 mediafoundation: emit subregions samples before pAsyncFence wait to reduce latency
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:13 -07:00
Silvio Vilerino
4bc6ace7a1 mediafoundation: Attach async stats DXGI buffers without CPU fence wait
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:08 -07:00
Silvio Vilerino
d7384e9f65 mediafoundation: Set ConfigureBitstreamOutputSampleAttributes earlier for async subregion notifications do not need resolved metadata for it
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:03 -07:00
Silvio Vilerino
791a966510 mediafoundation: Add Resolve completion fence to stats IDXGIBuffers
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:19:55 -07:00
Silvio Vilerino
88492ee80b mediafoundation: Helpers ConfigureBitstreamOutputSampleAttributes/ConfigureStatsMetadataOutputSampleAttributes
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:19:26 -07:00
Pohsiang (John) Hsu
932401ddf0 mediafoundation: add stats resource pool so we can use pool for QP map as well
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:19:14 -07:00
Valentine Burley
daa3ed7fea ci/deqp: Also print logs to logcat on Android
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add a patch for dEQP: for non-APK builds running on Android, duplicate
dEQP output to both stdout and Android's logcat, making test output
visible in logcat.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37933>
2025-10-21 12:23:40 +00:00
Samuel Pitoiset
7cd12e5c6a amd: move CP emit helpers to ac_cmdbuf_cp.c/h
Seems more organized this way.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
e0ffc41d9a amd,radv: move SDMA utility helpers to common code
Only simple ones for now. Other functions need more rework.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
4989b6e6b9 amd,radv,radeonsi: add ac_emit_cp_write_data_{head}()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
1c3754a271 radv: use ac_emit_cp_copy_data() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
ed7f9df864 amd: add a predicate parameter to ac_emit_cp_copy_data()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
29c2d02d64 amd,radv,radeonsi: add ac_emit_cp_load_context_reg_index()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
c7c237dd27 amd,radv,radeonsi: add ac_emit_cp_nop()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:13 +02:00
Samuel Pitoiset
5801986f53 amd: add missing _cp_ to some emit helpers
Just for consistency with other helpers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:30:34 +02:00
Samuel Pitoiset
a0117b5e74 amd,radv: add ac_emit_cp_atomic_mem()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:30:34 +02:00
Samuel Pitoiset
93f3b36b55 radv: use ac_emit_cp_copy_data() more for perfcounters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:30:34 +02:00
Georg Lehmann
dae502a780 treewide: use nir_load_global_constant alias of nir_build_load_global_constant
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:39:53 +02:00
Georg Lehmann
cf4ab485ea nir: remove manual nir_load_global_constant
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:39:53 +02:00
Georg Lehmann
654bd74c60 treewide: use nir_store_global alias of nir_build_store_global
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:37:58 +02:00
Georg Lehmann
2306cba65b nir: remove manual nir_store_global
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:37:58 +02:00
Georg Lehmann
9e41a7c139 treewide: use nir_load_global alias of nir_build_load_global
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:37:58 +02:00
Georg Lehmann
77540cac8c nir: remove manual nir_load_global
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:37:58 +02:00
Samuel Pitoiset
9ebda88e34 radv: remove an obsolete comment about SMEM stores
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ACO doesn't use SMEM store instructions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871>
2025-10-21 07:03:11 +00:00
Samuel Pitoiset
63099554ac radv: simplify L2 cache flushes on < GFX12
To be closer to RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871>
2025-10-21 07:03:11 +00:00
Samuel Pitoiset
52e036fa9f radv: remove useless parameter to gfx10_cs_emit_cache_flush()
gfx9_eop_bug_va is always 0 on GFX10+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871>
2025-10-21 07:03:10 +00:00
Samuel Pitoiset
c8de5a7479 radv: pass int_sel to radv_cs_emit_write_event_eop()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871>
2025-10-21 07:03:09 +00:00
Samuel Pitoiset
eb65d17e00 radv: simplify error handling when creating descriptor pools
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
11daa11c4e radv: use vk_zalloc2() for allocating the descriptor pool
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
6106d9e818 radv: simplify allocating pool entries for descriptor sets
A complete new strategy allocation will be implemented on top of this.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
d4cb7d160d radv: add a small helper to destroy descriptor pool entries
No need to duplicate code.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
d29959f50d radv: remove an useless check when destroying descriptor sets
There is already an assertion.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:28 +00:00
Lionel Landwerlin
2b6c75423e anv: reenable VK_KHR_maintenance8 on pre-Xe2 platforms
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/37929>
2025-10-21 06:13:10 +00:00
Lionel Landwerlin
c5d313a2a8 brw: handling dynamic programmable offsets pre-Xe2
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/37929>
2025-10-21 06:13:10 +00:00
Lionel Landwerlin
d37c6ff4ed brw: mark divergence data as valid for debug purposes
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/37929>
2025-10-21 06:13:10 +00:00
Lionel Landwerlin
255d1e883d nir/divergence: fix handling of intel uniform block load
Those are normally uniform always, but for the purpose of fused
threads handling, we need to check their sources.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ca1533cd03 ("nir/divergence: add a new mode to cover fused threads on Intel HW")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37929>
2025-10-21 06:13:10 +00:00
Lionel Landwerlin
e2918ad82c brw: fix missing generation requirement on sampler opcode
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: bcffd839aa ("brw: new Xe2 sampler opcodes")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37929>
2025-10-21 06:13:10 +00:00
Lionel Landwerlin
757c042e39 brw: fix ballot() type operations in shaders with HALT instructions
Fixes dEQP-VK.reconvergence.terminate_invocation.bit_count

LNL fossildb stats:

 Totals from 16489 (3.36% of 490184) affected shaders:
 Instrs: 3710499 -> 3710500 (+0.00%)
 Cycle count: 91601018 -> 90305642 (-1.41%); split: -1.81%, +0.40%
 Max dispatch width: 523936 -> 523952 (+0.00%); split: +0.02%, -0.01%

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37939>
2025-10-21 05:55:04 +00:00
Lionel Landwerlin
70aa028f27 brw: only consider cross lane access on non scalar VGRFs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1bff4f93ca ("brw: Basic infrastructure to store convergent values as scalars")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37939>
2025-10-21 05:55:04 +00:00
Lionel Landwerlin
f48c9c3a37 brw: constant fold u2u16 conversion on MCS messages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: bddfbe7fb1 ("brw/blorp: lower MCS fetching in NIR")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37963>
2025-10-21 08:27:07 +03:00
Lionel Landwerlin
f8745b3af3 brw: add missing offset to MCS fetching messages
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/37963>
2025-10-21 08:27:05 +03:00
Eric Engestrom
1773e2df50 ci: uprev vkd3d
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
0845d1b69c...03cca4cd97

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37960>
2025-10-21 03:57:14 +00:00
Aitor Camacho
d6ddc5b219 kk: Fix Linux build valgrind dependency
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/37965>
2025-10-21 02:28:09 +00:00
Aitor Camacho
873d2f252e ci: Add KosmicKrisp Linux build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37965>
2025-10-21 02:28:09 +00:00
Aitor Camacho
bea2164d70 CODEOWNERS: Add KosmicKrisp owners
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37965>
2025-10-21 02:28:09 +00:00
Aitor Camacho
94d4df1c84 mr-label-maker: Add KosmicKrisp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37965>
2025-10-21 02:28:09 +00:00
Mel Henning
77cd629b34 nvk: Really fix maxVariableDescriptorCount w/ iub
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I didn't test "nvk: Fix maxVariableDescriptorCount with iub" as
thoroughly as I should have and it regressed
dEQP-VK.api.maintenance3_check.descriptor_set because we were then
violating the requirement that maxPerSetDescriptors describes a limit
that's guaranteed to be supported (and reported as supported in
GetDescriptorSetLayoutSupport).

That commit was also based on a misreading of nvk_nir_lower_descriptors.c
where I thought that the end offset of an inline uniform block needed to
be less than the size of a UBO. That is not the case - on closer
inspection that code gracefully falls back to placing IUBs in globablmem
if necessary. So, we can afford to be less strict about our IUB sizing
and only require that IUBs follow the existing limit imposed by
maxInlineUniformBlockSize.

Fixes: ff7f785f09 ("nvk: Fix maxVariableDescriptorCount with iub")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37922>
2025-10-20 22:19:05 +00:00
Emma Anholt
0781edc30f nir/copy_prop_vars: Mask out no-op writes to variables.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The pass previously supported removing complete no-op writes, but we can
do better by noticing if any channel being written is the current
channel's value and masking off those writes.  I noticed this happening in
Stray's fragment shader, where it looked like some translation layer had
turned var[x].zw = vec2(a, b) into var[x] = vec4(var[x].x, var[x].y, a,
b).  This in turn lets nir_shrink_vec_array_vars be more effective.

Totals:
MaxWaves: 22158876 -> 22156696 (-0.01%); split: +0.00%, -0.01%
Instrs: 401167243 -> 401007996 (-0.04%); split: -0.04%, +0.00%
CodeSize: 1004397302 -> 1004133728 (-0.03%); split: -0.03%, +0.00%
STPs: 369810 -> 234618 (-36.56%)
LDPs: 209430 -> 172011 (-17.87%)

Totals from 1884 (0.12% of 1560230) affected shaders:
MaxWaves: 12686 -> 10506 (-17.18%); split: +6.97%, -24.15%
Instrs: 2099486 -> 1940239 (-7.59%); split: -7.64%, +0.06%
CodeSize: 4570472 -> 4306898 (-5.77%); split: -5.81%, +0.05%
NOPs: 334399 -> 270881 (-18.99%); split: -20.58%, +1.58%
MOVs: 131003 -> 148034 (+13.00%); split: -11.59%, +24.59%
COVs: 14512 -> 16921 (+16.60%); split: -0.23%, +16.83%
Full: 58120 -> 72399 (+24.57%); split: -6.75%, +31.31%
(ss): 79215 -> 45331 (-42.77%); split: -48.46%, +5.68%
(sy): 33081 -> 11119 (-66.39%); split: -66.56%, +0.18%
(ss)-stall: 302152 -> 115528 (-61.76%); split: -64.34%, +2.57%
(sy)-stall: 2706110 -> 498998 (-81.56%); split: -81.68%, +0.12%
STPs: 212045 -> 76853 (-63.76%)
LDPs: 47337 -> 9918 (-79.05%)
Preamble Instrs: 413954 -> 413630 (-0.08%); split: -0.21%, +0.13%

Cat0: 370362 -> 306844 (-17.15%); split: -18.58%, +1.43%
Cat1: 145629 -> 165003 (+13.30%); split: -10.51%, +23.81%
Cat2: 687947 -> 683992 (-0.57%); split: -0.61%, +0.04%
Cat3: 362919 -> 360690 (-0.61%); split: -0.72%, +0.11%
Cat6: 461411 -> 352375 (-23.63%)
Cat7: 16857 -> 16974 (+0.69%); split: -0.35%, +1.04%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37313>
2025-10-20 19:24:45 +00:00
Emma Anholt
537cc4e0ff nir/shrink_stores: Don't shrink stores to an invalid num_components.
Avoids a regression in the CL CTS on the next commit.

Fixes: 2dba7e6056 ("nir: split nir_opt_shrink_stores from nir_opt_shrink_vectors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37313>
2025-10-20 19:24:45 +00:00
Emma Anholt
aea949dd29 tu: Make sure we clear dead writes to vars before nir_link_opt_varyings().
It assumes you don't have dead writes to variables in the last block, and
will copy-propagate consts from the first write it finds.

Without this, the upcoming nir_opt_copy_prop_vars() change to have more
restricted write masks caused less nir_opt_dead_write_vars() (since it
doesn't trim write masks for dead writes, only removes fully-dead writes),
and then zero-initialization of variables at the top of a shader got
propagated, rather than the final store of the used channels of the
variable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37313>
2025-10-20 19:24:45 +00:00
Emma Anholt
d8690f9c60 nir/link_opt_varyings: Make it participate in NIR_DEBUG=print.
It's a pass with major effects on shaders, and it's otherwise weird to see
your varying disappear between two passes that shouldn't affect them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37313>
2025-10-20 19:24:45 +00:00
Emma Anholt
c76b52ae00 virgl: Fix VIRGL_DEBUG=tgsi to work on debugoptimized builds.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37313>
2025-10-20 19:24:44 +00:00
Romaric Jodin
762be5eae1 pan/va: make valhall_parse_isa input explicit
Usage of implicit input file in valhall_parse_isa makes it very
complicated for tools like ninja-to-soong to generate the Android
equivalent build file.

Instead use an explicit argument.
It also deduplicate the location of the input file name to have it
only in 'meson.build'.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37742>
2025-10-20 18:17:02 +00:00
Aitor Camacho
7c268a1e91 kk: Add KosmicKrisp
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/37522>
2025-10-20 17:46:38 +00:00
Connor Abbott
f6c7f16322 tu: Implement VK_EXT_multisampled_render_to_single_sampled
The extension is emulated on top of traditional transient attachments,
with the driver creating extra internal attachments for each subpass
where the MSRTSS sample count doesn't match the color or depth/stencil
attachment's sample count and insert unresolves/resolves around them,
except for the cases where the original attachment is unused
before/after the subpass respectively. An important case is if the
original attachment would be cleared at the beginning of the subpass, in
which case we rewrite the clear to apply to the driver-internal
multisample attachment. This requires redirecting the clear colors in
CmdBeginRenderPass2.

We create images, image views, and backing memory for these attachments
that are part of the framebuffer with classic renderpasses or allocated
per-render-pass with dynamic rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:44 +00:00
Connor Abbott
9c5012b03c tu: Add support for "unresolve" ops
These ops replicate the single-sampled source attachment to the
multi-sampled destination attachment before the start of a subpass. This
is the new hardware feature for
VK_EXT_multisample_render_to_single_sampled, and the actual
implementation of the extension emulates everything on top of these.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:44 +00:00
Connor Abbott
7542d5068c tu: Make r*d_src_depth and r*d_src_stencil generic
We will have to use both in one function, so make them compatible and
add them to the ops function table.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:44 +00:00
Connor Abbott
efde8bf599 tu: Remove tu_attachment_info
This is an old leftover from the skeleton stage of the driver, and we
have never needed anything other than the image view. Having this in
the way made it impossible to write generic code that reads the
attachments in the !image_framebuffer and dynamic rendering cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:43 +00:00
Connor Abbott
8a12a0ec24 tu: Add CCU_RESOLVE_CLEAN workaround
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:42 +00:00
Connor Abbott
5cf0e741e2 tu: Make blit setup take source and destination samples
This will be necessary so that the 3d path can handle "unresolves",
where we select the single-sampled shader for the single-sampled source
but enable multisampling *without* per-sample shading to replicate it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:42 +00:00
Connor Abbott
a3652af380 tu: Also disable stencil load for attachments not in GMEM
We were accidentally still emitting loads for D32S8 resolve attachments.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:41 +00:00
Connor Abbott
9417ce287c tu: Fix 3d load path with D24S8 on a7xx
We need to always use the FMT6_Z24S8_AS_R8G8B8A8 format for GMEM even if
UBWC is disabled, as already done for the 2d store path. Because we
use the pre-baked RB_MRT_BUF_INFO register value, this means we have to
override it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:40 +00:00
Connor Abbott
bc14dd98e3 tu: Clear RB_MRT_BUF_INFO::LOSSLESSCOMPEN for stencil
This was already present in the 2d paths but not in the 3d path,
probably because the flag was moved there only on a7xx and it was
missed. Prevents page faults from bad flag buffer accesses.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:40 +00:00
Connor Abbott
2231c51474 tu: Don't resolve twice in between subpasses
tu6_emit_gmem_stores() already handles resolves.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:39 +00:00
Connor Abbott
d491a79027 tu: Don't patch GMEM for input attachments never in GMEM
This can happen if we resolve to a resolve attachment and then use that
resolve attachment as an input attachment in a later subpass. We don't
need to put it in GMEM, but it's still considered "written" because
input attachment reads need a dependency after the resolve.

MSRTSS input attachment tests effectively created such a scenario after
lowering to transient multisample attachments and inserting resolves.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:39 +00:00
Connor Abbott
7a8b7fc480 tu: Remove useless tu_image_view_init parameter
We can find it from the device.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:38 +00:00
Connor Abbott
928e19320c tu: Fix corner case with clearing input attachment
If the first use of an attachment is as an input attachment, but it has
LOAD_OP_CLEAR, then we have to clear the attachment in GMEM and patch
the input attachment to refer to GMEM. Noticed by inspection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
2025-10-20 17:18:37 +00:00
Aitor Camacho
f711c3afed nir: Add KosmicKrisp required utilities
Reviewed-by: Alyssa Anne Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37520>
2025-10-20 16:22:00 +00:00
Yiwei Zhang
cc1d942727 panvk: use cs_move_reg32 and lower to cs_add32 if needed
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Trivial but still better than cs_add32 workaround on platforms
supporting MOVE_REG32.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37951>
2025-10-20 16:02:59 +00:00
Yiwei Zhang
81692b8168 panvk: minor cleanup in cmd_prepare_push_uniforms
This change:
1. Use a different loop var for outer multidraw repeat
2. Make sure fau total_count matches the filled faus per loop

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37951>
2025-10-20 16:02:59 +00:00
Yiwei Zhang
387f75f43d panvk: fix to advance vs res_table properly
Fix a regression from an unfortunate typo.

Fixes: 48e8d6d207 ("panfrost, panvk: The size of resource tables needs to be a multiple of 4.")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37951>
2025-10-20 16:02:59 +00:00
Yiwei Zhang
800c4d3430 panvk: fix to advance vs driver_set properly
Should only set once outside the multidraw loop so that per draw can
patch its own own desc attribs when needed.

Fixes: a5a0dd3ccc ("panvk: Implement multiDrawIndirect for v10+")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37951>
2025-10-20 16:02:58 +00:00
Gurchetan Singh
cd06ec1dcb gfxstream: codegen: remove CheckOutOfMemory
Nobody uses it.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37855>
2025-10-20 15:45:07 +00:00
Gurchetan Singh
af6ff36379 gfxstream: codegen: add vkTraceAsyncGOOGLE to GLOBAL_COMMANDS_WITHOUT_DISPATCH
Otherwise the codegen output fails to compile.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37855>
2025-10-20 15:45:07 +00:00
Jason Macnak
14e01b1eea gfxstream: Handle BGRA in Gfxstream AHB format conversions
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37855>
2025-10-20 15:45:06 +00:00
Gurchetan Singh
37a2a5c552 gfxstream: kumquat: opaque fd or dmabuf, not both
So Mesa drivers actually don't like both:

src/vulkan/runtime/vk_device_memory.c:

"""
 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: {
   const VkImportMemoryFdInfoKHR *fd_info = (void *)ext;
     if (fd_info->handleType) {
       assert(fd_info->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT ||
              fd_info->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT);
"""

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37855>
2025-10-20 15:45:06 +00:00
Gurchetan Singh
b8f0933b25 virtio: kumquat: slice length fix
Causes issues with some versions of host gfxstream.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37855>
2025-10-20 15:45:06 +00:00
Christoph Pillmayer
f367cdad0a pan: Fix bi_load_tl dst arg name
bi_load_tl's dst arg was named src, this was confusing.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37955>
2025-10-20 15:14:06 +00:00
Christoph Pillmayer
eba3d3a17e pan: Enable rematerialization for more ops
IADD_IMM and uniform loads should not be spilled. Make them
rematerializable. Restrict to loads that write at most one register
for simplicity for now.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37955>
2025-10-20 15:14:06 +00:00
Timur Kristóf
d20049b430 ac/nir/ngg_mesh: Lower num_subgroups to constant
Mesh shader workgroups always have the same amount of subgroups.

When the API workgroup size is the same as the real workgroup
size, this is a small optimization (using a constant instead of
a shader arg).

When the API workgroup size is smaller than the real workgroup
size (eg. when the number of output vertices or primitves is
greater than the API workgroup size on RDNA 2), this fixes a
potential bug because num_subgroups would return the "real"
workgroup size instead of the API one.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37947>
2025-10-20 14:05:40 +00:00
Silvio Vilerino
a5af8866df p_video_codec::encode_bitstream_sliced: Add last_slice_completion_fence for PIPE_VIDEO_SLICE_MODE_AUTO
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37936>
2025-10-20 13:37:16 +00:00
Patrick Lerda
84dc9af3d4 r600: update nplanes support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This change fixes "piglit/bin/ext_image_dma_buf_import-export -auto".

Fixes: 02aaf360ae ("r600: Implement resource_get_param")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37840>
2025-10-20 11:42:35 +00:00
Patrick Lerda
3b1e3a40a8 r600: fix r600_draw_rectangle refcnt imbalance
The object buf is referenced at the beginning of the
r600_draw_rectangle() function and should be freed
at the end. This issue was introduced with cbb6e0277f.

Fixes: cbb6e0277f ("r600: stop using util_set_vertex_buffers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37617>
2025-10-20 11:28:39 +00:00
David Rosca
ffec70465c radeonsi/video: Remove rvid_buffer
Not used anymore.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
2025-10-20 11:00:07 +00:00
David Rosca
9764748f91 radeonsi/vpe: Stop using rvid_buffer
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
2025-10-20 11:00:07 +00:00
David Rosca
0c270c602d radeonsi/vce,uvd_enc: Stop using rvid_buffer
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
2025-10-20 11:00:07 +00:00
David Rosca
a0324576aa radeonsi/vcn: Stop using rvid_buffer
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
2025-10-20 11:00:07 +00:00
David Rosca
a25db1c53c radeonsi/video: Change si_vid_resize_buffer to take si_resource
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
2025-10-20 11:00:07 +00:00
David Rosca
663eada9b2 radeonsi/uvd_enc: Don't use temporary feedback buffer when not needed
We don't request feedback for create and destroy commands, so it's
not needed to allocate feedback buffer.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
2025-10-20 11:00:06 +00:00
David Rosca
1033ac0879 radeonsi/vcn: Don't use temporary feedback buffer when not needed
We don't request feedback for create and destroy commands, so it's
not needed to allocate feedback buffer.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
2025-10-20 11:00:06 +00:00
David Rosca
86832f7499 radeonsi/vpe: Stop clearing embedded buffer on allocation
If it was needed, it would be needed to clear it before every submission
as well.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
2025-10-20 11:00:05 +00:00
Martin Roukala (né Peres)
33232223f6 zink/ci: update the expectations of RADV-based pre-merge jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:51 +00:00
Martin Roukala (né Peres)
da0f495428 radv/ci: update the expectations of pre-merge jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:51 +00:00
Samuel Pitoiset
8e2bb3da5c radv/ci: set RADV_DEBUG=novideo for NAVI31 too
There are random VCN hangs with a repro rate around 20%.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:50 +00:00
Samuel Pitoiset
9b774963fe radv/ci: set RADV_DEBUG=novideo for NAVI21
Otherwise, the jobs just hang.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:50 +00:00
Samuel Pitoiset
82cd2df7b0 radv/ci: bump number of deqp-runner jobs to 32 for GFX1201
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:50 +00:00
Samuel Pitoiset
6fd1b9b397 radv/ci: drop RADV_PERFTEST=video_decode,video_encode for NAVI31
With up-to-date video firmwares, these flags are no longer needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:50 +00:00
Samuel Pitoiset
49d780db93 radv/ci: use the custom 6.17.3 kernel for POLARIS10
Looks like the SDMA regression is no longer reproducible.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:49 +00:00
Samuel Pitoiset
07d1461c53 radv/ci: use the custom 6.17.3 kernel for NAVI21/NAVI31
Now that the zerovram performance regression is fixed, everything
should be fine.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:49 +00:00
Samuel Pitoiset
fc178c047d radv/ci: uprev kernel to 6.17.3 + drm/buddy backported fixes for zerovram
Until we have a stable kernel which contains these fixes.

This applies to all jobs except NAVI21/NAVI31 which still use 6.6 and
POLARIS10 which is stucked to 6.15.9 for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37934>
2025-10-20 10:30:48 +00:00
Collabora's Gfx CI Team
958cdea31d Uprev Piglit to 2ac68e5fb59215ecf89049ec15f3f7494b51a589
4147e9d7ae...2ac68e5fb5

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37950>
2025-10-20 09:57:30 +00:00
Ludvig Lindau
ba293ebbc8 panfrost/panvk: Reduce fills from LCRA
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Currently when LCRA spills it also fills on every single usage of the
spilled value. This leads to a lot of cases where a spill is immediately
followed by a fill.

This patch reduces fills by LCRA by simply not filling until reaching
either the index that caused LCRA to fail allocating registers, or the
end of a block.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37299>
2025-10-20 09:07:31 +00:00
Ludvig Lindau
a26e46980e panfrost/panvk: Merge stores in vector spills
Make vector spills use a single store of appropriate data size instead
of using a store for every vector component.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37299>
2025-10-20 09:07:31 +00:00
Jose Maria Casanova Crespo
a131530dd1 v3d: mark FRAG_RESULT_COLOR as output_written on SAND blits FS
With the introduction of "v3d: Add support for 16bit normalised
formats" https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35820
nir_lower_fragcolor is always called if shaders outputs_written shows
that FRAG_RESULT_COLOR is used.

But on SAND8/30 blit fragment shaders although the FRAG_RESULT_COLOR
is used, it was not marked as output_written so the lowering was not
applied.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14141
Fixes: ee48e81b26 ("v3d: Always lower frag color")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37949>
2025-10-20 09:42:19 +02:00
Emma Anholt
aa96444149 wsi: Fix the flagging of dma_buf_sync_file for the amdgpu workaround.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In my regression fix, I covered one of the two paths that had stopped
setting the implicit_sync flag and thus triggered the amdgpu behavior we
don't want, but probably the less common one.

Fixes: f7cbc7b1c5 ("radv: Allocate BOs as implicit sync even if the WSI is doing implicit sync.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13942
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37874>
2025-10-20 03:58:47 +00:00
Marek Olšák
e2b271d7b1 radeonsi/ci: update hawaii failures
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37910>
2025-10-19 17:01:44 +00:00
Marek Olšák
f5b648f6d3 winsys/radeon: fix completely broken tessellation for gfx6-7
The info was moved to radeon_info, but it was only set for the amdgpu
kernel driver. It was uninitialized for radeon.

Fixes: d82eda72a1 - ac/gpu_info: move HS info into radeon_info

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37910>
2025-10-19 17:01:43 +00:00
Benjamin Cheng
b1370e1935 radv/video: Fill maxCodedExtent caps first
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
Later code (i.e. max qp map extent filling) depends on this.

Fixes: ae6ea69c85 ("radv: Implement VK_KHR_video_encode_quantization_map")
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37940>
2025-10-17 17:58:08 +00:00
Job Noorman
ad421cdf2e nir: mark fneg distribution through fadd/ffma as nsz
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
df1876f615 ("nir: Mark negative re-distribution on fadd as imprecise")
fixed the fadd case by marking it as imprecise. This commit fixes the
ffma case for the same reason.

However, "imprecise" isn't necessary and nowadays we have "nsz" which is
more accurate here. Use that for both fadd and ffma.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 62795475e8 ("nir/algebraic: Distribute source modifiers into instructions")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37930>
2025-10-17 08:58:59 +00:00
Frank Binns
b9baf2c260 pvr: Advertise VK_KHR_storage_buffer_storage_class
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37913>
2025-10-17 08:11:11 +00:00
Frank Binns
c6c0690723 pvr: Advertise VK_KHR_relaxed_block_layout
This is already supported by the compiler and all the relevant conformance
tests pass.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37913>
2025-10-17 08:11:11 +00:00
Frank Binns
28cc04b400 pvr: sort extensions alphabetically
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37913>
2025-10-17 08:11:10 +00:00
Eric Engestrom
412432d371 mr-label-maker: fix label for mesa release MRs
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/37928>
2025-10-17 09:43:10 +02:00
Josh Simmons
b10c1a1952 radv: Fix crash in sqtt due to uninitalized value
Fixes: 772b9ce411 ("radv: Remove qf from radv_spm/sqtt/perfcounter where applicable")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37900>
2025-10-17 06:10:46 +00:00
Qiang Yu
11f2babddc mesa,gallium: not touch TS when internal draws
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
TS does not affect vertex pipeline draws. We keep mesh shader
before radeonsi is ready.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:19 +00:00
Qiang Yu
4711fb711c gallium/blitter: no need to save TS state
TS does not affect blitter currently.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:19 +00:00
Qiang Yu
71e0895715 mesa,radeonsi: add comments about vertex and mesh pipeline shader states
They are exclusive in mesa state tracker currently, so add some comments
and assertions for developers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:19 +00:00
Qiang Yu
dcf2399e6f radeonsi: save mesh shader when blit
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:19 +00:00
Qiang Yu
ffc3d430db radeonsi: simplify si_update_rasterized_prim while handle mesh shader
Otherwise mesh shader ends in the "else" section.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:19 +00:00
Qiang Yu
56a437183a radeonsi: si_get_vs support mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:19 +00:00
Qiang Yu
7e83962e85 radeonsi: update scratch va for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:19 +00:00
Qiang Yu
de4fb088d3 radeonsi: share some vertex pipe function with mesh pipe
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:18 +00:00
Qiang Yu
e6e21dfbf2 radeonsi: kill outputs for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:18 +00:00
Qiang Yu
4c315bdbfa radeonsi: lower task/mesh shader io to mem
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:18 +00:00
Qiang Yu
5931dbf7ac radeonsi: add task info to screen
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:18 +00:00
Qiang Yu
73aebeec42 radeonsi: no ngg culling for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:17 +00:00
Qiang Yu
74894150f1 radeonsi: init pm4 state for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:17 +00:00
Qiang Yu
ce6a1e7563 radeonsi: init mesh shader args
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:16 +00:00
Qiang Yu
2038134efc radeonsi: calc workgroup size for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:15 +00:00
Qiang Yu
977a3f45bf radeonsi: add task/mesh shader info to si_shader_info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:15 +00:00
Qiang Yu
8659666089 radeonsi: add si_mesh_resources_add_all_to_bo_list
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:14 +00:00
Qiang Yu
b533d39b95 radeonsi: inline uniform support mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:14 +00:00
Qiang Yu
8a3ef188c2 radeonsi: add context shader state for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:13 +00:00
Qiang Yu
24d7c9a2a8 radeonsi: handle mesh shader when si_create_shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:12 +00:00
Qiang Yu
f06a1b0d07 radeonsi: enlarge SI_NUM_SHADERS for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
2025-10-17 03:52:12 +00:00
Mike Blumenkrantz
f74cf45078 zink: consistently set/unset msrtss in begin_rendering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this has to always be set or unset, never persistent from previous renderpass

Fixes: 5080f2b6f5 ("zink: disable msrtss handling when blitting")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37923>
2025-10-16 22:22:34 -04:00
Marek Olšák
733ba77bfe r300: fix DXTC blits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 9d359c6d10 - gallium: delete pipe_surface::width and pipe_surface::height
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37912>
2025-10-16 22:33:50 +00:00
Gert Wollny
ba35ac29b6 r600/sfn: drop range pinning for registers after RA
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: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37847>
2025-10-16 20:57:18 +00:00
Gert Wollny
5962add398 r600/sfn: correct register interference range
If a life range of one register starts in the same instruction where the
life range of another register ends, then
the two ranges don't overlap.

v2: Fix test

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37847>
2025-10-16 20:57:18 +00:00
Dylan Baker
a1b6dbcd67 docs: update calendar for 25.3.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37921>
2025-10-16 20:52:31 +00:00
José Roberto de Souza
ad86a666ae anv: Add support for low latency hint on Xe KMD
This hint tells KMD and firmware to turn into low latency but high
power usage mode.
i915 already had it now it was implemented in Xe KMD.

Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33214>
2025-10-16 20:23:21 +00:00
José Roberto de Souza
0ba6a0a23b intel/dev: Add supports_low_latency_hint to intel_device_info
Lets query if this feature is supported only once, also in the next
patches support for this feature will be added to Xe KMD.

Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33214>
2025-10-16 20:23:21 +00:00
Xaver Hugl
892cf427a0 vulkan/wsi: require extended target volume support for scRGB
It's hardly going to be useful without that

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Fixes: 4b663d56 ("vulkan/wsi: implement support for VK_EXT_hdr_metadata on Wayland")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37920>
2025-10-16 19:58:02 +00:00
Mary Guillemard
e3d9c5da2a mr-label-maker: Remove mapi label
It doesn't exist anymore.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
f65756a31b mr-label-maker: Add poly
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
b2accf86d1 poly: Migrate AGX's GS/TESS emulation to common code
This moves most of the code to a new home: src/poly.
Most precomp kernels logic that could be moved are provided by poly now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
8048004238 asahi/gs: Reuse GS shader compiler options
Avoid importing internal bits

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
6f73533094 asahi,nir: Stop relying on zero and scratch page in GS/TESS code
Introduce new NIR intrinsics to handle getting a "sink" read-only
address and another intrinsic to handle conversion of address to
read-write (allowing implementation to replace the "sink" read-only with
another address like required for Asahi)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
60e5abdbaa asahi: Move compiler preprocess out of agx_nir_lower_gs
We run agx_preprocess_nir as the last step of each new compute shaders
in agx_nir_lower_gs but we could move this out of the pass and makes it
the driver responsability to call it.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
a427581c4d asahi/gs: Remove agx_nir_* prefix around static functions
Only a small detail but git will not go too crazy when I move
everything around at least.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
71c4943c37 compiler: rename vs.tes_agx bit to vs.tes_poly
Preparing to move AGX's GS/TESS lowering code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
1e0c18d6cf nir: Rename stat_query_address_agx to stat_query_address_poly
This is used by the geometry lowering that we are going to move to
common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
8a25b88d69 asahi/libagx: Do not expose anything not use externaly
No need to actually generate NIR bindings for anything we don't need
to.

We are going to copy most of this in Panfrost and that will be required
there...

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Mary Guillemard
29f348941d asahi/libagx: Stop exposing fake entrypoint _libagx_prefix_sum
This was a hack to allow things to build but still could break in the
future, let comply by passing scratch as an argument instead.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Lionel Landwerlin
c20e2733bf Revert "brw: add serialize send stats"
This reverts commit b8ae4ede60 now that
we have a cycle estimation accounting.

Reviewed-by: Alyssa Anne Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37816>
2025-10-16 18:55:06 +00:00
Lionel Landwerlin
14683a045b brw: account for disabled SEND fused message in cycle computation
This is an alternative Curro proposed to counting the number of
serialized messages.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Anne Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37816>
2025-10-16 18:55:06 +00:00
Job Noorman
3b2f7ed918 ci,marge_queue: read token from file by default
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This allows token to be stored in ~/.config/gitlab-token instead of
passing them as an argument.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37916>
2025-10-16 17:40:51 +00:00
Lionel Landwerlin
77fb8fb062 anv: fix image-to-image copies of TileW images
The intermediate buffer between the 2 images is linear, its stride
should be a function of the tile's logical width.

Normally this should map to the values reported by ISL except for
TileW where for some reason it was decided to report 128 for TileW
instead of the actual 64 size (see isl_tiling_get_info() ISL_TILING_W
case)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37902>
2025-10-16 17:07:32 +00:00
Job Noorman
75604ff945 ir3: allow (neg) on sel.b on a6xx gen4+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Setting the (neg) flag on a sel.b source behaves as fneg on a6xx gen4+.

Totals from 22733 (13.80% of 164705) affected shaders:
MaxWaves: 277060 -> 277292 (+0.08%); split: +0.11%, -0.03%
Instrs: 17676148 -> 17634471 (-0.24%); split: -0.47%, +0.24%
CodeSize: 34824114 -> 34693740 (-0.37%); split: -0.44%, +0.06%
NOPs: 3466984 -> 3487984 (+0.61%); split: -1.17%, +1.78%
MOVs: 521091 -> 522791 (+0.33%); split: -1.87%, +2.20%
Full: 315929 -> 315699 (-0.07%); split: -0.09%, +0.02%
(ss): 473545 -> 472947 (-0.13%); split: -1.36%, +1.23%
(sy): 195612 -> 195743 (+0.07%); split: -1.00%, +1.07%
(ss)-stall: 1928887 -> 1922757 (-0.32%); split: -1.96%, +1.64%
(sy)-stall: 4965071 -> 4972119 (+0.14%); split: -1.43%, +1.57%
STPs: 777 -> 762 (-1.93%)
LDPs: 2168 -> 2117 (-2.35%)
Preamble Instrs: 3465691 -> 3462635 (-0.09%); split: -0.09%, +0.00%
Last helper: 4666320 -> 4593331 (-1.56%); split: -2.81%, +1.24%
Last baryf: 235724 -> 230049 (-2.41%); split: -4.56%, +2.15%
Subgroup size: 2021248 -> 2021952 (+0.03%); split: +0.07%, -0.03%
Cat0: 3792738 -> 3814197 (+0.57%); split: -1.08%, +1.64%
Cat1: 757480 -> 759260 (+0.23%); split: -1.28%, +1.52%
Cat2: 6960677 -> 6897218 (-0.91%)
Cat6: 78290 -> 78224 (-0.08%)
Cat7: 422101 -> 420710 (-0.33%); split: -1.41%, +1.09%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37906>
2025-10-16 16:46:18 +00:00
Job Noorman
eaef6d048b ir3: add has_sel_b_fneg compiler flag
a6xx+ support (neg) on sel.b which behaves as fneg. Add a compiler flag
for this.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37906>
2025-10-16 16:46:18 +00:00
Job Noorman
c44f8fe7f7 ir3: move ir3_catN_absneg to ir3.c
The following commit needs to use ir3_compiler whose definition isn't
available in ir3.h.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37906>
2025-10-16 16:46:18 +00:00
David Rosca
09ff0fa005 frontends/va: Move remainig processing functions to postproc.c
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37545>
2025-10-16 16:33:15 +00:00
David Rosca
7a5270d4df frontends/va: Move decode functions to separate file
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37545>
2025-10-16 16:33:15 +00:00
David Rosca
ba0a059129 frontends/va: Move encode functions to separate file
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37545>
2025-10-16 16:33:15 +00:00
Utku Iseri
d9d0001b7d panvk: fix for clearing render targets with 8+ layers
It's valid for the tiler desc to be 0 when the tiler isn't being
used. Currently, we set the descriptor based on an offset over the
pointer in the gfx state, and if this is 0, we end up setting it to
just the offset when there are more than 8 layers on a target.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37837>
2025-10-16 16:13:33 +00:00
Gert Wollny
a2e4280dbe r600/sfn: drop unused code
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37846>
2025-10-16 15:36:55 +00:00
Gert Wollny
0f7dd6636c r600/sfn: rework 64 bit to vec2 32 bit lowering
The old lowering was quite messy and didn't work well if
64 bit registers were involved.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37846>
2025-10-16 15:36:55 +00:00
Iván Briano
8c281aabcd hasvk: don't report custom sample locations for sample count 1
We can't actually enable MSAA for images with sample count 1, and
without MSAA active, the sample location machinery does not get used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37899>
2025-10-16 14:48:06 +00:00
Utku Iseri
52c6f404ed panvk: advertise support for AFBC WSI behind a debug flag
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Adds opt-in support for AFBC WSI swapchain image creation by
adding the supported modifiers to the lists expected by mesa WSI.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:39 +00:00
Utku Iseri
db2f02dcc2 panvk: allow TILING_DRM_MODIFIER_EXT with AFBC
External images given to us by WSI use this tiling mode instead
of optimal, and we want to allow this.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:39 +00:00
Utku Iseri
e21c2a8316 pan/mod: allow non-tiled modifiers to be optimal
This seems too restrictive with our current set of supported
modifiers, as we frequently end up skipping through the entire list
of AFBC modifiers.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:39 +00:00
Utku Iseri
11fe21d659 panvk: change AFBC subresource layout pitches to byte sizes
External importers of AFBC dmabufs expect these to be in terms
of bytesizes instead of direct superblock counts. This makes these
calculations aligned with panfrost and fixes WSI imports.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:39 +00:00
Utku Iseri
d6eb5b4039 panvk: explicit fallback to linear for legacy scanout images
If there isn't any modifier info coming from the compositor, we go
through our internal image path and pick the best modifier that
supports the image. This causes problems on X11, as it actually
expects the image to be in a linear layout.

Explicitly set the modifier to linear for legacy scanout images,
which specifically indicates that the image doesn't have an
explicit DRM modifier and we should do the safe thing by using
linear.

The naming becomes confusing for scanout with this change,
so the flag is now split into two separate flags, one for controlling
the AFBC optimalness called wsi, the other more directly called
legacy_scanout, which is used for enforcing the linear mod.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:38 +00:00
Utku Iseri
0551a40c36 panvk: only add storage usage without AFBC
Instead of always adding storage usage on pre_mod_adjustments
and preventing AFBC for all images with usage TRANSFER_DST,
only do this when the image doesn't use AFBC, by adding a
new post_mod_adjustments pass.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:38 +00:00
Utku Iseri
8c332b1cad panvk: prevent aliased images from using AFBC
Since we don't have multiplanar AFBC support, this causes issues
when we try to alias an image with a single plane to a plane of
a multiplanar image.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:37 +00:00
Utku Iseri
39ac7df612 panfrost,panvk: distinguish fbd bounding box from framebuffer size
On panvk, we can use the render area to set fbd bbox extents
instead of setting them based on image sizes. Doing this improves
partial updates (eg. loadOp:load with renderArea < image_size) of
AFBC render targets.

This commit introduces a new structure for this setting and uses
it on both panvk and panfrost. We can't reuse the existing extent
here as that is based on viewport+scissor, which can change within
a renderpass/batch, which causes issues on panfrost.

No functional changes for panfrost, as it doesn't have an equivalent
to renderpass::renderArea so we can't do the same thing there, it
still uses the entire framebuffer extent.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:37 +00:00
Utku Iseri
bde9156dcf panfrost,panvk: rename pan_fb_info::extent to draw_extent
This represents what this bounding box is being used for better,
as it can be easily confused with the framebuffer bounding box
otherwise.

Also fixes the comment about inclusiveness, as these are being
used as exclusive on both panfrost and panvk.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37771>
2025-10-16 13:28:37 +00:00
Lionel Landwerlin
b722e17203 brw: get rid of GET_BUFFER_SIZE opcode
Rely on RESINFO which is what was used already.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37171>
2025-10-16 12:08:16 +00:00
Lionel Landwerlin
b101d100fb anv: reenable KHR_maintenance8 on Xe2+
Only Xe2+ supports dynamic texture offsets.

Unfortunate that the docs didn't specify this...

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/37171>
2025-10-16 12:08:16 +00:00
Lionel Landwerlin
bcffd839aa brw: new Xe2 sampler opcodes
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/37171>
2025-10-16 12:08:16 +00:00
Lionel Landwerlin
efcba73b49 brw: switch to new sampler payload description scheme
Instead of having abstracted opcodes, we target directly the HW format
at the NIR translation.

The payload description gives us the order of the payload sources (we
can use that for pretty printing) and we don't have to have a
complicated scheme in the logical send lowering for the ordering. All
we have to do is build the header if needed as well as the descriptors.

PTL Fossil-db stats:
 Totals from 66759 (13.54% of 492917) affected shaders:
 Instrs: 44289221 -> 43957404 (-0.75%); split: -0.81%, +0.06%
 Send messages: 2050378 -> 2042607 (-0.38%)
 Cycle count: 3878874713 -> 3712848434 (-4.28%); split: -4.44%, +0.16%
 Max live registers: 8773179 -> 8770104 (-0.04%); split: -0.06%, +0.03%
 Max dispatch width: 1677408 -> 1707952 (+1.82%); split: +1.85%, -0.03%
 Non SSA regs after NIR: 11407821 -> 11421041 (+0.12%); split: -0.03%, +0.15%
 GRF registers: 5686983 -> 5838785 (+2.67%); split: -0.24%, +2.91%

LNL Fossil-db stats:

 Totals from 57911 (15.72% of 368381) affected shaders:
 Instrs: 39448036 -> 38923650 (-1.33%); split: -1.41%, +0.08%
 Subgroup size: 1241360 -> 1241392 (+0.00%)
 Send messages: 1846696 -> 1845137 (-0.08%)
 Cycle count: 3834818910 -> 3784003027 (-1.33%); split: -2.33%, +1.00%
 Spill count: 21866 -> 22168 (+1.38%); split: -0.07%, +1.45%
 Fill count: 59324 -> 60339 (+1.71%); split: -0.00%, +1.71%
 Scratch Memory Size: 1479680 -> 1483776 (+0.28%)
 Max live registers: 7521376 -> 7447841 (-0.98%); split: -1.04%, +0.06%
 Non SSA regs after NIR: 9744605 -> 10113728 (+3.79%); split: -0.01%, +3.80%

Only 2 titles negatively impacted (spilling) :
  - Shadow of the Tomb Raider
  - Red Dead Redemption 2

All impacted shaders were already spilling.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37171>
2025-10-16 12:08:15 +00:00
Lionel Landwerlin
232697a0a3 brw: port some NIR lowering to the sampler payload description
We start by assigning a backend opcode to all tex instructions, use
that to figure out if we have packed sources and apply the lowering
accordingly.

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/37171>
2025-10-16 12:08:15 +00:00
Lionel Landwerlin
7c77c4768a brw: add a new sampler payload parameter description
Centralize all the information in one place and also make the mapping
decision from nir_tex_instr -> HW opcode much earlier.

This will help knowning exactly what the payload looks like early in
the backend IR and when it needs to lowered to a smaller SIMD size due
to HW limits. It will also allow NIR lowering to know when to combine
parameters into a single packed component.

Finally, this also reduces the amount of LOAD_PAYLOAD we need to carry
in the backend IR, because we don't have to generate VEC()
LOAD_PAYLOAD() for coordinates etc... Those are useless if there is
any other parameter in the payload and we need need to add one more
LOAD_PAYLOAD() when doing the logical send lowering.

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/37171>
2025-10-16 12:08:14 +00:00
Valentine Burley
28e73a6239 docs: Update LAVA caching setup
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
After a recent change, `piglit-traces.sh` automatically sets the caching
proxy, so update the docs to reflect this.

Also update the name of the variable from `FDO_HTTP_CACHE_URI` to
`LAVA_HTTP_CACHE_URI`.

Fixes: fa74e939bf ("ci/piglit: automatically use LAVA proxy")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37862>
2025-10-16 10:45:32 +00:00
Lionel Landwerlin
2baa3b8c06 Revert "wsi: Implements scaling controls for DRI3 presentation."
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit a219308867.

It's failing most of the tests on Anv :

$ ./deqp-vk -n dEQP-VK.wsi.xlib.maintenance1.scaling.*

Test run totals:
  Passed:        88/2422 (3.6%)
  Failed:        576/2422 (23.8%)
  Not supported: 1758/2422 (72.6%)
  Warnings:      0/2422 (0.0%)
  Waived:        0/2422 (0.0%)

The only passing tests seem to be with this pattern :

 dEQP-VK.wsi.xlib.maintenance1.scaling.*.same_size_and_aspect

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37904>
2025-10-16 09:41:00 +00:00
Samuel Pitoiset
abcaa46f6c amd,radv,radeonsi: add ac_cmdbuf_flush_vgt_streamout()
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:41 +00:00
Samuel Pitoiset
679332f9a9 amd,radv,radeonsi: add ac_emit_cp_acquire_mem()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:40 +00:00
Samuel Pitoiset
9ad7fb8569 amd,radv,radeonsi: add ac_emit_cp_gfx_scratch()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:40 +00:00
Samuel Pitoiset
9ff8e71b4e amd,radv,radeonsi: add ac_emit_cp_tess_rings()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:39 +00:00
Samuel Pitoiset
47a64f5b6f amd,radv,radeonsi: add ac_emit_cp_gfx11_ge_rings()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:38 +00:00
Samuel Pitoiset
8f80a8502d radv: use ac_emit_cp_pfp_sync_me() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:37 +00:00
Samuel Pitoiset
044bafb6ac amd: add a predicate parameter to ac_emit_cp_pfp_sync_me()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:36 +00:00
Samuel Pitoiset
48b4a43e8f amd,radv,radeonsi: add ac_emit_cp_set_predication()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:36 +00:00
Samuel Pitoiset
ad907efae2 radv: use ac_emit_cond_exec() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:35 +00:00
Samuel Pitoiset
426d48d41e radeonsi: use ac_emit_write_data_imm() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870>
2025-10-16 06:31:34 +00:00
Dylan Baker
2341395f37 docs: reset new_features.txt
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: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37901>
2025-10-16 03:31:58 +00:00
Dylan Baker
e766ffccc6 Version: Bump to 26.0
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37901>
2025-10-16 03:31:58 +00:00
2734 changed files with 155295 additions and 78155 deletions

View file

@ -8,7 +8,7 @@ charset = utf-8
insert_final_newline = true insert_final_newline = true
tab_width = 8 tab_width = 8
[*.{c,h,cpp,hpp,cc,hh,y,yy,cl}] [*.{c,h,cpp,hpp,cc,hh,y,yy,cl,glsl}]
indent_style = space indent_style = space
indent_size = 3 indent_size = 3
max_line_length = 78 max_line_length = 78

View file

@ -77,3 +77,6 @@ c7bf3b69ebc8f2252dbf724a4de638e6bb2ac402
# freedreno/a6xx: The great register renaming # freedreno/a6xx: The great register renaming
7fd99c88b9cd5c0c8c1cb3e92383acac5cb8220b 7fd99c88b9cd5c0c8c1cb3e92383acac5cb8220b
# radv: re-format using clang-format
1492de1bc3610539b93d8ad17892e7139cd4b05d

View file

@ -41,7 +41,7 @@ workflow:
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64 FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
CI_TRON_JOB_PRIORITY_TAG: "" # Empty tags are ignored by gitlab CI_TRON_JOB_PRIORITY: high
JOB_PRIORITY: 75 JOB_PRIORITY: 75
# fast-fail in merge pipelines: stop early if we get this many unexpected fails/crashes # fast-fail in merge pipelines: stop early if we get this many unexpected fails/crashes
DEQP_RUNNER_MAX_FAILS: 40 DEQP_RUNNER_MAX_FAILS: 40
@ -61,6 +61,7 @@ workflow:
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:low FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:low
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:low-kvm FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:low-kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:low-aarch64 FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:low-aarch64
CI_TRON_JOB_PRIORITY: low
JOB_PRIORITY: 45 JOB_PRIORITY: 45
# (some) nightly builds perform LTO, so they take much longer than the # (some) nightly builds perform LTO, so they take much longer than the
# short timeout allowed in other pipelines. # short timeout allowed in other pipelines.
@ -123,7 +124,7 @@ variables:
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: "" # Empty tags are ignored by gitlab FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: "" # Empty tags are ignored by gitlab
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: kvm FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: aarch64 FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: aarch64
CI_TRON_JOB_PRIORITY_TAG: ci-tron:priority:low CI_TRON_JOB_PRIORITY: default
JOB_PRIORITY: 50 JOB_PRIORITY: 50
DATA_STORAGE_PATH: data_storage DATA_STORAGE_PATH: data_storage
KERNEL_IMAGE_BASE: "https://$S3_HOST/$S3_KERNEL_BUCKET/$KERNEL_REPO/$KERNEL_TAG" KERNEL_IMAGE_BASE: "https://$S3_HOST/$S3_KERNEL_BUCKET/$KERNEL_REPO/$KERNEL_TAG"
@ -422,4 +423,3 @@ sanity:
when: on_failure when: on_failure
reports: reports:
junit: check-*.xml junit: check-*.xml

View file

@ -6,6 +6,3 @@ dEQP-VK.api.external.memory.android_hardware_buffer.*
# only APKs support window creation on Android. # only APKs support window creation on Android.
dEQP-VK.image.swapchain_mutable.* dEQP-VK.image.swapchain_mutable.*
dEQP-VK.wsi.* dEQP-VK.wsi.*
# These tests cause hangs and need to be skipped for now.
dEQP-VK.synchronization*

View file

@ -5,12 +5,3 @@ dEQP-GLES3.functional.transform_feedback.random.*
dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.*_array_element dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.*_array_element
dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.*.array.* dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.type.*.array.*
KHR-GLES31.core.program_interface_query.transform-feedback-types KHR-GLES31.core.program_interface_query.transform-feedback-types
# CTS bug - https://gerrit.khronos.org/c/vk-gl-cts/+/17901
# https://issues.angleproject.org/issues/436377594#comment6
dEQP-GLES31.functional.debug.negative_coverage.log.advanced_blend.attachment_advanced_equation
dEQP-GLES31.functional.debug.negative_coverage.log.advanced_blend.blend_qualifier_mismatch
dEQP-GLES31.functional.debug.negative_coverage.log.compute.invalid_program_query
dEQP-GLES31.functional.debug.negative_coverage.log.shader.link_program
dEQP-GLES31.functional.debug.negative_coverage.log.shader.use_program
dEQP-GLES31.functional.debug.negative_coverage.log.tessellation.single_tessellation_stage

View file

@ -31,7 +31,6 @@
optional: true optional: true
- job: debian-arm32 - job: debian-arm32
artifacts: false artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system # ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
.baremetal-test-arm64-gl: .baremetal-test-arm64-gl:
@ -46,7 +45,6 @@
optional: true optional: true
- job: debian-arm64 - job: debian-arm64
artifacts: false artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system # ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
.baremetal-test-arm64-vk: .baremetal-test-arm64-vk:
@ -61,7 +59,6 @@
optional: true optional: true
- job: debian-arm64 - job: debian-arm64
artifacts: false artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM32/64 testing of bare-metal boards attached to an x86 gitlab-runner system, using an asan mesa build # ARM32/64 testing of bare-metal boards attached to an x86 gitlab-runner system, using an asan mesa build
.baremetal-arm32-asan-test-gl: .baremetal-arm32-asan-test-gl:
@ -73,7 +70,6 @@
optional: true optional: true
- job: debian-arm32-asan - job: debian-arm32-asan
artifacts: false artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-asan-test-gl: .baremetal-arm64-asan-test-gl:
variables: variables:
@ -84,7 +80,6 @@
optional: true optional: true
- job: debian-arm64-asan - job: debian-arm64-asan
artifacts: false artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-asan-test-vk: .baremetal-arm64-asan-test-vk:
variables: variables:
@ -95,7 +90,6 @@
optional: true optional: true
- job: debian-arm64-asan - job: debian-arm64-asan
artifacts: false artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-ubsan-test-gl: .baremetal-arm64-ubsan-test-gl:
extends: extends:
@ -108,7 +102,6 @@
optional: true optional: true
- job: debian-arm64-ubsan - job: debian-arm64-ubsan
artifacts: false artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-ubsan-test-vk: .baremetal-arm64-ubsan-test-vk:
extends: extends:
@ -121,7 +114,6 @@
optional: true optional: true
- job: debian-arm64-ubsan - job: debian-arm64-ubsan
artifacts: false artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-deqp-test: .baremetal-deqp-test:
variables: variables:

View file

@ -13,7 +13,7 @@ make-git-archive:
# Compactify the .git directory # Compactify the .git directory
- git gc --aggressive - git gc --aggressive
# Download & cache the perfetto subproject as well. # Download & cache the perfetto subproject as well.
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto - rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail --location https://github.com/google/perfetto/archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - --strip-components=1 -C subprojects/perfetto
# compress the current folder # compress the current folder
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz . - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
@ -44,6 +44,7 @@ debian-x86_64:
-D spirv-to-dxil=true -D spirv-to-dxil=true
-D tools=drm-shim -D tools=drm-shim
-D valgrind=disabled -D valgrind=disabled
-D perfetto=true
S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE} S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
RUN_MESON_TESTS: "false" # debian-build-x86_64 already runs these RUN_MESON_TESTS: "false" # debian-build-x86_64 already runs these
artifacts: artifacts:
@ -57,7 +58,7 @@ debian-x86_64-asan:
- .build-run-long - .build-run-long
variables: variables:
VULKAN_DRIVERS: "swrast,amd,intel" VULKAN_DRIVERS: "swrast,amd,intel"
GALLIUM_DRIVERS: "llvmpipe,softpipe,zink" GALLIUM_DRIVERS: "llvmpipe,softpipe,zink,r300"
C_ARGS: > C_ARGS: >
-Wno-error=stringop-truncation -Wno-error=stringop-truncation
-Wno-error=deprecated-declarations -Wno-error=deprecated-declarations
@ -361,6 +362,7 @@ debian-android:
-D android-libbacktrace=disabled -D android-libbacktrace=disabled
-D mesa-clc=system -D mesa-clc=system
-D precomp-compiler=system -D precomp-compiler=system
-D perfetto=true
GALLIUM_ST: > GALLIUM_ST: >
-D gallium-va=disabled -D gallium-va=disabled
-D gallium-rusticl=false -D gallium-rusticl=false
@ -390,7 +392,7 @@ debian-android:
- git clean -dxf . - git clean -dxf .
# aarch64 build: # aarch64 build:
- export CROSS=aarch64-linux-android - export CROSS=aarch64-linux-android
- export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d - export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d,zink
- export VULKAN_DRIVERS=freedreno,broadcom,panfrost,virtio - export VULKAN_DRIVERS=freedreno,broadcom,panfrost,virtio
- export S3_ARTIFACT_NAME=mesa-arm64-android-${BUILDTYPE} - export S3_ARTIFACT_NAME=mesa-arm64-android-${BUILDTYPE}
- !reference [.meson-build-for-tests, script] - !reference [.meson-build-for-tests, script]
@ -493,6 +495,7 @@ debian-arm64:
-D imagination-srv=true -D imagination-srv=true
-D freedreno-kmds=msm,virtio -D freedreno-kmds=msm,virtio
-D teflon=true -D teflon=true
-D perfetto=true
GALLIUM_ST: GALLIUM_ST:
-D gallium-rusticl=true -D gallium-rusticl=true
RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
@ -504,8 +507,8 @@ debian-arm64-asan:
- .meson-build-for-tests - .meson-build-for-tests
- .build-run-long - .build-run-long
variables: variables:
VULKAN_DRIVERS: "broadcom,freedreno" VULKAN_DRIVERS: "broadcom,freedreno,panfrost"
GALLIUM_DRIVERS: "freedreno,vc4,v3d" GALLIUM_DRIVERS: "freedreno,vc4,v3d,panfrost"
C_ARGS: > C_ARGS: >
-Wno-error=deprecated-declarations -Wno-error=deprecated-declarations
DRI_LOADERS: DRI_LOADERS:
@ -710,9 +713,10 @@ debian-vulkan:
-D c_args=-fno-sanitize-recover=all -D c_args=-fno-sanitize-recover=all
-D cpp_args=-fno-sanitize-recover=all -D cpp_args=-fno-sanitize-recover=all
UBSAN_OPTIONS: "print_stacktrace=1" UBSAN_OPTIONS: "print_stacktrace=1"
VULKAN_DRIVERS: amd,asahi,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination,microsoft-experimental,nouveau VULKAN_DRIVERS: amd,asahi,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination,microsoft-experimental,nouveau,kosmickrisp
EXTRA_OPTION: > EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay -D vulkan-layers=device-select,overlay
-D tools=drm-shim
-D build-radv-tests=true -D build-radv-tests=true
-D build-aco-tests=true -D build-aco-tests=true
-D intel-rt=disabled -D intel-rt=disabled
@ -751,6 +755,22 @@ debian-x86_32:
-D mesa-clc=enabled -D mesa-clc=enabled
-D install-mesa-clc=true -D install-mesa-clc=true
# In case of issues with this job, contact @frankbinns
debian-riscv64:
extends:
- .meson-cross
- .use-debian/riscv64_build
- .meson-build-only
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
variables:
BUILDTYPE: debug
CROSS: riscv64
GALLIUM_DRIVERS: "llvmpipe,zink"
VULKAN_DRIVERS: "swrast"
# See https://gitlab.freedesktop.org/mesa/mesa/-/issues/14123
MESON_TEST_ARGS: "--no-suite mesa:llvmpipe"
# While s390 is dead, s390x is very much alive, and one of the last major # While s390 is dead, s390x is very much alive, and one of the last major
# big-endian platforms, so it provides useful coverage. # big-endian platforms, so it provides useful coverage.
# In case of issues with this job, contact @ajax # In case of issues with this job, contact @ajax

View file

@ -36,10 +36,9 @@
# Keep the job script in the artifacts # Keep the job script in the artifacts
CI_TRON_JOB_SCRIPT_PATH: results/job_script.sh CI_TRON_JOB_SCRIPT_PATH: results/job_script.sh
needs:
- !reference [.required-for-hardware-jobs, needs]
tags: tags:
- farm:$RUNNER_FARM_LOCATION - farm:$RUNNER_FARM_LOCATION
- ci-tron:priority:$CI_TRON_JOB_PRIORITY
- $CI_TRON_DUT_SETUP_TAGS - $CI_TRON_DUT_SETUP_TAGS
# Override the default before_script, as it is not compatible with the CI-tron environment. We just keep the clearing # Override the default before_script, as it is not compatible with the CI-tron environment. We just keep the clearing
@ -96,7 +95,6 @@
optional: true optional: true
- job: debian-x86_64 - job: debian-x86_64
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-x86_64-test-vk-manual: .ci-tron-x86_64-test-vk-manual:
extends: extends:
@ -110,7 +108,6 @@
optional: true optional: true
- job: debian-build-x86_64 - job: debian-build-x86_64
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-x86_64-test-gl: .ci-tron-x86_64-test-gl:
extends: extends:
@ -122,7 +119,6 @@
optional: true optional: true
- job: debian-x86_64 - job: debian-x86_64
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-x86_64-test-gl-manual: .ci-tron-x86_64-test-gl-manual:
extends: extends:
@ -136,7 +132,20 @@
optional: true optional: true
- job: debian-build-x86_64 - job: debian-build-x86_64
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-x86_64-test-gl-asan-manual:
extends:
- .use-debian/x86_64_test-gl
- .ci-tron-x86_64-test
variables:
S3_ARTIFACT_NAME: "mesa-x86_64-asan-debugoptimized"
DEQP_FORCE_ASAN: 1
needs:
- job: debian/x86_64_test-gl
artifacts: false
optional: true
- job: debian-x86_64-asan
artifacts: false
.ci-tron-arm64-test: .ci-tron-arm64-test:
extends: extends:
@ -156,7 +165,6 @@
optional: true optional: true
- job: debian-arm64 - job: debian-arm64
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-asan-vk: .ci-tron-arm64-test-asan-vk:
extends: extends:
@ -171,7 +179,6 @@
optional: true optional: true
- job: debian-arm64-asan - job: debian-arm64-asan
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-ubsan-vk: .ci-tron-arm64-test-ubsan-vk:
extends: extends:
@ -185,7 +192,6 @@
optional: true optional: true
- job: debian-arm64-ubsan - job: debian-arm64-ubsan
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-gl: .ci-tron-arm64-test-gl:
extends: extends:
@ -197,7 +203,6 @@
optional: true optional: true
- job: debian-arm64 - job: debian-arm64
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-asan-gl: .ci-tron-arm64-test-asan-gl:
extends: extends:
@ -212,7 +217,6 @@
optional: true optional: true
- job: debian-arm64-asan - job: debian-arm64-asan
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-ubsan-gl: .ci-tron-arm64-test-ubsan-gl:
extends: extends:
@ -226,7 +230,6 @@
optional: true optional: true
- job: debian-arm64-ubsan - job: debian-arm64-ubsan
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm32-test: .ci-tron-arm32-test:
extends: extends:
@ -246,7 +249,6 @@
optional: true optional: true
- job: debian-arm32 - job: debian-arm32
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm32-test-gl: .ci-tron-arm32-test-gl:
extends: extends:
@ -258,7 +260,6 @@
optional: true optional: true
- job: debian-arm32 - job: debian-arm32
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm32-test-asan-gl: .ci-tron-arm32-test-asan-gl:
extends: extends:
@ -273,4 +274,3 @@
optional: true optional: true
- job: debian-arm32-asan - job: debian-arm32-asan
artifacts: false artifacts: false
- !reference [.ci-tron-test, needs]

View file

@ -1,7 +1,7 @@
variables: variables:
CONDITIONAL_BUILD_ANDROID_CTS_TAG: b018634d732f438027ec58c0383615e7 CONDITIONAL_BUILD_ANDROID_CTS_TAG: b018634d732f438027ec58c0383615e7
CONDITIONAL_BUILD_ANGLE_TAG: ccde6a2b0d3509c2a8fc459cbd936ac4 CONDITIONAL_BUILD_ANGLE_TAG: 6ade8a52dd596b3de5dee62006bf4fc3
CONDITIONAL_BUILD_CROSVM_TAG: 4079babd375b09761d59eacb25a0598a CONDITIONAL_BUILD_CROSVM_TAG: 4c61f9707203afca91db3efeb57175db
CONDITIONAL_BUILD_FLUSTER_TAG: e13f8521875ebd70e207ec0f6f3d3e5b CONDITIONAL_BUILD_FLUSTER_TAG: e13f8521875ebd70e207ec0f6f3d3e5b
CONDITIONAL_BUILD_PIGLIT_TAG: e31960eaf7d80a9e8cdd7869fbcef7f7 CONDITIONAL_BUILD_PIGLIT_TAG: 8eafc8b1214f64f0d9a298e7a57bc87a
CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 167feb963fb512795aeddc9d1588bc7c CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 072beee85d89e75f9a81664b77198b92

View file

@ -13,7 +13,7 @@ section_start angle "Building ANGLE"
# setting up the environment variables locally # setting up the environment variables locally
ci_tag_build_time_check "ANGLE_TAG" ci_tag_build_time_check "ANGLE_TAG"
ANGLE_REV="8ed16003f27125f27cbb87578368e447043420d3" ANGLE_REV="2ed4b049c064add3109c7b1e0c954a0bce856df8"
DEPOT_REV="5982a1aeb33dc36382ed8c62eddf52a6135e7dd3" DEPOT_REV="5982a1aeb33dc36382ed8c62eddf52a6135e7dd3"
# Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined # Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined

View file

@ -16,13 +16,13 @@ section_start crosvm "Building crosvm"
git config --global user.email "mesa@example.com" git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI" git config --global user.name "Mesa CI"
CROSVM_VERSION=4a6b4316155742fbfa1be7087c2ee578cfee884d CROSVM_VERSION=f58c8e685f3f21d733861a080a0857acafd0da56
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
pushd /platform/crosvm pushd /platform/crosvm
git checkout "$CROSVM_VERSION" git checkout "$CROSVM_VERSION"
git submodule update --init git submodule update --init
VIRGLRENDERER_VERSION=06d43ce974b664f9dc521b706a0ad7f91dbf2866 VIRGLRENDERER_VERSION=95610d57da49d76617bd6d8d21b9bfb1bf360f64
rm -rf third_party/virglrenderer rm -rf third_party/virglrenderer
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
pushd third_party/virglrenderer pushd third_party/virglrenderer

View file

@ -23,10 +23,10 @@ set -x
# - the GL release produces `glcts`, and # - the GL release produces `glcts`, and
# - the GLES release produces `deqp-gles*` and `deqp-egl` # - the GLES release produces `deqp-gles*` and `deqp-egl`
DEQP_MAIN_COMMIT=db48c34bebaf3359453e44ab151a2ff9f9c58eb2 DEQP_MAIN_COMMIT=211e452358f5cafd14bdd76d78342b62741e94aa
DEQP_VK_VERSION=1.4.3.3 DEQP_VK_VERSION=1.4.4.2
DEQP_GL_VERSION=4.6.6.0 DEQP_GL_VERSION=4.6.7.0
DEQP_GLES_VERSION=3.2.12.0 DEQP_GLES_VERSION=3.2.13.0
# Patches to VulkanCTS may come from commits in their repo (listed in # Patches to VulkanCTS may come from commits in their repo (listed in
# cts_commits_to_backport) or patch files stored in our repo (in the patch # cts_commits_to_backport) or patch files stored in our repo (in the patch
@ -46,6 +46,8 @@ main_cts_patch_files=(
# shellcheck disable=SC2034 # shellcheck disable=SC2034
vk_cts_commits_to_backport=( vk_cts_commits_to_backport=(
# Add an option to print to logcat in Android executable builds
fc51668efdfd0dffa30b3eddee34aa26172969fb
) )
# shellcheck disable=SC2034 # shellcheck disable=SC2034
@ -54,29 +56,25 @@ vk_cts_patch_files=(
# shellcheck disable=SC2034 # shellcheck disable=SC2034
gl_cts_commits_to_backport=( gl_cts_commits_to_backport=(
# Add testing for GL_PRIMITIVES_SUBMITTED_ARB query.
e075ce73ddc5973aa46a5236c715bb281c9501fa
) )
# shellcheck disable=SC2034 # shellcheck disable=SC2034
gl_cts_patch_files=( gl_cts_patch_files=(
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
build-deqp-gl_Revert-Add-missing-context-deletion.patch
build-deqp-gl_Revert-Fix-issues-with-GLX-reset-notification-strate.patch
build-deqp-gl_Revert-Fix-spurious-failures-when-using-a-config-wit.patch
) )
# shellcheck disable=SC2034 # shellcheck disable=SC2034
# GLES builds also EGL # GLES builds also EGL
gles_cts_commits_to_backport=( gles_cts_commits_to_backport=(
# CMake: Include FindPkgConfig before using pkg_check_modules()
e09e0a210b041d0bf7b525620d0068eab3ffa66a
# Add an option to print to logcat in Android executable builds
fc51668efdfd0dffa30b3eddee34aa26172969fb
) )
# shellcheck disable=SC2034 # shellcheck disable=SC2034
gles_cts_patch_files=( gles_cts_patch_files=(
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
build-deqp-gl_Revert-Add-missing-context-deletion.patch
build-deqp-gl_Revert-Fix-issues-with-GLX-reset-notification-strate.patch
build-deqp-gl_Revert-Fix-spurious-failures-when-using-a-config-wit.patch
) )

View file

@ -0,0 +1,77 @@
#!/usr/bin/env bash
set -uex
section_start perfetto "Building perfetto"
BASE_PWD=$PWD
PERFETTO_REVISION=$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3)
patch_files=(
"build-perfetto-Fix-C-standard-library-build-errors-with-Debian-13.patch"
)
# Set PERFETTO_ARCH based on DEBIAN_ARCH
if [[ -z "${PERFETTO_ARCH:-}" ]]; then
case "$DEBIAN_ARCH" in
amd64) PERFETTO_ARCH=x64;;
arm64) PERFETTO_ARCH=arm64;;
esac
fi
git clone --branch "$PERFETTO_REVISION" --depth 1 https://github.com/google/perfetto /perfetto
pushd /perfetto
for patch in "${patch_files[@]}"; do
echo "Applying patch: $patch"
git am "$BASE_PWD/.gitlab-ci/container/patches/$patch"
done
# Base GN args
mkdir -p _build
cat >_build/args.gn <<EOF
is_debug=false
target_cpu="${PERFETTO_ARCH}"
target_os="${PERFETTO_TARGET}"
EOF
case "$PERFETTO_TARGET" in
linux)
# Override Perfettos default toolchain selection here, as the bundled
# arm64 toolchain is an x86-64 -> arm64 cross-compiler.
cat >>_build/args.gn <<EOF
is_system_compiler = true
is_hermetic_clang = false
ar = "ar"
cc = "clang-${LLVM_VERSION}"
cxx = "clang++-${LLVM_VERSION}"
extra_ldflags = "-fuse-ld=lld-${LLVM_VERSION} -lpthread -ldl"
EOF
./tools/install-build-deps
;;
android)
# No additional args needed when cross-building for Android
./tools/install-build-deps --android
;;
*)
echo "Unexpected PERFETTO_TARGET value: $PERFETTO_TARGET"
exit 1
;;
esac
./tools/gn gen _build/
./tools/ninja -C _build/ tracebox
mkdir -p build
cp _build/tracebox build/
"${STRIP_CMD:-strip}" build/tracebox || true
# Cleanup everything except build/
find . -mindepth 1 -maxdepth 1 ! -name build -exec rm -rf {} +
popd
section_end perfetto

View file

@ -13,7 +13,7 @@ section_start piglit "Building piglit"
# setting up the environment variables locally # setting up the environment variables locally
ci_tag_build_time_check "PIGLIT_TAG" ci_tag_build_time_check "PIGLIT_TAG"
REV="4147e9d7aeb8ba26ffc25a90fc237588bcb3bb11" REV="2842979ebe03b99c33c3e49af5960c69be6c6d46"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit pushd /piglit

View file

@ -12,11 +12,7 @@ section_start rust "Building Rust toolchain"
# DEBIAN_BUILD_BASE_TAG # DEBIAN_BUILD_BASE_TAG
# DEBIAN_TEST_BASE_TAG # DEBIAN_TEST_BASE_TAG
# This version number should match what we require in meson.build so we catch MINIMUM_SUPPORTED_RUST_VERSION=$(python3 -c 'import tomllib; print(tomllib.load(open("'"$CI_PROJECT_DIR"'/clippy.toml", "rb"))["msrv"])')
# build issues from patches relying on new features in newer Rust versions.
# Keep this is sync with the `rustc.version()` check in meson.build, and with
# the `rustup default` line in .gitlab-ci/meson/build.sh
MINIMUM_SUPPORTED_RUST_VERSION=1.82.0
# This version number can be bumped freely, to benefit from the latest # This version number can be bumped freely, to benefit from the latest
# diagnostics in CI `build-only` jobs, and for building external CI # diagnostics in CI `build-only` jobs, and for building external CI
@ -39,7 +35,7 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
if [ "$1" = "build" ] if [ "$1" = "build" ]
then then
rustup toolchain install --profile minimal --component clippy,rustfmt $MINIMUM_SUPPORTED_RUST_VERSION rustup toolchain install --profile minimal --component clippy,rustfmt "$MINIMUM_SUPPORTED_RUST_VERSION"
fi fi
find "$HOME"/.rustup/toolchains/*/lib -type f -name "*.so" -exec strip {} \; find "$HOME"/.rustup/toolchains/*/lib -type f -name "*.so" -exec strip {} \;

View file

@ -11,7 +11,7 @@ section_start vkd3d-proton "Building vkd3d-proton"
# setting up the environment variables locally # setting up the environment variables locally
ci_tag_build_time_check "VKD3D_PROTON_TAG" ci_tag_build_time_check "VKD3D_PROTON_TAG"
VKD3D_PROTON_COMMIT="0845d1b69c6b474debe39d25f0137bf108a42b92" VKD3D_PROTON_COMMIT="33a41f9d14460f998c5ce8a4aab42ca1cce8dcc6"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests" VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src" VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"

View file

@ -22,6 +22,8 @@ elif [[ "$arch" = "i386" ]]; then
rust_target=i686-unknown-linux-gnu rust_target=i686-unknown-linux-gnu
elif [[ "$arch" = "ppc64el" ]]; then elif [[ "$arch" = "ppc64el" ]]; then
rust_target=powerpc64le-unknown-linux-gnu rust_target=powerpc64le-unknown-linux-gnu
elif [[ "$arch" = "riscv64" ]]; then
rust_target=riscv64gc-unknown-linux-gnu
elif [[ "$arch" = "s390x" ]]; then elif [[ "$arch" = "s390x" ]]; then
rust_target=s390x-unknown-linux-gnu rust_target=s390x-unknown-linux-gnu
else else

View file

@ -121,6 +121,30 @@ debian/ppc64el_build:
- job: debian/ppc64el_build - job: debian/ppc64el_build
optional: true optional: true
# Debian based RISC-V 64 cross-build image
debian/riscv64_build:
extends:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-riscv64_build ${DEBIAN_BUILD_TAG}
LLVM_VERSION: &debian-riscv64-llvm 19
.use-debian/riscv64_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/riscv64_build"
MESA_IMAGE_TAG: *debian-riscv64_build
LLVM_VERSION: *debian-riscv64-llvm
needs:
- job: sanity
optional: true
- job: debian/riscv64_build
optional: true
# Debian based s390x cross-build image # Debian based s390x cross-build image
debian/s390x_build: debian/s390x_build:
extends: extends:

View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e
. .gitlab-ci/setup-test-env.sh
arch=riscv64
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
libssl-dev
)
apt-get -y install "${EPHEMERAL[@]}"
. .gitlab-ci/container/build-mold.sh
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/cross_build.sh

View file

@ -77,28 +77,6 @@ apt-get install -y --no-remove --no-install-recommends \
section_end debian_setup section_end debian_setup
############### Build piglit replayer
if [ "$DEBIAN_ARCH" != "armhf" ]; then
# We don't run any _piglit_ Vulkan tests in the containers.
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
-DPIGLIT_USE_GBM=OFF
-DPIGLIT_USE_WAYLAND=OFF
-DPIGLIT_USE_X11=OFF
-DPIGLIT_BUILD_GLX_TESTS=OFF
-DPIGLIT_BUILD_EGL_TESTS=OFF
-DPIGLIT_BUILD_WGL_TESTS=OFF
-DPIGLIT_BUILD_GL_TESTS=OFF
-DPIGLIT_BUILD_GLES1_TESTS=OFF
-DPIGLIT_BUILD_GLES2_TESTS=OFF
-DPIGLIT_BUILD_GLES3_TESTS=OFF
-DPIGLIT_BUILD_CL_TESTS=OFF
-DPIGLIT_BUILD_VK_TESTS=OFF
-DPIGLIT_BUILD_DMA_BUF_TESTS=OFF" \
PIGLIT_BUILD_TARGETS="piglit_replayer" \
. .gitlab-ci/container/build-piglit.sh
fi
############### Build dEQP VK ############### Build dEQP VK
DEQP_API=tools \ DEQP_API=tools \

View file

@ -101,12 +101,12 @@ EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DAND
DEQP_API=GLES \ DEQP_API=GLES \
DEQP_TARGET="android" \ DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \ EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh . .gitlab-ci/container/build-deqp.sh
DEQP_API=VK \ DEQP_API=VK \
DEQP_TARGET="android" \ DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \ EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh . .gitlab-ci/container/build-deqp.sh
rm -rf /VK-GL-CTS rm -rf /VK-GL-CTS

View file

@ -1,42 +0,0 @@
From 067676253ad11846f420087d30021629f3c43382 Mon Sep 17 00:00:00 2001
From: Valentine Burley <valentine.burley@collabora.com>
Date: Fri, 11 Apr 2025 16:51:08 +0200
Subject: Revert "Add missing context deletion"
This reverts commit 195ee2c99d3174e738506cc86828766805c0ede9.
---
.../modules/gles31/es31cComputeShaderTests.cpp | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/external/openglcts/modules/gles31/es31cComputeShaderTests.cpp b/external/openglcts/modules/gles31/es31cComputeShaderTests.cpp
index 4c7349e59..ece33929d 100644
--- a/external/openglcts/modules/gles31/es31cComputeShaderTests.cpp
+++ b/external/openglcts/modules/gles31/es31cComputeShaderTests.cpp
@@ -721,11 +721,6 @@ class LongRunningComputeFenceTest : public ComputeShaderBase
glDeleteProgram(m_program2);
glDeleteBuffers(2, &m_buffer);
- // Delete shared context and keep default context set
- delete m_sharedContext;
- m_sharedContext = NULL;
- m_context.getRenderContext().makeCurrent();
-
return NO_ERROR;
}
};
@@ -910,12 +905,6 @@ class LongRunningPersistentSSBOComputeTest : public ComputeShaderBase
{
glDeleteBuffers(2, &m_buffer);
m_dataLoadStore = NULL;
-
- // Delete shared context and keep default context set
- delete m_sharedContext;
- m_sharedContext = NULL;
- m_context.getRenderContext().makeCurrent();
-
return NO_ERROR;
}
};
--
2.45.2

View file

@ -1,81 +0,0 @@
From 6cd7a951f6a50d0f74c798035ac7ce201f2aa6f0 Mon Sep 17 00:00:00 2001
From: Valentine Burley <valentine.burley@collabora.com>
Date: Fri, 11 Apr 2025 16:51:03 +0200
Subject: Revert "Fix issues with GLX reset notification strategy"
This reverts commit 3e6b3fb43eb9682641d8c880429255569a4472c0.
---
.../platform/lnx/X11/tcuLnxX11GlxPlatform.cpp | 23 ++++---------------
1 file changed, 4 insertions(+), 19 deletions(-)
diff --git a/framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp b/framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp
index b21e6bcbd..e1d33823c 100644
--- a/framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp
+++ b/framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp
@@ -147,7 +147,6 @@ private:
GlxDisplay &m_display;
::Visual *m_visual;
const GLXFBConfig m_fbConfig;
- glu::ResetNotificationStrategy resetStrategy;
};
class GlxDrawable
@@ -220,7 +219,6 @@ public:
virtual const tcu::RenderTarget &getRenderTarget(void) const;
virtual glw::GenericFuncType getProcAddress(const char *name) const;
const GLXContext &getGLXContext(void) const;
- const GlxVisual &getGLXVisual(void) const;
private:
GlxDisplay m_glxDisplay;
@@ -412,31 +410,23 @@ GLXContext GlxVisual::createContext(const GlxContextFactory &factory, const Cont
}
}
- const GlxRenderContext *sharedGlxRenderContext = dynamic_cast<const GlxRenderContext *>(sharedContext);
-
- /* If there is a shared context, use same reset notification strategy. */
- glu::ResetNotificationStrategy usedResetNotificationStrategy =
- sharedGlxRenderContext ? sharedGlxRenderContext->getGLXVisual().resetStrategy : resetNotificationStrategy;
-
- if (usedResetNotificationStrategy != glu::RESET_NOTIFICATION_STRATEGY_NOT_SPECIFIED)
+ if (resetNotificationStrategy != glu::RESET_NOTIFICATION_STRATEGY_NOT_SPECIFIED)
{
checkGlxExtension(m_display, "GLX_ARB_create_context_robustness");
attribs.push_back(GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB);
- if (usedResetNotificationStrategy == glu::RESET_NOTIFICATION_STRATEGY_NO_RESET_NOTIFICATION)
+ if (resetNotificationStrategy == glu::RESET_NOTIFICATION_STRATEGY_NO_RESET_NOTIFICATION)
attribs.push_back(GLX_NO_RESET_NOTIFICATION_ARB);
- else if (usedResetNotificationStrategy == glu::RESET_NOTIFICATION_STRATEGY_LOSE_CONTEXT_ON_RESET)
+ else if (resetNotificationStrategy == glu::RESET_NOTIFICATION_STRATEGY_LOSE_CONTEXT_ON_RESET)
attribs.push_back(GLX_LOSE_CONTEXT_ON_RESET_ARB);
else
TCU_THROW(InternalError, "Unknown reset notification strategy");
}
- // Reset notification strategy used with this visual.
- resetStrategy = resetNotificationStrategy;
-
// Terminate attrib list
attribs.push_back(None);
+ const GlxRenderContext *sharedGlxRenderContext = dynamic_cast<const GlxRenderContext *>(sharedContext);
const GLXContext &sharedGLXContext = sharedGlxRenderContext ? sharedGlxRenderContext->getGLXContext() : nullptr;
return TCU_CHECK_GLX(
@@ -815,11 +805,6 @@ const GLXContext &GlxRenderContext::getGLXContext(void) const
return m_GLXContext;
}
-const GlxVisual &GlxRenderContext::getGLXVisual(void) const
-{
- return m_glxVisual;
-}
-
MovePtr<ContextFactory> createContextFactory(EventState &eventState)
{
return MovePtr<ContextFactory>(new GlxContextFactory(eventState));
--
2.45.2

View file

@ -1,56 +0,0 @@
From b512e6d5a0c79b194293936bd06656646913704e Mon Sep 17 00:00:00 2001
From: Valentine Burley <valentine.burley@collabora.com>
Date: Fri, 11 Apr 2025 16:50:57 +0200
Subject: Revert "Fix spurious failures when using a config without
pbuffer support"
This reverts commit 415a0ba8ecde404ef37ce96ece55b46854b44888.
---
external/openglcts/modules/common/glcTestSubcase.cpp | 10 ----------
framework/egl/egluGLContextFactory.cpp | 2 --
2 files changed, 12 deletions(-)
diff --git a/external/openglcts/modules/common/glcTestSubcase.cpp b/external/openglcts/modules/common/glcTestSubcase.cpp
index 93e58c18a..cd43cc068 100644
--- a/external/openglcts/modules/common/glcTestSubcase.cpp
+++ b/external/openglcts/modules/common/glcTestSubcase.cpp
@@ -233,11 +233,6 @@ TestSubcase::IterateResult TestSubcase::iterate(void)
if (subError == ERROR)
log.writeMessage("Test Setup() failed");
}
- catch (const tcu::NotSupportedError &ex)
- {
- log.writeMessage(ex.what());
- subError = NOT_SUPPORTED;
- }
catch (const runtime_error &ex)
{
log.writeMessage(ex.what());
@@ -258,11 +253,6 @@ TestSubcase::IterateResult TestSubcase::iterate(void)
if (subError == ERROR)
log.writeMessage("Test Run() failed");
}
- catch (const tcu::NotSupportedError &ex)
- {
- log.writeMessage(ex.what());
- subError = NOT_SUPPORTED;
- }
catch (const runtime_error &ex)
{
log.writeMessage(ex.what());
diff --git a/framework/egl/egluGLContextFactory.cpp b/framework/egl/egluGLContextFactory.cpp
index 66783ad8b..f347b40ad 100644
--- a/framework/egl/egluGLContextFactory.cpp
+++ b/framework/egl/egluGLContextFactory.cpp
@@ -539,8 +539,6 @@ void RenderContext::postIterate(void)
if (m_window)
{
- EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext));
-
EGLBoolean swapOk = egl.swapBuffers(m_eglDisplay, m_eglSurface);
EGLint error = egl.getError();
const bool badWindow = error == EGL_BAD_SURFACE || error == EGL_BAD_NATIVE_WINDOW;
--
2.45.2

View file

@ -0,0 +1,49 @@
From 7a5a9e5be4306637cd3a0ef0f770832f4b4cf4b4 Mon Sep 17 00:00:00 2001
From: Laura Nao <laura.nao@collabora.com>
Date: Wed, 12 Nov 2025 14:45:32 +0100
Subject: [PATCH] Fix C++ standard library build errors with Debian 13
Address missing <algorithm> and <optional> includes that caused build
failures ("no member named 'find' in namespace 'std'" and
"error: no template named 'optional' in namespace 'std'") when building
with the native toolchain on Debian 13.
This was fixed upstream in v48[1] and v49[2] respectively, so this patch
can be dropped once Perfetto is updated to v48+.
[1] https://github.com/google/perfetto/commit/d005c0123b2f929b918359a53ffe61d7ca2212a0
[2] https://github.com/google/perfetto/commit/acc24608c84d2d2d8d684f40a110d0a6f4eddc51
Signed-off-by: Laura Nao <laura.nao@collabora.com>
---
src/profiling/common/producer_support.cc | 1 +
src/traced/probes/sys_stats/sys_stats_data_source.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/profiling/common/producer_support.cc b/src/profiling/common/producer_support.cc
index 5303658..e9e193d 100644
--- a/src/profiling/common/producer_support.cc
+++ b/src/profiling/common/producer_support.cc
@@ -16,6 +16,7 @@
#include "src/profiling/common/producer_support.h"
+#include <algorithm>
#include <optional>
#include "perfetto/ext/base/android_utils.h"
diff --git a/src/traced/probes/sys_stats/sys_stats_data_source.h b/src/traced/probes/sys_stats/sys_stats_data_source.h
index e09cd8a..7e4749b 100644
--- a/src/traced/probes/sys_stats/sys_stats_data_source.h
+++ b/src/traced/probes/sys_stats/sys_stats_data_source.h
@@ -21,6 +21,7 @@
#include <map>
#include <memory>
+#include <optional>
#include <string>
#include "perfetto/ext/base/paged_memory.h"
--
2.39.5

View file

@ -39,7 +39,7 @@ if [ -n "${FLUSTER_TAG:-}" ]; then
export LIBVA_MESSAGING_LEVEL=1 export LIBVA_MESSAGING_LEVEL=1
fi fi
if [ -n "$PIGLIT_TAG" ]; then if [ -n "${PIGLIT_TAG:-}" ]; then
# Are we using the right Piglit version? # Are we using the right Piglit version?
ci_tag_test_time_check "PIGLIT_TAG" ci_tag_test_time_check "PIGLIT_TAG"
elif [ -d "/piglit" ]; then elif [ -d "/piglit" ]; then

View file

@ -34,9 +34,9 @@
# anholt | (decommissioned) | @anholt # anholt | (decommissioned) | @anholt
# austriancoder | ci-tron | @austriancoder # austriancoder | ci-tron | @austriancoder
# collabora | lava | @daniels, @sergi # collabora | lava | @daniels, @sergi
# google-freedreno | none (moving to LAVA) | @daniels, @sergi
# igalia | baremetal/poe-powered, ci-tron | @jasuarez, @chema # igalia | baremetal/poe-powered, ci-tron | @jasuarez, @chema
# lima | lava | @enunes # lima | lava | @enunes
# lumag | ci-tron | @lumag
# microsoft | custom | @jenatali, @alatiera # microsoft | custom | @jenatali, @alatiera
# ondracka | ci-tron | @ondracka # ondracka | ci-tron | @ondracka
# pengutronix | lava | @hnez, @lynxeye # pengutronix | lava | @hnez, @lynxeye
@ -293,14 +293,26 @@
- !reference [.pengutronix-farm-rules, rules] - !reference [.pengutronix-farm-rules, rules]
# Temporary placeholder as the devices move across to LAVA. .lumag-farm-rules:
.google-freedreno-farm-rules:
rules: rules:
- when: never - exists: [ .ci-farms-disabled/lumag ]
when: never
- changes: [ .ci-farms-disabled/lumag ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: on_success
- changes: [ .ci-farms-disabled/* ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
.google-freedreno-farm-manual-rules: .lumag-farm-manual-rules:
rules: rules:
- when: never - exists: [ .ci-farms-disabled/lumag ]
when: never
- changes: [ .ci-farms-disabled/lumag ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- !reference [.lumag-farm-rules, rules]
# Skip container & build jobs when disabling any farm, and run them if any # Skip container & build jobs when disabling any farm, and run them if any
# farm gets re-enabled. # farm gets re-enabled.
@ -358,6 +370,10 @@
changes: [ .ci-farms-disabled/pengutronix ] changes: [ .ci-farms-disabled/pengutronix ]
exists: [ .ci-farms-disabled/pengutronix ] exists: [ .ci-farms-disabled/pengutronix ]
when: never when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/lumag ]
exists: [ .ci-farms-disabled/lumag ]
when: never
# Any other change to ci-farms/* means some farm is getting re-enabled. # Any other change to ci-farms/* means some farm is getting re-enabled.
# Run jobs in Marge pipelines (and let it fallback to manual otherwise) # Run jobs in Marge pipelines (and let it fallback to manual otherwise)
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $GITLAB_USER_LOGIN == "marge-bot"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $GITLAB_USER_LOGIN == "marge-bot"'

View file

@ -19,27 +19,27 @@ include:
- .gitlab-ci/conditional-build-image-tags.yml - .gitlab-ci/conditional-build-image-tags.yml
variables: variables:
DEBIAN_BUILD_BASE_TAG: "20251014-testfix" DEBIAN_BUILD_BASE_TAG: "20251016-riscv"
DEBIAN_BUILD_TAG: "20250926-D3D618" DEBIAN_BUILD_TAG: "20250926-D3D618"
DEBIAN_TEST_BASE_TAG: "20250926-gitlab" DEBIAN_TEST_BASE_TAG: "20251203-virgl"
DEBIAN_TEST_ANDROID_TAG: "20251014-vkcts" DEBIAN_TEST_ANDROID_TAG: "20251212-angle-2e"
DEBIAN_TEST_GL_TAG: "20251014-vkcts" DEBIAN_TEST_GL_TAG: "20251212-piglit-28"
DEBIAN_TEST_VIDEO_TAG: "20250813-vector" DEBIAN_TEST_VIDEO_TAG: "20250813-vector"
DEBIAN_TEST_VK_TAG: "20251014-vkcts" DEBIAN_TEST_VK_TAG: "20251208-deqp"
ALPINE_X86_64_BUILD_TAG: "20251001-realninja" ALPINE_X86_64_BUILD_TAG: "20251001-realninja"
FEDORA_X86_64_BUILD_TAG: "20250917-rust" FEDORA_X86_64_BUILD_TAG: "20250917-rust"
KERNEL_TAG: "v6.16-mesa-9d85" KERNEL_TAG: "v6.17-mesa-ceea"
KERNEL_REPO: "gfx-ci/linux" KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "0d2527f6" PKG_REPO_REV: "0d2527f6"
FIRMWARE_TAG: "36f9bbfa" FIRMWARE_TAG: "8fc31b97"
FIRMWARE_REPO: "gfx-ci/firmware" FIRMWARE_REPO: "gfx-ci/firmware"
WINDOWS_X64_MSVC_TAG: "20250906-d3d10umd" WINDOWS_X64_MSVC_TAG: "20251120-bison"
WINDOWS_X64_BUILD_TAG: "20251001-D3D618" WINDOWS_X64_BUILD_TAG: "20251120-bison"
WINDOWS_X64_TEST_TAG: "20250926-D3D618" WINDOWS_X64_TEST_TAG: "20251120-bison"

View file

@ -13,7 +13,7 @@ variables:
# 4. lava/health-check-docker - the slim container used for fastboot # 4. lava/health-check-docker - the slim container used for fastboot
# Set image: directly instead of extending .set-image to avoid conflicts # Set image: directly instead of extending .set-image to avoid conflicts
# with MESA_IMAGE_PATH and FDO_DISTRIBUTION_TAG between the containers. # with MESA_IMAGE_PATH and FDO_DISTRIBUTION_TAG between the containers.
image: registry.freedesktop.org/gfx-ci/lava-job-submitter/alpine/x86_64_lava-trigger:20251009-fastboot image: registry.freedesktop.org/gfx-ci/lava-job-submitter/alpine/x86_64_lava-trigger:20251111.0
# Cancel job if a newer commit is pushed to the same branch # Cancel job if a newer commit is pushed to the same branch
interruptible: true interruptible: true
# The jobs themselves shouldn't actually run for an hour, of course. # The jobs themselves shouldn't actually run for an hour, of course.
@ -66,8 +66,6 @@ variables:
- $RUNNER_TAG - $RUNNER_TAG
after_script: after_script:
- curl -L --retry 4 -f --retry-connrefused --retry-delay 30 -s "https://${JOB_RESULTS_PATH}" | tar --warning=no-timestamp --zstd -x - curl -L --retry 4 -f --retry-connrefused --retry-delay 30 -s "https://${JOB_RESULTS_PATH}" | tar --warning=no-timestamp --zstd -x
needs:
- !reference [.required-for-hardware-jobs, needs]
.lava-x86_64-test: .lava-x86_64-test:
extends: extends:
@ -89,7 +87,6 @@ variables:
HWCI_TEST_SCRIPT: install/cuttlefish-runner.sh HWCI_TEST_SCRIPT: install/cuttlefish-runner.sh
S3_ANDROID_ARTIFACT_NAME: mesa-x86_64-android-debug S3_ANDROID_ARTIFACT_NAME: mesa-x86_64-android-debug
needs: needs:
- !reference [.lava-test, needs]
- job: debian/x86_64_test-android - job: debian/x86_64_test-android
artifacts: false artifacts: false
optional: true optional: true
@ -103,7 +100,6 @@ variables:
- .use-debian/x86_64_test-gl - .use-debian/x86_64_test-gl
- .lava-x86_64-test - .lava-x86_64-test
needs: needs:
- !reference [.lava-test, needs]
- job: debian/x86_64_test-gl - job: debian/x86_64_test-gl
artifacts: false artifacts: false
optional: true optional: true
@ -118,7 +114,6 @@ variables:
DEQP_FORCE_ASAN: 1 DEQP_FORCE_ASAN: 1
S3_ARTIFACT_NAME: mesa-x86_64-asan-debugoptimized S3_ARTIFACT_NAME: mesa-x86_64-asan-debugoptimized
needs: needs:
- !reference [.lava-test, needs]
- job: debian/x86_64_test-gl - job: debian/x86_64_test-gl
artifacts: false artifacts: false
optional: true optional: true
@ -130,7 +125,6 @@ variables:
- .use-debian/x86_64_test-video - .use-debian/x86_64_test-video
- .lava-x86_64-test - .lava-x86_64-test
needs: needs:
- !reference [.lava-test, needs]
- job: debian/x86_64_test-video - job: debian/x86_64_test-video
artifacts: false artifacts: false
optional: true optional: true
@ -142,7 +136,6 @@ variables:
- .use-debian/x86_64_test-vk - .use-debian/x86_64_test-vk
- .lava-x86_64-test - .lava-x86_64-test
needs: needs:
- !reference [.lava-test, needs]
- job: debian/x86_64_test-vk - job: debian/x86_64_test-vk
artifacts: false artifacts: false
optional: true optional: true
@ -157,7 +150,6 @@ variables:
DEQP_FORCE_ASAN: 1 DEQP_FORCE_ASAN: 1
S3_ARTIFACT_NAME: mesa-x86_64-asan-debugoptimized S3_ARTIFACT_NAME: mesa-x86_64-asan-debugoptimized
needs: needs:
- !reference [.lava-test, needs]
- job: debian/x86_64_test-vk - job: debian/x86_64_test-vk
artifacts: false artifacts: false
optional: true optional: true
@ -179,7 +171,6 @@ variables:
- .use-debian/arm32_test-gl - .use-debian/arm32_test-gl
- .lava-arm32-test - .lava-arm32-test
needs: needs:
- !reference [.lava-test, needs]
- job: debian/arm32_test-gl - job: debian/arm32_test-gl
artifacts: false artifacts: false
optional: true optional: true
@ -201,7 +192,6 @@ variables:
- .use-debian/arm64_test-gl - .use-debian/arm64_test-gl
- .lava-arm64-test - .lava-arm64-test
needs: needs:
- !reference [.lava-test, needs]
- job: debian/arm64_test-gl - job: debian/arm64_test-gl
artifacts: false artifacts: false
optional: true optional: true
@ -216,7 +206,6 @@ variables:
DEQP_FORCE_ASAN: 1 DEQP_FORCE_ASAN: 1
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
needs: needs:
- !reference [.lava-test, needs]
- job: debian/arm64_test-gl - job: debian/arm64_test-gl
artifacts: false artifacts: false
optional: true optional: true
@ -228,7 +217,6 @@ variables:
- .use-debian/arm64_test-vk - .use-debian/arm64_test-vk
- .lava-arm64-test - .lava-arm64-test
needs: needs:
- !reference [.lava-test, needs]
- job: debian/arm64_test-vk - job: debian/arm64_test-vk
artifacts: false artifacts: false
optional: true optional: true
@ -243,7 +231,6 @@ variables:
DEQP_FORCE_ASAN: 1 DEQP_FORCE_ASAN: 1
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
needs: needs:
- !reference [.lava-test, needs]
- job: debian/arm64_test-vk - job: debian/arm64_test-vk
artifacts: false artifacts: false
optional: true optional: true

View file

@ -43,9 +43,7 @@ fi
# Android manages the rust toolchain differently, ignore that case # Android manages the rust toolchain differently, ignore that case
if [ "$CI_JOB_STAGE" = "build-for-tests" ] && [[ "$CI_JOB_NAME" != *android* ]]; then if [ "$CI_JOB_STAGE" = "build-for-tests" ] && [[ "$CI_JOB_NAME" != *android* ]]; then
# Keep this in sync with the `rustc.version()` check in meson.build, and rustup default "$(python3 -c 'import tomllib; print(tomllib.load(open("'"$CI_PROJECT_DIR"'/clippy.toml", "rb"))["msrv"])')"
# MINIMUM_SUPPORTED_RUST_VERSION in .gitlab-ci/container/build-rust.sh
rustup default 1.82.0
fi fi
# cross-xfail-$CROSS, if it exists, contains a list of tests that are expected # cross-xfail-$CROSS, if it exists, contains a list of tests that are expected

View file

@ -11,11 +11,17 @@ set -o xtrace
CROSS_FILE=/cross_file-"$CROSS".txt CROSS_FILE=/cross_file-"$CROSS".txt
# Delete unused bin and includes from artifacts to save space. if [ -d install/bin ]; then
rm -rf install/bin install/include # Keep pps-producer binary for tests that need it.
# Remove all other binaries to save space.
find install/bin -type f -not -name 'pps-producer' -delete
fi
# Delete unused includes from artifacts to save space.
rm -rf install/include
rm -f install/lib/*.a rm -f install/lib/*.a
# Strip the drivers in the artifacts to cut 80% of the artifacts size. # Strip the drivers and binaries in the artifacts to cut 80% of the artifacts size.
if [ -n "$CROSS" ]; then if [ -n "$CROSS" ]; then
STRIP=$(sed -n -E "s/strip\s*=\s*\[?'(.*)'\]?/\1/p" "$CROSS_FILE") STRIP=$(sed -n -E "s/strip\s*=\s*\[?'(.*)'\]?/\1/p" "$CROSS_FILE")
if [ -z "$STRIP" ]; then if [ -z "$STRIP" ]; then
@ -26,7 +32,7 @@ else
STRIP="strip" STRIP="strip"
fi fi
if [ -z "$ARTIFACTS_DEBUG_SYMBOLS" ]; then if [ -z "$ARTIFACTS_DEBUG_SYMBOLS" ]; then
find install -name \*.so -exec $STRIP --strip-debug {} \; find install -type f -executable -exec $STRIP --strip-debug {} \;
fi fi
git_sha=$(git rev-parse --short=10 HEAD) git_sha=$(git rev-parse --short=10 HEAD)

View file

@ -118,7 +118,6 @@ def main():
# before we make it to 9-digit jobs (we're at 7 so far). # before we make it to 9-digit jobs (we're at 7 so far).
nick = args.runner nick = args.runner
nick = nick.replace('mesa-', '') nick = nick.replace('mesa-', '')
nick = nick.replace('google-freedreno-', '')
nick += f'-{args.job}' nick += f'-{args.job}'
irc.send_line(f"NICK {nick}") irc.send_line(f"NICK {nick}")
irc.send_line(f"USER {nick} unused unused: Gitlab CI Notifier") irc.send_line(f"USER {nick} unused unused: Gitlab CI Notifier")

View file

@ -22,6 +22,16 @@ for driver in freedreno intel lima v3d vc4; do
section_end shader-db-${driver} section_end shader-db-${driver}
done done
# Run shader-db over a number of supported platforms for crocus/iris
for platform in hsw bdw skl mtl; do
section_start "shader-db-intel-${platform}" "Running shader-db for intel - ${platform}"
env LD_PRELOAD="$LIBDIR/libintel_noop_drm_shim.so" \
INTEL_STUB_GPU_PLATFORM="${platform}" \
./run -j"${FDO_CI_CONCURRENT:-4}" ./shaders \
> "$ARTIFACTSDIR/intel-${platform}-shader-db.txt"
section_end "shader-db-intel-${platform}"
done
# Run shader-db over a number of supported chipsets for nouveau # Run shader-db over a number of supported chipsets for nouveau
for chipset in 40 a3 c0 e4 f0 134 162; do for chipset in 40 a3 c0 e4 f0 134 162; do
section_start shader-db-nouveau-${chipset} "Running shader-db for nouveau - ${chipset}" section_start shader-db-nouveau-${chipset} "Running shader-db for nouveau - ${chipset}"

View file

@ -60,6 +60,8 @@
- subprojects/**/* - subprojects/**/*
- .gitattributes - .gitattributes
- src/* - src/*
- src/android_stub/**/*
- src/c11/**/*
- src/compiler/**/* - src/compiler/**/*
- src/drm-shim/**/* - src/drm-shim/**/*
- src/gtest/**/* - src/gtest/**/*

View file

@ -41,7 +41,6 @@
- job: debian/x86_64_test-gl - job: debian/x86_64_test-gl
optional: true optional: true
- job: debian-x86_64 - job: debian-x86_64
- !reference [.required-for-hardware-jobs, needs]
variables: variables:
DEBIAN_ARCH: amd64 DEBIAN_ARCH: amd64
S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
@ -54,7 +53,6 @@
- job: debian-x86_64 - job: debian-x86_64
- job: debian/x86_64_test-vk - job: debian/x86_64_test-vk
optional: true optional: true
- !reference [.required-for-hardware-jobs, needs]
variables: variables:
DEBIAN_ARCH: amd64 DEBIAN_ARCH: amd64
S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
@ -66,7 +64,6 @@
needs: needs:
- job: debian/x86_64_test-gl - job: debian/x86_64_test-gl
optional: true optional: true
- !reference [.required-for-hardware-jobs, needs]
variables: variables:
S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
@ -91,7 +88,6 @@
- job: debian/x86_64_test-android - job: debian/x86_64_test-android
artifacts: false artifacts: false
optional: true optional: true
- !reference [.required-for-hardware-jobs, needs]
timeout: 20m timeout: 20m
script: script:
- ./install/cuttlefish-runner.sh - ./install/cuttlefish-runner.sh
@ -182,13 +178,3 @@
- rm -rf install - rm -rf install
- (set -x; curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst | tar --zstd -x) - (set -x; curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst | tar --zstd -x)
- section_end artifacts_download - section_end artifacts_download
# Jobs that need to pass before spending hardware resources on further testing
.required-for-hardware-jobs:
needs:
- job: rustfmt
optional: true
artifacts: false
- job: yaml-toml-shell-py-test
optional: true
artifacts: false

View file

@ -27,8 +27,6 @@ Start-Process -NoNewWindow -Wait -FilePath C:\vs_buildtools.exe `
"--add", "Microsoft.VisualStudio.Component.VC.ATL", ` "--add", "Microsoft.VisualStudio.Component.VC.ATL", `
"--add", "Microsoft.VisualStudio.Component.VC.ATLMFC", ` "--add", "Microsoft.VisualStudio.Component.VC.ATLMFC", `
"--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", ` "--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", `
"--add", "Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL", ` # MSVC 2019
"--add", "Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC", `
"--add", "Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64", ` "--add", "Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64", `
"--add", "Microsoft.VisualStudio.Component.VC.Llvm.Clang", ` "--add", "Microsoft.VisualStudio.Component.VC.Llvm.Clang", `
"--add", "Microsoft.VisualStudio.Component.Graphics.Tools", ` "--add", "Microsoft.VisualStudio.Component.Graphics.Tools", `

View file

@ -36,22 +36,23 @@ $MACHINE_PATH=[System.Environment]::GetEnvironmentVariable('PATH', [System.Envir
Write-Output "Before winget install USER_PATH:$USER_PATH MACHINE_PATH:$MACHINE_PATH" Write-Output "Before winget install USER_PATH:$USER_PATH MACHINE_PATH:$MACHINE_PATH"
$Packages = @( $Packages = @(
'Microsoft.WindowsWDK.10.0.26100', 'Microsoft.WindowsWDK.10.0.26100,10.1.26100.6584',
'Python.Python.3.13', 'Python.Python.3.13,3.13.9',
'Ninja-build.Ninja', 'Ninja-build.Ninja,1.13.1',
'Kitware.CMake', 'Kitware.CMake,4.1.3',
'Git.Git', 'Git.Git,2.52.0',
'WinFlexBison.win_flex_bison', 'WinFlexBison.win_flex_bison,2.5.24',
'bloodrock.pkg-config-lite' 'bloodrock.pkg-config-lite,0.28-1'
) )
$ProgressPreference = "SilentlyContinue" $ProgressPreference = "SilentlyContinue"
New-Item -Force -ItemType 'directory' -Name 'flexbison' -Path 'C:\temp' New-Item -Force -ItemType 'directory' -Name 'flexbison' -Path 'C:\temp'
foreach ($package in $Packages) foreach ($package in $Packages)
{ {
Write-Output "Installing $package with winget" $package_id, $package_version = $package -split ',', 2
Write-Output "Installing $package_id with version $package_version by winget"
For ($i = 0; $i -lt 5; $i++) { For ($i = 0; $i -lt 5; $i++) {
winget install --verbose --silent --accept-package-agreements --source winget --exact --id $package --log C:\temp\wdk-install.log winget install --verbose --silent --accept-package-agreements --source winget --exact --id $package_id --version $package_version --log C:\temp\wdk-install.log
$packages_installed = $? $packages_installed = $?
if ($packages_installed) { if ($packages_installed) {
Break Break

View file

@ -460,6 +460,8 @@ Martin Roukala (né Peres) <martin.roukala@mupuf.org> <martin.peres@mupuf.org>
Martin Roukala (né Peres) <martin.roukala@mupuf.org> <martin.peres@linux.intel.com> Martin Roukala (né Peres) <martin.roukala@mupuf.org> <martin.peres@linux.intel.com>
Martin Roukala (né Peres) <martin.roukala@mupuf.org> <martin.peres@labri.fr> Martin Roukala (né Peres) <martin.roukala@mupuf.org> <martin.peres@labri.fr>
Mary Guillemard <mary@mary.zone> <mary.guillemard@collabora.com>
Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Froehlich <Mathias.Froehlich@gmx.net> Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Froehlich <Mathias.Froehlich@gmx.net>
Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Froehlich <Mathias.Froehlich@web.de> Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Froehlich <Mathias.Froehlich@web.de>
Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Frohlich <M.Froehlich@science-computing.de> Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Frohlich <M.Froehlich@science-computing.de>
@ -614,6 +616,8 @@ Rune Petersen <rune@megahurts.dk> Rune Peterson <rune@megahurts.dk>
Ryan Houdek <sonicadvance1@gmail.com> <Sonicadvance1@gmail.com> Ryan Houdek <sonicadvance1@gmail.com> <Sonicadvance1@gmail.com>
Ryan Mckeever <ryan.mckeever@collabora.com> <rebecca.mckeever@collabora.com>
Sam Hocevar <sam@hocevar.net> Sam Hocevar <sam@zoy.org> Sam Hocevar <sam@hocevar.net> Sam Hocevar <sam@zoy.org>
Samuel Iglesias Gonsálvez <siglesias@igalia.com> Samuel Iglesias Gonsalvez <siglesias@igalia.com> Samuel Iglesias Gonsálvez <siglesias@igalia.com> Samuel Iglesias Gonsalvez <siglesias@igalia.com>

View file

@ -43,6 +43,7 @@ issues:
'intel/executor': 'intel-executor' 'intel/executor': 'intel-executor'
'iris': 'iris' 'iris': 'iris'
'isl': 'ISL' 'isl': 'ISL'
'kk': 'KosmicKrisp'
'lima': 'lima' 'lima': 'lima'
'lima/ppir': 'lima' 'lima/ppir': 'lima'
'llvmpipe': 'llvmpipe' 'llvmpipe': 'llvmpipe'
@ -62,6 +63,7 @@ issues:
'panfrost': 'panfrost' 'panfrost': 'panfrost'
'panvk': 'panvk' 'panvk': 'panvk'
'pan/midgard': 'panfrost' 'pan/midgard': 'panfrost'
'poly': 'poly'
'pvr': 'powervr' 'pvr': 'powervr'
'r100': 'r100' 'r100': 'r100'
'r200': 'r200' 'r200': 'r200'
@ -268,8 +270,8 @@ merge_requests:
'^src/intel/tools/': ['intel-tools'] '^src/intel/tools/': ['intel-tools']
'^src/intel/vulkan/': ['ANV'] '^src/intel/vulkan/': ['ANV']
'^src/intel/vulkan_hasvk/': ['hasvk'] '^src/intel/vulkan_hasvk/': ['hasvk']
'^src/kosmickrisp/': ['KosmicKrisp']
'^src/loader/': ['loader'] '^src/loader/': ['loader']
'^src/mapi/': ['mapi']
'^src/mesa/drivers/dri/i915/': ['i915'] '^src/mesa/drivers/dri/i915/': ['i915']
'^src/mesa/drivers/dri/i965/': ['i965'] '^src/mesa/drivers/dri/i965/': ['i965']
'^src/mesa/drivers/dri/nouveau/': ['vieux'] '^src/mesa/drivers/dri/nouveau/': ['vieux']
@ -295,6 +297,7 @@ merge_requests:
'^src/nouveau/winsys/': ['NVK'] '^src/nouveau/winsys/': ['NVK']
'^src/panfrost/': ['panfrost'] '^src/panfrost/': ['panfrost']
'^src/panfrost/vulkan/': ['panvk'] '^src/panfrost/vulkan/': ['panvk']
'^src/poly/': ['poly']
'^src/virtio/vulkan/': ['venus'] '^src/virtio/vulkan/': ['venus']
'^src/virtio/venus-protocol/': ['venus'] '^src/virtio/venus-protocol/': ['venus']
'^src/virtio/ci/': ['venus'] '^src/virtio/ci/': ['venus']
@ -302,7 +305,7 @@ merge_requests:
'^src/util/00-mesa-defaults.conf': ['drirc'] '^src/util/00-mesa-defaults.conf': ['drirc']
'^src/vulkan/': ['vulkan'] '^src/vulkan/': ['vulkan']
'^src/vulkan/wsi/': ['wsi'] '^src/vulkan/wsi/': ['wsi']
'^VERSION$': ['maintainer-scripts'] '^VERSION$': ['mesa-release']
'Android': ['android'] 'Android': ['android']
'EGL': ['EGL'] 'EGL': ['EGL']

View file

@ -137,6 +137,10 @@ gitlab-ci*.yml @eric
/src/gallium/drivers/iris/ @kwg @llandwerlin @idr /src/gallium/drivers/iris/ @kwg @llandwerlin @idr
/src/gallium/drivers/i915/ @anholt /src/gallium/drivers/i915/ @anholt
# KosmicKrisp
/src/kosmickrisp @aitor
/src/kosmickrisp/compiler @agoldmints
# Microsoft # Microsoft
/src/microsoft/ @jenatali /src/microsoft/ @jenatali
/src/gallium/drivers/d3d12/ @jenatali /src/gallium/drivers/d3d12/ @jenatali

View file

@ -1 +1 @@
25.3.0-devel 26.0.0-devel

View file

@ -45,17 +45,13 @@ REFRESH_WAIT_LOG = 10
REFRESH_WAIT_JOBS = 6 REFRESH_WAIT_JOBS = 6
MAX_ENABLE_JOB_ATTEMPTS = 3 MAX_ENABLE_JOB_ATTEMPTS = 3
STATUS_COLORS = { STATUS_COLORS = defaultdict(lambda: "", {
"created": "",
"running": "[blue]", "running": "[blue]",
"success": "[green]", "success": "[green]",
"failed": "[red]", "failed": "[red]",
"canceled": "[magenta]", "canceled": "[magenta]",
"canceling": "[magenta]", "canceling": "[magenta]",
"manual": "", })
"pending": "",
"skipped": "",
}
COMPLETED_STATUSES = frozenset({"success", "failed"}) COMPLETED_STATUSES = frozenset({"success", "failed"})
RUNNING_STATUSES = frozenset({"created", "pending", "running"}) RUNNING_STATUSES = frozenset({"created", "pending", "running"})

View file

@ -106,7 +106,6 @@ class GitlabGQL:
logging.error(traceback_str) logging.error(traceback_str)
self.invalidate_query_cache() self.invalidate_query_cache()
logging.error("Cache invalidated, retrying without cache") logging.error("Cache invalidated, retrying without cache")
finally:
return run_uncached() return run_uncached()
def _query( def _query(

View file

@ -22,7 +22,7 @@ import gitlab
from gitlab.base import RESTObjectList from gitlab.base import RESTObjectList
from gitlab.exceptions import GitlabAuthenticationError from gitlab.exceptions import GitlabAuthenticationError
from gitlab.v4.objects import Project, ProjectMergeRequest from gitlab.v4.objects import Project, ProjectMergeRequest
from gitlab_common import read_token, pretty_duration from gitlab_common import get_token_from_default_dir, read_token, pretty_duration
from rich.console import Console from rich.console import Console
REFRESH_WAIT = 30 REFRESH_WAIT = 30
@ -47,6 +47,7 @@ def parse_args() -> argparse.Namespace:
parse.add_argument( parse.add_argument(
"--token", "--token",
metavar="token", metavar="token",
default=get_token_from_default_dir(),
help="force GitLab token, otherwise it's read from ~/.config/gitlab-token", help="force GitLab token, otherwise it's read from ~/.config/gitlab-token",
) )
return parse.parse_args() return parse.parse_args()

View file

@ -6,7 +6,7 @@ kaleido==0.2.*
pandas==2.* pandas==2.*
plotly==5.* plotly==5.*
python-dateutil==2.* python-dateutil==2.*
python-gitlab==4.* python-gitlab==5.*
rich==14.1.* rich==14.1.*
ruamel.yaml.clib==0.2.* ruamel.yaml.clib==0.2.*
ruamel.yaml==0.17.* ruamel.yaml==0.17.*

View file

@ -226,8 +226,8 @@ async def gather_bugs(version: str) -> typing.List[str]:
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
async with aiohttp.ClientSession(loop=loop) as session: async with aiohttp.ClientSession(loop=loop) as session:
results = await asyncio.gather(*[get_bug(session, i) for i in issues]) results = await asyncio.gather(*[get_bug(session, i) for i in issues])
typing.cast(typing.Tuple[str, ...], results) # Remove duplicates.
bugs = list(results) bugs = sorted(set(results))
if not bugs: if not bugs:
bugs = ['None'] bugs = ['None']
return bugs return bugs

View file

@ -24,6 +24,9 @@ import typing
import pytest import pytest
if typing.TYPE_CHECKING:
import aiohttp
# AsyncMock is new in 3.8, so if we're using an older version we need the # AsyncMock is new in 3.8, so if we're using an older version we need the
# backported version of mock # backported version of mock
if sys.version_info >= (3, 8): if sys.version_info >= (3, 8):
@ -199,7 +202,25 @@ async def test_parse_issues(content: str, bugs: typing.List[str]) -> None:
ids = await parse_issues('1234 not used') ids = await parse_issues('1234 not used')
assert set(ids) == set(bugs) assert set(ids) == set(bugs)
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_rst_escape(): async def test_rst_escape():
out = inliner.quoteInline('foo@bar') out = inliner.quoteInline('foo@bar')
assert out == 'foo\@bar' assert out == 'foo\@bar'
@pytest.mark.asyncio
async def test_gather_bugs_duplicates():
mock_gc = mock.AsyncMock(return_value='something')
mock_pi = mock.AsyncMock(return_value=['a', 'b', 'a', 'a', 'c', 'b'])
async def get_bug(session: 'aiohttp.ClientSession', bug_id: str) -> str:
return bug_id
with mock.patch('bin.gen_release_notes.gather_commits', mock_gc), \
mock.patch('bin.gen_release_notes.parse_issues', mock_pi), \
mock.patch('bin.gen_release_notes.get_bug', get_bug):
bugs = await gather_bugs('')
assert bugs == ['a', 'b', 'c']

View file

@ -16,6 +16,7 @@ Caterina Shablia, caterina.shablia@collabora.com, nanokatze
Chia-I Wu, olvaffe@gmail.com, olv Chia-I Wu, olvaffe@gmail.com, olv
Christian Gmeiner, cgmeiner@igalia.com, austriancoder Christian Gmeiner, cgmeiner@igalia.com, austriancoder
Christopher Michael, cmichael@igalia.com, cpmichael Christopher Michael, cmichael@igalia.com, cpmichael
Christoph Pillmayer, christoph.pillmayer@arm.com, chrpil
Colin Marc, hi@colinmarc.com, colinmarc Colin Marc, hi@colinmarc.com, colinmarc
Connor Abbott, cwabbott0@gmail.com, cwabbott0 Connor Abbott, cwabbott0@gmail.com, cwabbott0
Corentin Noël, corentin.noel@collabora.com, tintou Corentin Noël, corentin.noel@collabora.com, tintou
@ -84,11 +85,11 @@ Lukas Lipp, lippls@hotmail.com, fknfilewalker
Maíra Canal, mcanal@igalia.com, mairacanal Maíra Canal, mcanal@igalia.com, mairacanal
Manuel Dun, manueldun@gmail.com, manueldun Manuel Dun, manueldun@gmail.com, manueldun
Marc Herbert, marc.herbert@gmail.com, marc-hb Marc Herbert, marc.herbert@gmail.com, marc-hb
Marek Olšák, maraeo@gmail.com, mareko Marek Olšák, marek.olsak@amd.com, mareko
Mark Collins, mark@igalia.com, PixelyIon Mark Collins, mark@igalia.com, PixelyIon
Martin Krastev, martin.krastev@broadcom.com, blu Martin Krastev, martin.krastev@broadcom.com, blu
Martin Roukala (né Peres), martin.roukala@mupuf.org, mupuf Martin Roukala (né Peres), martin.roukala@mupuf.org, mupuf
Mary Guillemard, mary.guillemard@collabora.com, marysaka Mary Guillemard, mary@mary.zone, marysaka
Matthew Brost, matthew.brost@intel.com, mbrost Matthew Brost, matthew.brost@intel.com, mbrost
Matt Turner, mattst88@gmail.com, mattst88 Matt Turner, mattst88@gmail.com, mattst88
Mauro Rossi, issor.oruam@gmail.com, issor.oruam Mauro Rossi, issor.oruam@gmail.com, issor.oruam
@ -107,11 +108,11 @@ Peyton Lee, peytolee@amd.com, peytolee
Pierre-Eric Pelloux-Prayer, pelloux@gmail.com, pepp Pierre-Eric Pelloux-Prayer, pelloux@gmail.com, pepp
Pohsiang (John) Hsu, pohhsu@microsoft.com, pohhsu_microsoft Pohsiang (John) Hsu, pohhsu@microsoft.com, pohhsu_microsoft
Qiang Yu, yuq825@gmail.com, yuq825 Qiang Yu, yuq825@gmail.com, yuq825
Rebecca Mckeever, rebecca.mckeever@collabora.com, rmckeever
Rhys Perry, pendingchaos02@gmail.com, pendingchaos Rhys Perry, pendingchaos02@gmail.com, pendingchaos
Rob Clark, robclark@freedesktop.org, robclark Rob Clark, robclark@freedesktop.org, robclark
Roland Scheidegger, roland.scheidegger@broadcom.com, sroland Roland Scheidegger, roland.scheidegger@broadcom.com, sroland
Ruijing Dong, ruijing.dong@amd.com, rdong Ruijing Dong, ruijing.dong@amd.com, rdong
Ryan Mckeever, ryan.mckeever@collabora.com, rmckeever
Sagar Ghuge, sagar.ghuge@intel.com, sagarghuge Sagar Ghuge, sagar.ghuge@intel.com, sagarghuge
Samuel Pitoiset, samuel.pitoiset@gmail.com, hakzsam Samuel Pitoiset, samuel.pitoiset@gmail.com, hakzsam
Saroj Kumar, saroj.kumar@amd.com, sarojk Saroj Kumar, saroj.kumar@amd.com, sarojk
@ -134,5 +135,6 @@ Vinson Lee, vlee@freedesktop.org, vlee
Xaver Hugl, xaver.hugl@kde.org, Zamundaaa Xaver Hugl, xaver.hugl@kde.org, Zamundaaa
Yiwei Zhang, zzyiwei@chromium.org, zzyiwei Yiwei Zhang, zzyiwei@chromium.org, zzyiwei
Yogesh Mohan Marimuthu, yogesh.mohanmarimuthu@amd.com, yogeshmohan Yogesh Mohan Marimuthu, yogesh.mohanmarimuthu@amd.com, yogeshmohan
Yonggang Luo, luoyonggang@gmail.com, lygstate
Zan Dobersek, zdobersek@igalia.com, zdobersek Zan Dobersek, zdobersek@igalia.com, zdobersek
Zoltán Böszörményi, zboszor@gmail.com, zboszor Zoltán Böszörményi, zboszor@gmail.com, zboszor

1 Aaron Ruby aruby@qnx.com aruby
16 Chia-I Wu olvaffe@gmail.com olv
17 Christian Gmeiner cgmeiner@igalia.com austriancoder
18 Christopher Michael cmichael@igalia.com cpmichael
19 Christoph Pillmayer christoph.pillmayer@arm.com chrpil
20 Colin Marc hi@colinmarc.com colinmarc
21 Connor Abbott cwabbott0@gmail.com cwabbott0
22 Corentin Noël corentin.noel@collabora.com tintou
85 Maíra Canal mcanal@igalia.com mairacanal
86 Manuel Dun manueldun@gmail.com manueldun
87 Marc Herbert marc.herbert@gmail.com marc-hb
88 Marek Olšák maraeo@gmail.com marek.olsak@amd.com mareko
89 Mark Collins mark@igalia.com PixelyIon
90 Martin Krastev martin.krastev@broadcom.com blu
91 Martin Roukala (né Peres) martin.roukala@mupuf.org mupuf
92 Mary Guillemard mary.guillemard@collabora.com mary@mary.zone marysaka
93 Matthew Brost matthew.brost@intel.com mbrost
94 Matt Turner mattst88@gmail.com mattst88
95 Mauro Rossi issor.oruam@gmail.com issor.oruam
108 Pierre-Eric Pelloux-Prayer pelloux@gmail.com pepp
109 Pohsiang (John) Hsu pohhsu@microsoft.com pohhsu_microsoft
110 Qiang Yu yuq825@gmail.com yuq825
Rebecca Mckeever rebecca.mckeever@collabora.com rmckeever
111 Rhys Perry pendingchaos02@gmail.com pendingchaos
112 Rob Clark robclark@freedesktop.org robclark
113 Roland Scheidegger roland.scheidegger@broadcom.com sroland
114 Ruijing Dong ruijing.dong@amd.com rdong
115 Ryan Mckeever ryan.mckeever@collabora.com rmckeever
116 Sagar Ghuge sagar.ghuge@intel.com sagarghuge
117 Samuel Pitoiset samuel.pitoiset@gmail.com hakzsam
118 Saroj Kumar saroj.kumar@amd.com sarojk
135 Xaver Hugl xaver.hugl@kde.org Zamundaaa
136 Yiwei Zhang zzyiwei@chromium.org zzyiwei
137 Yogesh Mohan Marimuthu yogesh.mohanmarimuthu@amd.com yogeshmohan
138 Yonggang Luo luoyonggang@gmail.com lygstate
139 Zan Dobersek zdobersek@igalia.com zdobersek
140 Zoltán Böszörményi zboszor@gmail.com zboszor

View file

@ -80,7 +80,7 @@ def get_symbols_nm(nm, lib):
if line.startswith(' '): if line.startswith(' '):
continue continue
fields = line.split() fields = line.split()
if len(fields) == 2 and fields[1] == 'U': if len(fields) >= 2 and fields[1] == 'U':
continue continue
symbol_name = fields[0] symbol_name = fields[0]
if platform_name == 'Linux' or platform_name == 'GNU' or platform_name.startswith('GNU/'): if platform_name == 'Linux' or platform_name == 'GNU' or platform_name.startswith('GNU/'):

2
clippy.toml Normal file
View file

@ -0,0 +1,2 @@
# Keep this in sync with the `rustc.version()` check in meson.build
msrv = "1.82.0"

View file

@ -24,7 +24,7 @@ def ext_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
parts = ext.split('_', 2) parts = ext.split('_', 2)
if parts[0] == 'VK': if parts[0] == 'VK':
full_url = f'https://registry.khronos.org/vulkan/specs/latest/man/html/{ext}.html' full_url = f'https://docs.vulkan.org/refpages/latest/refpages/source/{ext}.html'
elif parts[0] == 'GL': elif parts[0] == 'GL':
full_url = f'https://registry.khronos.org/OpenGL/extensions/{parts[1]}/{parts[1]}_{parts[2]}.txt' full_url = f'https://registry.khronos.org/OpenGL/extensions/{parts[1]}/{parts[1]}_{parts[2]}.txt'
else: else:
@ -37,7 +37,7 @@ def vkfeat_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
text = utils.unescape(text) text = utils.unescape(text)
has_explicit_title, title, ext = split_explicit_title(text) has_explicit_title, title, ext = split_explicit_title(text)
full_url = f'https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-{ext}' full_url = f'https://docs.vulkan.org/spec/latest/chapters/features.html#features-{ext}'
pnode = nodes.reference(title, title, internal=False, refuri=full_url) pnode = nodes.reference(title, title, internal=False, refuri=full_url)
return [pnode], [] return [pnode], []

View file

@ -444,3 +444,101 @@ the following line where the other BoardConfig files are included
Then we are set to continue following the official instructions to Then we are set to continue following the official instructions to
build the cuttlefish target and run it in the cuttlefish emulator. build the cuttlefish target and run it in the cuttlefish emulator.
.. _android-android-system-properties:
Android System Properties
-------------------------
Android (generally) uses system properties rather than
:doc:`environment variables <envvars>` to control Mesa/Gallium behavior,
although there are some exceptions to this for
:ref:`Android app developers <envvars-android-app-developers>`.
With the ``os_get_option()`` helper, the environment variable names are
automatically translated to the corresponding system property name by:
- converting UPPER case to lower case
- replacing ``_`` with ``.``
- adding the ``mesa.`` prefix to ``<property_name>`` if it's not present already
- and then querying the system property name with the following prefixes, in
order:
#. ``debug.<property_name>``
#. ``vendor.<property_name>``
#. ``<property_name>``
For example, ``LIBGL_DEBUG`` will be queried as:
#. ``debug.mesa.libgl.debug``
#. ``vendor.mesa.libgl.debug``
#. ``mesa.libgl.debug``
This allows for default ``vendor.`` / ``mesa.`` properties to be overridden by
users at run-time with ``debug.`` values.
System properties can be queried with:
.. code-block:: sh
$ adb shell getprop <property_name>
System properties can be set with:
.. code-block:: sh
$ adb shell setprop <property_name> <value>
For example:
.. code-block:: sh
$ adb shell setprop debug.mesa.libgl.debug verbose
$ adb shell getprop debug.mesa.libgl.debug
verbose
NOTE: Any driver that wishes to support Android system properties should replace
any calls to ``getenv()`` with ``os_get_option()``, which automatically handles
both environment variables and Android system properties.
.. _envvars-android-app-developers:
Android App Developers
^^^^^^^^^^^^^^^^^^^^^^
Android app developers have two options to control Mesa behavior on un-rooted
devices:
- Environment variables, using the wrap shell script
- https://developer.android.com/ndk/guides/wrap-script.html
- ``debug.<property_name>`` system properties
App developers with access to rooted devices can also use ``vendor.`` and
``mesa.`` values, although ``debug.`` prefixes are recommended.
While the system properties values are used for each app invocation once set,
they do not persist across device reboots.
Android Driver Developers
^^^^^^^^^^^^^^^^^^^^^^^^^
Android driver developers have three options to control Mesa behavior on
devices with ``root`` access:
#. ``debug.<property_name>``
#. ``vendor.<property_name>``
#. ``<property_name>``
The ``debug.`` prefix can be used without ``root``, while ``vendor.`` and
``mesa.`` prefixes require ``root``.
Any of the values can be set in the device's makefile to control Mesa
behavior, although ``vendor.`` and ``mesa.`` are typically used for this
purpose.
While the system properties values are used for each app invocation once set
at runtime, they do not persist across device reboots if configured with
``setprop``.

View file

@ -122,9 +122,8 @@ Enable the site and restart nginx:
# Second download should be cached. # Second download should be cached.
wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo-v2.trace wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo-v2.trace
Now, set ``download-url`` in your ``traces-*.yml`` entry to something like The trace runner script automatically sets the caching proxy, so there's no
``http://caching-proxy/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public`` need to modify anything in the Mesa CI YAML files.
and you should have cached downloads for traces. Add it to Add ``LAVA_HTTP_CACHE_URI=http://localhost/cache/?uri=`` to your ``config.toml``
``FDO_HTTP_CACHE_URI=`` in your ``config.toml`` runner environment lines and you runner environment lines and you can use it for cached artifact downloads
can use it for cached artifact downloads instead of going all the way to instead of going all the way to freedesktop.org on each job.
freedesktop.org on each job.

View file

@ -573,7 +573,7 @@ A typical work flow would be:
.. code-block:: sh .. code-block:: sh
nc -lvup $PORT | stdbuf -o0 xxd -pc -c 4 | awk -Wposix '{printf("%u:%u\n", "0x" $0, a[$0]++)}' nc -lkvup $PORT | stdbuf -o0 xxd -pc -c 4 | awk -Wposix '{printf("%u:%u\n", "0x" $0, a[$0]++)}'
- Start capturing command stream; - Start capturing command stream;
- Replay the hanging trace with: - Replay the hanging trace with:

View file

@ -0,0 +1,107 @@
KosmicKrisp
###########
KosmicKrisp is a Vulkan conformant implementation for macOS on Apple Silicon
hardware. It is implemented on top of Metal 4, which requires macOS 26 and up.
No iOS support is present as of now. However, iOS was taken into consideration
during development to support A14 Bionic GPUs and upwards.
Building
********
The following build instructions assume Homebrew as the package manager to
install dependencies. Homebrew homepage https://brew.sh/
Homebrew install command line:
.. code-block:: sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Terminal restart is recommended after Homebrew installation.
Requirements
============
- Xcode and Xcode command line tools
- Homebrew packages
- meson (1.9.1+, can also be installed as a Python package)
- cmake
- pkg-config
- libclc
- llvm
- spirv-llvm-translator
Due to potential conflicts, Homebrew will not add `llvm` to the path. To add
`llvm` to future terminal instances:
.. code-block:: sh
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
To add `llvm` to current terminal instance:
.. code-block:: sh
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
- Python
- Python packages
- mako
- packaging
- pyyaml
- meson (1.9.1+, if not installed through Homebrew)
Since Homebrew manages the Python environment, it is encouraged to create a
Python virtual environment and install all packages in that environment. To
create a Python virtual environment (e.g. ``$HOME/venv_mesa``):
.. code-block:: sh
python3 -m venv $HOME/venv_mesa
To enable a Python virtual environment:
.. code-block:: sh
source $HOME/venv_mesa/bin/activate
Build instructions
==================
Out of tree build directory is recommended.
Once all requirements have been installed, the following command line can be
used to create a debug build:
.. code-block:: sh
meson setup <path/to/mesa> --buildtype=debug -Dplatforms=macos -Dvulkan-drivers=kosmickrisp -Dgallium-drivers= -Dopengl=false -Dzstd=disabled
Environment variables
*********************
KosmicKrisp specific environment variables:
- ``MESA_KK_DEBUG``: Set to ``msl`` to log all generated Metal Shading Language (MSL) shaders.
- ``MESA_KK_GPU_CAPTURE``: Starts Metal capture at device create and ends it at device destroy. Set to ``1`` to activate.
- ``MESA_KK_GPU_CAPTURE_DIRECTORY``: Metal capture will be saved to the specified directory. Defaults to Xcode if no path is provided.
- ``MESA_KK_DISABLE_WORKAROUNDS``: Provide ``all`` to disable all workarounds. Otherwise, provide a comma separated list to disable wanted workarounds e.g. ``1,3,4`` to disable workaround 1, 3 and 4.
Metal workarounds
*****************
Different workarounds are applied throughout the project to avoid issues such
as:
- Metal API and Vulkan API discrepancies
- Metal bugs
- MSL compiler bugs
- MSL compiler crashes
These workarounds can be found in:
.. toctree::
:maxdepth: 1
kosmickrisp/workarounds

View file

@ -0,0 +1,200 @@
KosmicKrisp workarounds
#######################
This file documents the relevant issues found in either Metal, the MSL
compiler or any other component we have no control over that needed to be
worked around to accomplish Vulkan conformance.
All workarounds must be documented here and no code comment info should be
provided other than the name ``KK_WORKAROUND_#``.
Once a workaround was removed from the code, the code comment will be
removed but the documentation here will be kept.
Template
========
Use the following template to create documentation for a new workaround:
.. code-block::
KK_WORKAROUND_#
---------------
| macOS version:
| Metal ticket:
| Metal ticket status:
| CTS test failure/crash:
| Comments:
| Log:
``macOS version`` needs to have the OS version with which it was found.
``Metal ticket`` needs to be either the Metal ticket number with the GitLab
handle of the user that reported the ticket or ``Unreported``.
``Metal ticket status`` needs to be either ``Fixed in macOS # (Build hash)``,
``Waiting resolution`` or empty if unreported. If Apple reported that the issue
was fixed, but no user has verified the fix, append ``[Untested]``.
``CTS test failure/crash`` (remove ``failure`` or ``crash`` based on test
behavior) needs to be the name of the test or test family the issue can be
reproduced with.
``Comments`` needs to include as much information on the issue and how the
workaround fixes it.
``Log`` needs to have the dates (yyyy-mm-dd, the only correct date format) with
info on what was updated.
Workarounds
===========
KK_WORKAROUND_6
---------------
| macOS version: 26.0.1
| Metal ticket: Not reported
| Metal ticket status:
| CTS test failure: ``dEQP-VK.spirv_assembly.instruction.*.float16.opcompositeinsert.*``
| Comments:
Metal does not respect its own Memory Coherency Model (MSL spec 4.8). From
the spec:
``By default, memory in the device address space has threadgroup coherence.``
If we have a single thread compute dispatch so that we do (simplified version):
.. code-block:: c
for (...) {
value = ssbo_data[0]; // ssbo_data is a device buffer
...
ssbo_data[0] = new_value;
}
``ssbo_data[0]`` will not correctly store/load the values so the value
written in iteration 0, will not be available in iteration 1. The workaround
to this issue is marking the device memory pointer through which the memory
is accessed as coherent so that the value is stored and loaded correctly.
Hopefully this does not affect performance much.
| Log:
| 2025-12-08: Workaround implemented and reported to Apple
KK_WORKAROUND_5
---------------
| macOS version: 26.0.1
| Metal ticket: Not reported
| Metal ticket status:
| CTS test failure: ``dEQP-VK.fragment_operations.early_fragment.discard_no_early_fragment_tests_depth``
| Comments:
Fragment shaders that have side effects (like writing to a buffer) will be
prematurely discarded if there is a ``discard_fragment`` that will always
execute. To work around this, we just make the discard "optional" by moving
it inside a run time conditional that will always be true (such as is the
fragment a helper?). This tricks the MSL compiler into not optimizing it into
a premature discard.
| Log:
| 2025-12-01: Workaround implemented
KK_WORKAROUND_4
---------------
| macOS version: 26.0.1
| Metal ticket: FB21124215 (@aitor)
| Metal ticket status: Waiting resolution
| CTS test failure: ``dEQP-VK.draw.renderpass.shader_invocation.helper_invocation*`` and few others
| Comments:
``simd_is_helper_thread()`` will always return true if the shader was started
as a non-helper thread, even after ``discard_fragment()`` is called. The
workaround is to have a variable tracking this state and update it when the
fragment is discarded. This issue is present in M1 and M2 chips.
| Log:
| 2025-11-22: Workaround implemented and reported to Apple
KK_WORKAROUND_3
---------------
| macOS version: 15.4.x
| Metal ticket: FB20113490 (@aitor)
| Metal ticket status: Waiting resolution
| CTS test failure: ``dEQP-VK.subgroups.ballot_other.*.subgroupballotfindlsb``
| Comments:
``simd_is_first`` does not seem to behave as documented in the MSL
specification. The following code snippet misbehaves:
.. code-block:: c
if (simd_is_first())
temp = 3u;
else
temp = simd_ballot(true); /* <- This will return all active threads... */
The way to fix this is by changing the conditional to:
.. code-block:: c
if (simd_is_first() && (ulong)simd_ballot(true))
temp = 3u;
else
temp = (ulong)simd_ballot(true);
| Log:
| 2025-09-09: Workaround implemented and reported to Apple
KK_WORKAROUND_2
---------------
| macOS version: 15.4.x
| Metal ticket: FB21065475 (@aitor)
| Metal ticket status: Waiting resolution
| CTS test crash: ``dEQP-VK.graphicsfuzz.cov-nested-loops-never-change-array-element-one`` and ``dEQP-VK.graphicsfuzz.disc-and-add-in-func-in-loop``
| Comments:
We need to loop to infinite since MSL compiler crashes if we have something
like (simplified version):
.. code-block:: c
while (true) {
if (some_conditional) {
break_loop = true;
} else {
break_loop = false;
}
if (break_loop) {
break;
}
}
The issue I believe is that ``some_conditional`` wouldn't change the value no
matter in which iteration we are (something like fetching the same value from
a buffer) and the MSL compiler doesn't seem to like that much to the point it
crashes.
The implemented solution is to change the ``while(true)`` loop with
``for (uint64_t no_crash = 0u; no_crash < UINT64_MAX; ++no_crash)``, which
tricks the MSL compiler into believing we are not doing an infinite loop
(wink wink).
| Log:
| 2025-09-08: Workaround implemented
KK_WORKAROUND_1
---------------
| macOS version: 15.4.x
| Metal ticket: FB17604106 (@aitor)
| Metal ticket status: [Untested] Fixed in macOS 26 Beta (25A5279m)
| CTS test crash: ``dEQP-VK.glsl.indexing.tmp_array.vec3_dynamic_loop_write_dynamic_loop_read_fragment``
| Comments:
Uninitialized local scratch variable causes the MSL compiler to crash.
Initialize scratch to avoid issue.
| Log:
| 2025-05-14: Workaround implemented and reported to Apple
| 2025-06-14: Apple reported back saying it is now fixed in macOS 26 Beta (Build 25A5279m)

View file

@ -6,10 +6,9 @@ NVK is a Vulkan driver for NVIDIA GPUs.
Hardware support Hardware support
---------------- ----------------
NVK currently supports Maxwell (some GTX 700 and 800 series, most 900 NVK currently supports Kepler (GeForce 600 and 700 series) and later GPUs up to
series) and later GPUs up to and including Ada (RTX 4000 series). Support and including Ada (RTX 4000 series), as well as consumer Blackwell GPUs
for Kepler (GeForce 600 and 700 series) and Blackwell (RTX 5000 series) is (RTX 5000 series).
currently in-progress but incomplete.
Conformance status: Conformance status:
------------------- -------------------
@ -23,7 +22,7 @@ OpenGL support through Zink:
Starting with Mesa 25.1, all Turing (RTX 2000 series and GTX 16xx) and Starting with Mesa 25.1, all Turing (RTX 2000 series and GTX 16xx) and
later GPUs will get NVK+Zink as their OpenGL implementation by default later GPUs will get NVK+Zink as their OpenGL implementation by default
instead of the old Nouveau GL driver. NVK+Zink is a conformant OpenGL 4.6 instead of the old Nouveau GL driver. NVK+Zink is a conformant OpenGL 4.6
implementation. implementation. The Nouveau GL driver is no longer supported on these cards.
Kernel requirements Kernel requirements
------------------- -------------------
@ -63,10 +62,20 @@ specific to NVK:
Waits for submit to complete before continuing Waits for submit to complete before continuing
``zero_memory`` ``zero_memory``
Zeros all VkDeviceMemory objects upon creation Zeros all VkDeviceMemory objects upon creation
``trash_memory``
Write repeating nonzero patterns to client memory allocations
``vm`` ``vm``
Logs VM binds and unbinds Logs VM binds and unbinds
``no_cbuf`` ``no_cbuf``
Disables automatic promotion of UBOs to constant buffers Disables automatic promotion of UBOs to constant buffers
``edb_bview``
Forces the driver to use the VK_EXT_descriptor_buffer path for buffer
views.
``gart``
Forces all memory to be allocated from system RAM (GART)
``coherent``
Forces all memory maps to be coherent with the CPU caches. This only
applies to Tegra devices.
.. envvar:: NVK_I_WANT_A_BROKEN_VULKAN_DRIVER .. envvar:: NVK_I_WANT_A_BROKEN_VULKAN_DRIVER
@ -75,10 +84,10 @@ specific to NVK:
poorly tested or completely broken. This is intended for developer use poorly tested or completely broken. This is intended for developer use
only. only.
Hardware Documentation Developer info
---------------------- --------------
What little documentation we have can be found in the `NVIDIA open-gpu-doc .. toctree::
repository <https://github.com/NVIDIA/open-gpu-doc>`__. The majority of :glob:
our documentation comes in the form of class headers which describe the
class state registers. nvk/*

View file

@ -0,0 +1,134 @@
External Hardware Documentation and Resources
=============================================
Information about hardware behavior comes from a mix of official and
reverse-engineered sources.
Command buffers
^^^^^^^^^^^^^^^
* `NVIDIA open-gpu-doc repository`_ is official documentation from NVIDIA that
has been released to the public. The majority of this documentation comes in
the form of class headers which describe the class state registers.
* `NVIDIA open-gpu-kernel-modules repository`_ is the open-source kernel mode
driver that NVIDIA ships on Turing+ GPUs with GSP. The code here can provide
examples of how to use some hardware features. If open-gpu-doc is missing a
class header, sometimes there will be one here.
* Reverse-engineered command names from `envytools`_ are available in mesa
under eg. ``src/gallium/drivers/nouveau/nvc0/nvc0_3d.xml.h``. These are no
longer updated. nvk instead uses the open-gpu-doc headers
* `envyhooks`_ is the modern way to dump command sequences from the proprietary
driver
* ``nv_push_dump`` is part of mesa and can disassemble command sequences (build
with ``-D tools=nouveau``, run ``src/nouveau/headers/nv_push_dump`` from the
build dir)
.. _NVIDIA open-gpu-doc repository: https://github.com/NVIDIA/open-gpu-doc
.. _NVIDIA open-gpu-kernel-modules repository: https://github.com/NVIDIA/open-gpu-kernel-modules
.. _envyhooks: https://gitlab.freedesktop.org/nouveau/envyhooks
Shader ISA
^^^^^^^^^^
* `NVIDIA PTX documentation`_ is NVIDIA documentation for CUDA's
intermediate representation. We don't use PTX directly, but this often has
hints about how underlying hardware instructions work. For example, the PTX
`redux` instruction is pretty much identical to the hardware instruction of
the same name.
* `CUDA Binary Utilities`_ is documentation for CUDA's disassembler,
`nvdisasm`. It includes a brief description of most hardware instructions.
There's also an `older version`_ that has older architectures (Kepler through
Volta).
* Kuter Dinel has reverse-engineered instruction encodings for the `Hopper
ISA`_ and `Ada ISA`_ which are autogenerated from his `nv_isa_solver`_
project.
* `nv-shader-tools`_ has some additional tools for disassembling and fuzzing
the hardware ISA
* Mel has dumped a `list of avaiable instructions`_ and their opcodes on recent
architectures by scraping nvdisasm error messages.
* The `Volta whitepaper`_ section "Independent Thread Scheduling" has an
overview of the control flow model used on Volta+ GPUs.
* `Dissecting the NVidia Turing T4 GPU via Microbenchmarking`_ has
reverse-engineered info about the Turing instruction encoding. See especially
section "2.1 Control information" for an overview of compiler-inserted delays
and waits on Maxwell and later.
* `Analyzing Modern NVIDIA GPU cores`_ has additional reverse-engineered info
about the semantics of compiler-inserted delays and waits.
* `Control Flow Management in Modern GPUs`_ has more detail about control flow
reconvergence on Volta+
* `maxas`_ has some reverse-engineered info on the Maxwell ISA
* `asfermi`_ has some reverse-engineered info on the older Fermi ISA
* Red Hat has some NDA'd documentation on instruction latencies from NVIDIA.
Bother karolherbst or airlied on irc if you're missing a latency class for an
instruction on recent architectures.
* Behavior of instructions are tested using the hardware tests in
``src/nouveau/compiler/nak/hw_tests.rs`` and the corresponding ``Foldable``
implementations in ``src/nouveau/compiler/nak/ir.rs`` (build with ``-D
build-tests=true`` and run ``src/nouveau/compiler/nak hw_tests`` from the
build dir)
* NAK's instruction encodings are tested against nvdisasm using
``src/nouveau/compiler/nak/nvdisasm_tests.rs`` (build with ``-D
build-tests=true`` and run ``src/nouveau/compiler/nak nvdisasm_tests`` from
the build dir)
* The old GL driver's compiler, under ``src/gallium/drivers/nouveau/codegen``,
has some information. This is especially useful for graphics-only
instructions, which are often not covered by other sources.
* `Compiler explorer`_ is a convenient tool to see what assembly NVIDIA
generates for a given CUDA program.
.. _NVIDIA PTX documentation: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html
.. _CUDA Binary Utilities: https://docs.nvidia.com/cuda/cuda-binary-utilities/index.html#instruction-set-reference
.. _older version: https://docs.nvidia.com/cuda/archive/11.8.0/cuda-binary-utilities/index.html#instruction-set-ref
.. _Hopper ISA: https://kuterdinel.com/nv_isa/
.. _Ada ISA: https://kuterdinel.com/nv_isa_sm89/
.. _nv_isa_solver: https://github.com/kuterd/nv_isa_solver
.. _nv-shader-tools: https://gitlab.freedesktop.org/nouveau/nv-shader-tools
.. _list of avaiable instructions: https://gitlab.freedesktop.org/mhenning/re/-/tree/main/opclass?ref_type=heads
.. _Volta whitepaper: https://images.nvidia.com/content/volta-architecture/pdf/volta-architecture-whitepaper.pdf
.. _Dissecting the NVidia Turing T4 GPU via Microbenchmarking: https://arxiv.org/pdf/1903.07486
.. _Analyzing Modern NVIDIA GPU cores: https://arxiv.org/pdf/2503.20481
.. _Control Flow Management in Modern GPUs: https://arxiv.org/pdf/2407.02944
.. _maxas: https://github.com/NervanaSystems/maxas/wiki
.. _asfermi: https://github.com/hyqneuron/asfermi/wiki
.. _Compiler explorer: https://godbolt.org/z/1jrfhq5G7
Misc
^^^^
* `envytools`_ has reverse-engineered documentation for maxwell and earlier
hardware.
* The nvidia architecture whitepapers give a basic overview of what has changed
between hardware revisions. See eg. the `Blackwell whitepaper`_
* The nvidia architecture tuning guides often mention how details of a hardware
generation has changed, often with information about the memory subsystem or
occupancy. See eg. the `Blackwell tuning guide`_
* `The Nouveau wiki's CodeNames page`_ is useful for mapping NVIDIA marketing
names to engineering names
* `Matching CUDA arch and CUDA gencode for various NVIDIA architectures`_ has a
useful table comparing SM versions to engineering names
.. _envytools: https://envytools.readthedocs.io/en/latest/hw/index.html
.. _Blackwell whitepaper: https://images.nvidia.com/aem-dam/Solutions/geforce/blackwell/nvidia-rtx-blackwell-gpu-architecture.pdf
.. _Blackwell tuning guide: https://docs.nvidia.com/cuda/blackwell-tuning-guide/index.html
.. _The Nouveau wiki's CodeNames page: https://nouveau.freedesktop.org/CodeNames.html
.. _Matching CUDA arch and CUDA gencode for various NVIDIA architectures: https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/

View file

@ -0,0 +1,126 @@
Hardware docs
=============
Command buffers
---------------
Command format
^^^^^^^^^^^^^^
Each command sent to the GPU contains a method and some data. Method names are
documented in corresponding header files copied from NVIDIA, eg. the fermi
graphics methods are in src/nouveau/headers/nvidia/classes/cl9097.h
P_IMMD
""""""
A lot of the time, you will want to issue a single method with its data, which
can be done with P_IMMD::
P_IMMD(p, NV9097, WAIT_FOR_IDLE, 0);
P_IMMD will emit either a single `immediate-data method`_, which takes a single
word, or a pair of words that's equivalent to P_MTHD + the provided data. Code
must count P_IMMD as possibly 2 words as a result.
.. _immediate-data method: https://github.com/NVIDIA/open-gpu-doc/blob/87ba53e0c385285a3aa304b864dccb975a9a0dd4/manuals/turing/tu104/dev_ram.ref.txt#L1214
P_MTHD
""""""
`P_MTHD`_ is a convenient way to execute multiple consecutive methods without
repeating the method header. For example, the code::
P_MTHD(p, NV9097, SET_REPORT_SEMAPHORE_A);
P_NV9097_SET_REPORT_SEMAPHORE_A(p, addr >> 32);
P_NV9097_SET_REPORT_SEMAPHORE_B(p, addr);
P_NV9097_SET_REPORT_SEMAPHORE_C(p, value);
generates four words - one word for the method header (defaulting to 1INC) and
then the next three words for data. 1INC will automatically increment the method
id by one word for each data value, which is why the example can advance from
SET_REPORT_SEMAPHORE_A to B to C.
.. _P_MTHD: https://github.com/NVIDIA/open-gpu-doc/blob/87ba53e0c385285a3aa304b864dccb975a9a0dd4/manuals/turing/tu104/dev_ram.ref.txt#L1042
P_0INC
""""""
`0INC`_ will issue the same method repeatedly for each following data word.
.. _0INC: https://github.com/NVIDIA/open-gpu-doc/blob/87ba53e0c385285a3aa304b864dccb975a9a0dd4/manuals/turing/tu104/dev_ram.ref.txt#L1096
P_1INC
""""""
`1INC`_ will increment after one word and then issue the following method
repeatedly. For example, the code::
P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_SET_PRIV_REG));
P_INLINE_DATA(p, 0);
P_INLINE_DATA(p, BITFIELD_BIT(3));
issues one NV9097_CALL_MME_MACRO command, then increments the method and issues
two NV9097_CALL_MME_DATA commands.
.. _1INC: https://github.com/NVIDIA/open-gpu-doc/blob/87ba53e0c385285a3aa304b864dccb975a9a0dd4/manuals/turing/tu104/dev_ram.ref.txt#L1149
Execution barriers
^^^^^^^^^^^^^^^^^^
Commands within a command buffer can be synchronized in a few different ways.
* Explicit WFI - Idles all engines before executing the next command eg. via
`NVA16F_WFI` or `NV9097_WAIT_FOR_IDLE`
* Semaphores - Delay execution based on values in a memory location. See
`open-gpu-doc on semaphores`_
* A subchannel switch - Causes the hardware to execute an implied WFI
.. _open-gpu-doc on semaphores: https://github.com/NVIDIA/open-gpu-doc/blob/master/manuals/turing/tu104/dev_pbdma.ref.txt#L3231
Subchannel switches
"""""""""""""""""""
A subchannel switch occurs when the hardware receives a command for a different
subchannel than the one that it's currently executing. For example, if the
hardware is currently executing commands on the 3D engine (`SUBC_NV9097 == 0`), a
command executed on the compute engine (`SUBC_NV90C0 == 1`) will cause a
subchannel switch. Host methods (class \*6F) are an exception to this - they can
be issued to any subchannel and will not trigger a subchannel switch
[#fhostsubcswitch]_ [#foverlapnvk]_.
Subchannel switches act the same way that an explicit WFI does - they fully idle
the channel before issuing commands to the next engine [#fnsight]_
[#foverlapnvk]_.
This works the same on Blackwell. Some NVIDIA documentation contradicts this:
"On NVIDIA Blackwell Architecture GPUs and newer, subchannel switches do not
occur between 3D and compute workloads"[#fnsight]_. This documentation appears
to be wrong or inapplicable for some reason - tests do not reproduce this
behavior [#foverlapnvk]_ [#foverlapprop]_, and the blob does not change its
event implementation for blackwell [#feventprop]_.
.. [#fnsight] https://docs.nvidia.com/nsight-graphics/UserGuide/index.html#subchannel-switch-overlay
.. [#foverlapnvk] Based on reverse engineering by running
https://gitlab.freedesktop.org/mhenning/re/-/tree/main/vk_test_overlap_exec
under nvk, possibly with alterations to the way nvk generates commands for
pipeline barriers.
.. [#foverlapprop] By running
https://gitlab.freedesktop.org/mhenning/re/-/tree/main/vk_test_overlap_exec
under the proprietary driver and examining the main output (eg. execution
overlaps without pipeline barriers)
.. [#feventprop] For example, the event commands generated here only wait on a
single engine
https://gitlab.freedesktop.org/mhenning/re/-/blob/6ce8c860da65fbf2ab26d124d25f907dea2cf33a/vk_event/blackwell.out#L20612-20793
.. [#fhostsubcswitch] https://github.com/NVIDIA/open-gpu-doc/blob/87ba53e0c385285a3aa304b864dccb975a9a0dd4/manuals/turing/tu104/dev_ram.ref.txt#L1009
Copy engine
^^^^^^^^^^^
The copy engine's `PIPELINED` mode allows a new transfer to start before the
previous transfer finishes, while `NON_PIPELINED` acts as an execution barrier
between the current copy and the previous one [#fpipelined]_.
.. [#fpipelined] https://github.com/NVIDIA/open-gpu-kernel-modules/blob/2b436058a616676ec888ef3814d1db6b2220f2eb/src/common/sdk/nvidia/inc/ctrl/ctrl0050.h#L75-L83

View file

@ -0,0 +1,71 @@
Benchmarking Panfrost
=====================
Obtaining reproducible benchmark timings can sometimes be tricky on Mali
based SoCs. There are a number of things that can be done to make the timings
more predictable.
Make sure the device is actively cooled (to eliminate thermal throttling)
-------------------------------------------------------------------------
This isn't strictly speaking necessary, if you use low enough frequencies
in the steps below, but it is recommended.
Fix the GPU frequency
---------------------
If power management is allowed to vary the GPU frequency, this will lead to
uncertainty in benchmark figures, particularly for shorter benchmark runs.
On most systems, the GPU frequency can be set to a fixed value via a command
like the following (run it as root, sudo alone won't allow the redirection):
.. code-block:: sh
cat /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/min_freq > /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/max_freq
This forces the GPU to always use its minimum frequency. You could reverse
`min_freq` and `max_freq` to fix it to its maximum frequency, if your system
is adequately cooled.
Fix the CPU frequency
---------------------
It is easy to overlook the role the CPU plays in driver performance. To set
its frequency to a fixed value, install the `linux-cpupower` package and
run something like:
.. code-block:: sh
sudo cpupower frequency-info
sudo cpupower frequency-set -d 1.20
sudo cpupower frequency-set -u 1.20
sudo cpupower frequency-info
Adjust the numbers based on what the board actually supports (seen in
the first `frequency-info`. It is best to choose fairly low settings
unless you're confident of the board's cooling.
Pin the benchmark program to a particular core
----------------------------------------------
This is especially important on devices with a big.LITTLE architecture, where
having the benchmark be scheduled on a different kind of core can drastically
change the performance. But even without this, variations in cache residency
and scheduling of kernel tasks can lead to changes in benchmark timing.
Experience shows that using a little core for the benchmark program
tends to give more reproducible results (probably because they have smaller
caches, and also are less likely to be scheduled to by the kernel).
However, forcing the benchmark to run on a little core could change the
bottleneck from GPU to CPU, so watch out for that.
Pinning a task to a particular core is done with the `taskset` command. An
example for the Rock5b (rk3588) board is:
.. code-block:: sh
taskset 0x04 glmark2-es2-wayland
Replace `0x04` with an appropriate mask for your board, and
`glmark2-es2-wayland` with the benchmark program to be used.

View file

@ -1,4 +1,3 @@
drm-shim drm-shim
======== ========

View file

@ -1,4 +1,3 @@
U-interleaved tiling U-interleaved tiling
==================== ====================

View file

@ -43,6 +43,8 @@ Product Series B.V.N.C
GX6250 Series 6XT 4.45.2.58 GX6250 Series 6XT 4.45.2.58
GX6650 Series 6XT 4.46.6.62 GX6650 Series 6XT 4.46.6.62
G6110 Series 6XE 5.9.1.46 G6110 Series 6XE 5.9.1.46
GE7800 Series 7XE 15.5.1.64
GE8300 Series 8XE 22.67.54.30
GE8300 Series 8XE 22.68.54.30 GE8300 Series 8XE 22.68.54.30
GE8300 Series 8XE 22.102.54.38 GE8300 Series 8XE 22.102.54.38
BXE-2-32 B-Series 36.29.52.182 BXE-2-32 B-Series 36.29.52.182

View file

@ -5,6 +5,14 @@ Normally, no environment variables need to be set. Most of the
environment variables used by Mesa/Gallium are for debugging purposes, environment variables used by Mesa/Gallium are for debugging purposes,
but they can sometimes be useful for debugging end-user issues. but they can sometimes be useful for debugging end-user issues.
Android System Properties
-------------------------
Android (generally) uses system properties rather than environment variables to
control Mesa/Gallium behavior, although there are some exceptions to this. See
:ref:`Android System Properties <android-android-system-properties>` for
details on naming and how to set and get system property values.
LibGL environment variables LibGL environment variables
--------------------------- ---------------------------
@ -90,6 +98,10 @@ Core Mesa environment variables
specifies a file name for logging all errors, warnings, etc., rather specifies a file name for logging all errors, warnings, etc., rather
than stderr than stderr
.. envvar:: MESA_LOG_PREFIX
specifies what to to include in the log prefix (linux only) - default is ``tag,level``
.. envvar:: MESA_EXTENSION_OVERRIDE .. envvar:: MESA_EXTENSION_OVERRIDE
can be used to enable/disable extensions. A value such as can be used to enable/disable extensions. A value such as
@ -345,6 +357,11 @@ Core Mesa environment variables
lost device. This is extremely useful when testing as it prevents the lost device. This is extremely useful when testing as it prevents the
test suite from continuing on with a lost device. test suite from continuing on with a lost device.
.. envvar:: MESA_VK_VALIDATE_SHADER_BINARIES
enables extra validation of shader and pipeline binaries to ensure
consistency of driver binaries.
.. envvar:: MESA_VK_ENABLE_SUBMIT_THREAD .. envvar:: MESA_VK_ENABLE_SUBMIT_THREAD
for Vulkan drivers which support real timeline semaphores, this forces for Vulkan drivers which support real timeline semaphores, this forces
@ -589,6 +606,9 @@ Intel driver environment variables
disable fast clears disable fast clears
``noccs`` ``noccs``
disable lossless color compression disable lossless color compression
``no-resource-barrier``
disable RENDER_BARRIER instruction usage by falling back to
PIPE_CONTROL
``optimizer`` ``optimizer``
dump shader assembly to files at each optimization pass and dump shader assembly to files at each optimization pass and
iteration that make progress (Gfx < 9) iteration that make progress (Gfx < 9)
@ -1257,32 +1277,6 @@ clc environment variables
- ``dump_spirv`` Dumps all compiled, linked and specialized SPIR-Vs - ``dump_spirv`` Dumps all compiled, linked and specialized SPIR-Vs
- ``verbose`` Enable debug logging of clc code - ``verbose`` Enable debug logging of clc code
Nine frontend environment variables
-----------------------------------
.. envvar:: D3D_ALWAYS_SOFTWARE
an integer, which forces Nine to use the CPU instead of GPU acceleration.
.. envvar:: NINE_DEBUG
a comma-separated list of named flags that do debugging things.
Use ``NINE_DEBUG=help`` to print a list of available options.
.. envvar:: NINE_FF_DUMP
a boolean, which dumps shaders generated by a fixed function (FF).
.. envvar:: NINE_SHADER
a comma-separated list of named flags, which do alternate shader handling.
Use ``NINE_SHADER=help`` to print a list of available options.
.. envvar:: NINE_QUIRKS
a comma-separated list of named flags that do various things.
Use ``NINE_DEBUG=help`` to print a list of available options.
Softpipe driver environment variables Softpipe driver environment variables
------------------------------------- -------------------------------------
@ -1397,6 +1391,8 @@ RADV driver environment variables
dump the BO history to /tmp/radv_bo_history.log after each BO operations dump the BO history to /tmp/radv_bo_history.log after each BO operations
``checkir`` ``checkir``
validate the LLVM IR before LLVM compiles the shader validate the LLVM IR before LLVM compiles the shader
``dumpibs``
dump IBs (command streams)
``dump_trap_handler`` ``dump_trap_handler``
dump the trap handler shader dump the trap handler shader
``epilogs`` ``epilogs``
@ -1413,9 +1409,6 @@ RADV driver environment variables
Print image info Print image info
``info`` ``info``
show GPU-related information show GPU-related information
``invariantgeom``
Mark geometry-affecting outputs as invariant. This works around a common
class of application bugs appearing as flickering. (deprecated)
``metashaders`` ``metashaders``
dump internal meta shaders dump internal meta shaders
``noatocdithering`` ``noatocdithering``
@ -1432,8 +1425,6 @@ RADV driver environment variables
disable Delta Color Compression (DCC) on images disable Delta Color Compression (DCC) on images
``nodisplaydcc`` ``nodisplaydcc``
disable Delta Color Compression (DCC) on displayable images disable Delta Color Compression (DCC) on displayable images
``nodynamicbounds``
do not check OOB access for dynamic descriptors (deprecated)
``noeso`` ``noeso``
disable VK_EXT_shader_object disable VK_EXT_shader_object
``nofastclears`` ``nofastclears``
@ -1452,8 +1443,6 @@ RADV driver environment variables
disable NGG for GFX10 and GFX10.3 disable NGG for GFX10 and GFX10.3
``nonggc`` ``nonggc``
disable NGG culling for GFX10 and GFX10.3 disable NGG culling for GFX10 and GFX10.3
``nongg_gs``
disable NGG GS for GFX10 and GFX10.3 (deprecated)
``nort`` ``nort``
skip executing vkCmdTraceRays and ray queries (RT extensions will still be skip executing vkCmdTraceRays and ray queries (RT extensions will still be
advertised) advertised)
@ -1483,9 +1472,6 @@ RADV driver environment variables
enable register shadowing enable register shadowing
``spirv`` ``spirv``
dump SPIR-V dump SPIR-V
``splitfma``
split application-provided fused multiply-add in geometry stages
(deprecated)
``startup`` ``startup``
display info at startup display info at startup
``syncshaders`` ``syncshaders``
@ -1518,10 +1504,8 @@ RADV driver environment variables
Use bvh4 encoding on GPUs that support bvh8 encoding. Use bvh4 encoding on GPUs that support bvh8 encoding.
``validatevas`` ``validatevas``
Enable tracking of VA ranges for radv_build_is_valid_va. Enable tracking of VA ranges for radv_build_is_valid_va.
``vm``
.. envvar:: RADV_FORCE_FAMILY add a gap between all VA allocations to check for page faults
create a null device to compile shaders without a AMD GPU (e.g. VEGA10)
.. envvar:: RADV_FORCE_VRS .. envvar:: RADV_FORCE_VRS
@ -1569,6 +1553,8 @@ RADV driver environment variables
enable wave64 for ray tracing shaders (GFX10-10.3) enable wave64 for ray tracing shaders (GFX10-10.3)
``sam`` ``sam``
enable optimizations to move more driver internal objects to VRAM. enable optimizations to move more driver internal objects to VRAM.
``sparse``
enable experimental sparse binding and sparse residency on GPUs where we don't support it by default (pre Polaris)
``transfer_queue`` ``transfer_queue``
enable experimental transfer queue support (GFX9+, not yet spec compliant) enable experimental transfer queue support (GFX9+, not yet spec compliant)
``video_decode`` ``video_decode``
@ -1776,8 +1762,8 @@ RadeonSI driver environment variables
Use old-style monolithic shaders compiled on demand Use old-style monolithic shaders compiled on demand
``nooptvariant`` ``nooptvariant``
Disable compiling optimized shader variants. Disable compiling optimized shader variants.
``useaco`` ``usellvm``
Use ACO as shader compiler when possible Use LLVM as shader compiler when possible
``nowc`` ``nowc``
Disable GTT write combining Disable GTT write combining
``check_vm`` ``check_vm``

View file

@ -76,7 +76,7 @@ GL 3.1, GLSL 1.40 --- all DONE: freedreno, nv50, nvc0, r600, radeonsi, llvmpipe,
GL_ARB_copy_buffer (Buffer copying) DONE (v3d, vc4, lima, crocus) GL_ARB_copy_buffer (Buffer copying) DONE (v3d, vc4, lima, crocus)
GL_NV_primitive_restart (Primitive restart) DONE (v3d, crocus) GL_NV_primitive_restart (Primitive restart) DONE (v3d, crocus)
16 vertex texture image units DONE (v3d) 16 vertex texture image units DONE (v3d)
GL_ARB_texture_buffer_object (Texture buffer objs) DONE (v3d) Texture buffer objs DONE (v3d)
GL_ARB_texture_rectangle (Rectangular textures) DONE (v3d, vc4, lima, crocus, etnaviv) GL_ARB_texture_rectangle (Rectangular textures) DONE (v3d, vc4, lima, crocus, etnaviv)
GL_ARB_uniform_buffer_object (Uniform buffer objs) DONE (v3d, crocus) GL_ARB_uniform_buffer_object (Uniform buffer objs) DONE (v3d, crocus)
GL_EXT_texture_snorm (Signed normalized textures) DONE (v3d, crocus, etnaviv/HALTI1) GL_EXT_texture_snorm (Signed normalized textures) DONE (v3d, crocus, etnaviv/HALTI1)
@ -108,7 +108,7 @@ GL 3.3, GLSL 3.30 --- all DONE: freedreno, nv50, nvc0, r600, radeonsi, llvmpipe,
GL_ARB_texture_swizzle DONE (v3d, vc4, panfrost, lima, etnaviv/HALTI0) GL_ARB_texture_swizzle DONE (v3d, vc4, panfrost, lima, etnaviv/HALTI0)
GL_ARB_timer_query DONE (panfrost, v3d) GL_ARB_timer_query DONE (panfrost, v3d)
GL_ARB_instanced_arrays DONE (etnaviv/HALTI2, v3d, panfrost) GL_ARB_instanced_arrays DONE (etnaviv/HALTI2, v3d, panfrost)
GL_ARB_vertex_type_2_10_10_10_rev DONE (v3d, panfrost) GL_ARB_vertex_type_2_10_10_10_rev DONE (v3d, panfrost, etnaviv/HALTI2)
GL 4.0, GLSL 4.00 --- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, virgl, zink, d3d12, iris, crocus/gen7+, asahi GL 4.0, GLSL 4.00 --- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, virgl, zink, d3d12, iris, crocus/gen7+, asahi
@ -206,7 +206,7 @@ GL 4.4, GLSL 4.40 -- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, v
- input/output block locations DONE - input/output block locations DONE
GL_ARB_multi_bind DONE (all drivers) GL_ARB_multi_bind DONE (all drivers)
GL_ARB_query_buffer_object DONE (freedreno/a6xx) GL_ARB_query_buffer_object DONE (freedreno/a6xx)
GL_ARB_texture_mirror_clamp_to_edge DONE (freedreno, nv50, softpipe, v3d, panfrost, crocus) GL_ARB_texture_mirror_clamp_to_edge DONE (freedreno, nv50, softpipe, v3d, panfrost, crocus, svga)
GL_ARB_texture_stencil8 DONE (freedreno, nv50, softpipe, v3d, panfrost, etnaviv/HALTI5) GL_ARB_texture_stencil8 DONE (freedreno, nv50, softpipe, v3d, panfrost, etnaviv/HALTI5)
GL_ARB_vertex_type_10f_11f_11f_rev DONE (freedreno, nv50, softpipe, panfrost, crocus) GL_ARB_vertex_type_10f_11f_11f_rev DONE (freedreno, nv50, softpipe, panfrost, crocus)
GL_NV_shader_atomic_int64 DONE (radeonsi, panfrost/v9+) GL_NV_shader_atomic_int64 DONE (radeonsi, panfrost/v9+)
@ -316,6 +316,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
GL_ARB_sparse_texture DONE (radeonsi/gfx9+, zink) GL_ARB_sparse_texture DONE (radeonsi/gfx9+, zink)
GL_ARB_sparse_texture2 DONE (radeonsi/gfx9+, zink) GL_ARB_sparse_texture2 DONE (radeonsi/gfx9+, zink)
GL_ARB_sparse_texture_clamp DONE (radeonsi/gfx9+, zink) GL_ARB_sparse_texture_clamp DONE (radeonsi/gfx9+, zink)
GL_ARB_texture_buffer_object DONE (freedreno, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, virgl, d3d12, asahi, iris, crocus/gen6+)
GL_ARB_texture_filter_minmax DONE (freedreno/a6xx, iris/gen9+, llvmpipe, nvc0/gm200+, zink) GL_ARB_texture_filter_minmax DONE (freedreno/a6xx, iris/gen9+, llvmpipe, nvc0/gm200+, zink)
GL_ARM_shader_framebuffer_fetch_depth_stencil DONE (llvmpipe) GL_ARM_shader_framebuffer_fetch_depth_stencil DONE (llvmpipe)
GL_EXT_shader_framebuffer_fetch DONE (freedreno/a6xx, iris/gen9+, llvmpipe, panfrost, virgl, zink, asahi, v3d) GL_EXT_shader_framebuffer_fetch DONE (freedreno/a6xx, iris/gen9+, llvmpipe, panfrost, virgl, zink, asahi, v3d)
@ -327,7 +328,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
GL_EXT_memory_object DONE (freedreno, radeonsi, llvmpipe, zink, d3d12, iris, crocus/gen7+) GL_EXT_memory_object DONE (freedreno, radeonsi, llvmpipe, zink, d3d12, iris, crocus/gen7+)
GL_EXT_memory_object_fd DONE (freedreno, radeonsi, llvmpipe, zink, iris, crocus/gen7+) GL_EXT_memory_object_fd DONE (freedreno, radeonsi, llvmpipe, zink, iris, crocus/gen7+)
GL_EXT_memory_object_win32 DONE (zink, d3d12) GL_EXT_memory_object_win32 DONE (zink, d3d12)
GL_EXT_mesh_shader DONE (zink) GL_EXT_mesh_shader DONE (radeonsi/gfx10_3+, zink)
GL_EXT_multisampled_render_to_texture DONE (freedreno/a6xx, panfrost, zink, lima) GL_EXT_multisampled_render_to_texture DONE (freedreno/a6xx, panfrost, zink, lima)
GL_EXT_polygon_offset_clamp DONE (all drivers that support GL_ARB_polygon_offset_clamp) GL_EXT_polygon_offset_clamp DONE (all drivers that support GL_ARB_polygon_offset_clamp)
GL_EXT_render_snorm DONE (freedreno/a6xx, r600, radeonsi, softpipe, llvmpipe, virgl, zink, panfrost/v6+, iris, asahi) GL_EXT_render_snorm DONE (freedreno/a6xx, r600, radeonsi, softpipe, llvmpipe, virgl, zink, panfrost/v6+, iris, asahi)
@ -336,6 +337,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
GL_EXT_semaphore_win32 DONE (zink, d3d12) GL_EXT_semaphore_win32 DONE (zink, d3d12)
GL_EXT_shader_clock DONE (all drivers that support GL_ARB_shader_clock) GL_EXT_shader_clock DONE (all drivers that support GL_ARB_shader_clock)
GL_EXT_shader_group_vote DONE (all drivers that support GL_ARB_shader_group_vote) GL_EXT_shader_group_vote DONE (all drivers that support GL_ARB_shader_group_vote)
GL_EXT_shader_pixel_local_storage DONE (panfrost/v6+)
GL_EXT_shader_realtime_clock DONE (panfrost/v6+) GL_EXT_shader_realtime_clock DONE (panfrost/v6+)
GL_EXT_sRGB_write_control DONE (all drivers that support GLES 3.0+) GL_EXT_sRGB_write_control DONE (all drivers that support GLES 3.0+)
GL_EXT_texture_compression_astc_decode_mode DONE (panfrost) GL_EXT_texture_compression_astc_decode_mode DONE (panfrost)
@ -344,7 +346,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
GL_EXT_texture_view DONE (all drivers that support GL_OES_texture_view) GL_EXT_texture_view DONE (all drivers that support GL_OES_texture_view)
GL_KHR_blend_equation_advanced_coherent DONE (freedreno/a6xx, llvmpipe, panfrost, zink, asahi, iris/gen9+, v3d) GL_KHR_blend_equation_advanced_coherent DONE (freedreno/a6xx, llvmpipe, panfrost, zink, asahi, iris/gen9+, v3d)
GL_KHR_robust_buffer_access_behavior DONE (panfrost, llvmpipe, virgl) GL_KHR_robust_buffer_access_behavior DONE (panfrost, llvmpipe, virgl)
GL_KHR_shader_subgroup DONE (radeonsi, zink, asahi) GL_KHR_shader_subgroup DONE (radeonsi, zink, asahi, iris/gen9+)
GL_KHR_texture_compression_astc_hdr DONE (panfrost, asahi) GL_KHR_texture_compression_astc_hdr DONE (panfrost, asahi)
GL_KHR_texture_compression_astc_sliced_3d DONE (freedreno/a4xx+, r600, radeonsi, panfrost, softpipe, llvmpipe, v3d, virgl, zink, lima, asahi, iris/gen9+) GL_KHR_texture_compression_astc_sliced_3d DONE (freedreno/a4xx+, r600, radeonsi, panfrost, softpipe, llvmpipe, v3d, virgl, zink, lima, asahi, iris/gen9+)
GL_OES_depth_texture_cube_map DONE (all drivers that support GLSL 1.30+) GL_OES_depth_texture_cube_map DONE (all drivers that support GLSL 1.30+)
@ -432,9 +434,9 @@ we DO NOT WANT implementations of these extensions for Mesa.
GL_ARB_shadow_ambient Superseded by GL_ARB_fragment_program GL_ARB_shadow_ambient Superseded by GL_ARB_fragment_program
GL_ARB_vertex_blend Superseded by GL_ARB_vertex_program GL_ARB_vertex_blend Superseded by GL_ARB_vertex_program
Vulkan 1.0 -- all DONE: anv, dzn, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn Vulkan 1.0 -- all DONE: anv, dzn, hk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn
Vulkan 1.1 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, pvr, radv, tu, vn Vulkan 1.1 -- all DONE: anv, hk, kk, lvp, nvk, panvk/v10+, pvr, radv, tu, vn
VK_KHR_16bit_storage DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu/a650+, v3dv, vn) VK_KHR_16bit_storage DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu/a650+, v3dv, vn)
VK_KHR_bind_memory2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_bind_memory2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
@ -454,64 +456,64 @@ Vulkan 1.1 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, pvr, radv, tu, vn
VK_KHR_maintenance2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_maintenance2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_maintenance3 DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_maintenance3 DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_multiview DONE (anv, dzn, hasvk, lvp, nvk, panvk/v10+, pvr, radv, tu, v3dv, vn) VK_KHR_multiview DONE (anv, dzn, hasvk, lvp, nvk, panvk/v10+, pvr, radv, tu, v3dv, vn)
VK_KHR_relaxed_block_layout DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_relaxed_block_layout DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_sampler_ycbcr_conversion DONE (anv, hasvk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn) VK_KHR_sampler_ycbcr_conversion DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_shader_draw_parameters DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, vn) VK_KHR_shader_draw_parameters DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, vn)
VK_KHR_storage_buffer_storage_class DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_storage_buffer_storage_class DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_variable_pointers DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_variable_pointers DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
Vulkan 1.2 -- all DONE: anv, hk, nvk, panvk/v10+, pvr, tu, vn Vulkan 1.2 -- all DONE: anv, hk, nvk, panvk/v10+, pvr, tu, vn
VK_KHR_8bit_storage DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu/a750+, v3dv, vn) VK_KHR_8bit_storage DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, radv, tu/a750+, v3dv, vn)
VK_KHR_buffer_device_address DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_buffer_device_address DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_create_renderpass2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_create_renderpass2 DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_depth_stencil_resolve DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_depth_stencil_resolve DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_draw_indirect_count DONE (anv, dzn, hasvk, lvp, nvk, panvk/v10+, radv, tu, vn) VK_KHR_draw_indirect_count DONE (anv, dzn, hasvk, lvp, nvk, panvk/v10+, radv, tu, vn)
VK_KHR_driver_properties DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_driver_properties DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_image_format_list DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_image_format_list DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_imageless_framebuffer DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_imageless_framebuffer DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_sampler_mirror_clamp_to_edge DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_sampler_mirror_clamp_to_edge DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_separate_depth_stencil_layouts DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_separate_depth_stencil_layouts DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_shader_atomic_int64 DONE (anv, lvp, nvk, panvk/v10+, radv, vn, tu/a740+) VK_KHR_shader_atomic_int64 DONE (anv, lvp, nvk, panvk/v10+, radv, vn, tu/a740+)
VK_KHR_shader_float16_int8 DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, vn) VK_KHR_shader_float16_int8 DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, radv, tu, vn)
VK_KHR_shader_float_controls DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_shader_float_controls DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_shader_subgroup_extended_types DONE (anv, hasvk, lvp, nvk, panvk/v10+, pvr, radv, tu, vn) VK_KHR_shader_subgroup_extended_types DONE (anv, hasvk, kk, lvp, nvk, panvk/v10+, pvr, radv, tu, vn)
VK_KHR_spirv_1_4 DONE (anv, dzn, hasvk, lvp, nvk, panvk/v10+, pvr, radv, tu, v3dv, vn) VK_KHR_spirv_1_4 DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk/v10+, pvr, radv, tu, v3dv, vn)
VK_KHR_timeline_semaphore DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_timeline_semaphore DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_uniform_buffer_standard_layout DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_uniform_buffer_standard_layout DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_vulkan_memory_model DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_vulkan_memory_model DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_descriptor_indexing DONE (anv, dzn, lvp, nvk, panvk/v10+, radv, tu, vn) VK_EXT_descriptor_indexing DONE (anv, dzn, kk, lvp, nvk, panvk/v10+, radv, tu, vn)
VK_EXT_host_query_reset DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_host_query_reset DONE (anv, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_sampler_filter_minmax DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn) VK_EXT_sampler_filter_minmax DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn)
VK_EXT_scalar_block_layout DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, vn, v3dv/vc7+) VK_EXT_scalar_block_layout DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, vn, v3dv/vc7+)
VK_EXT_separate_stencil_usage DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_separate_stencil_usage DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_shader_viewport_index_layer DONE (anv, hasvk, lvp, nvk, radv, tu, vn) VK_EXT_shader_viewport_index_layer DONE (anv, hasvk, kk, lvp, nvk, radv, tu, vn)
Vulkan 1.3 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, radv, tu, vn, v3dv Vulkan 1.3 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, radv, tu, vn, v3dv
VK_KHR_copy_commands2 DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_copy_commands2 DONE (anv, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_dynamic_rendering DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_dynamic_rendering DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_format_feature_flags2 DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_format_feature_flags2 DONE (anv, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_maintenance4 DONE (anv, hasvk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn) VK_KHR_maintenance4 DONE (anv, hasvk, kk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn)
VK_KHR_shader_integer_dot_product DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_shader_integer_dot_product DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_shader_non_semantic_info DONE (anv, hasvk, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_shader_non_semantic_info DONE (anv, hasvk, kk, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_shader_terminate_invocation DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_shader_terminate_invocation DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_synchronization2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_synchronization2 DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_zero_initialize_workgroup_memory DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_zero_initialize_workgroup_memory DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_4444_formats DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_4444_formats DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_extended_dynamic_state DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_extended_dynamic_state DONE (anv, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_extended_dynamic_state2 DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_extended_dynamic_state2 DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_inline_uniform_block DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_image_robustness DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_pipeline_creation_cache_control DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_inline_uniform_block DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_pipeline_creation_feedback DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_pipeline_creation_cache_control DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_private_data DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_pipeline_creation_feedback DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_image_robustness DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_private_data DONE (anv, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_shader_demote_to_helper_invocation DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_shader_demote_to_helper_invocation DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_subgroup_size_control DONE (anv, dzn, hasvk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn) VK_EXT_subgroup_size_control DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn)
VK_EXT_texel_buffer_alignment DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_texel_buffer_alignment DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_texture_compression_astc_hdr DONE (panvk, vn) VK_EXT_texture_compression_astc_hdr DONE (kk, panvk, vn)
VK_EXT_tooling_info DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_tooling_info DONE (anv, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_ycbcr_2plane_444_formats DONE (anv, lvp, nvk, panvk/v10+, radv, vn) VK_EXT_ycbcr_2plane_444_formats DONE (anv, kk, lvp, nvk, panvk/v10+, radv, vn)
Vulkan 1.4 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, radv/gfx8+, tu/a7xx+, vn Vulkan 1.4 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, radv/gfx8+, tu/a7xx+, vn
@ -519,15 +521,15 @@ Vulkan 1.4 -- all DONE: anv, hk, lvp, nvk, panvk/v10+, radv/gfx8+, tu/a7xx+, vn
VK_KHR_global_priority DONE (anv, lvp, nvk, panvk, radv, tu, vn) VK_KHR_global_priority DONE (anv, lvp, nvk, panvk, radv, tu, vn)
VK_KHR_index_type_uint8 DONE (anv, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_index_type_uint8 DONE (anv, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_line_rasterization DONE (anv, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_line_rasterization DONE (anv, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_load_store_op_none DONE (anv, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_load_store_op_none DONE (anv, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_maintenance5 DONE (anv, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn) VK_KHR_maintenance5 DONE (anv, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn)
VK_KHR_maintenance6 DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn) VK_KHR_maintenance6 DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn)
VK_KHR_map_memory2 DONE (anv, lvp, nvk, panvk, pvr, radv, tu, vn) VK_KHR_map_memory2 DONE (anv, kk, lvp, nvk, panvk, pvr, radv, tu, vn)
VK_KHR_push_descriptor DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, vn) VK_KHR_push_descriptor DONE (anv, hasvk, kk, lvp, nvk, panvk, radv, tu, vn)
VK_KHR_shader_expect_assume DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_shader_expect_assume DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_shader_float_controls2 DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn) VK_KHR_shader_float_controls2 DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn)
VK_KHR_shader_subgroup_rotate DONE (anv, lvp, nvk, panvk, radv, tu, vn) VK_KHR_shader_subgroup_rotate DONE (anv, lvp, nvk, panvk, radv, tu, vn)
VK_KHR_vertex_attribute_divisor DONE (anv, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_vertex_attribute_divisor DONE (anv, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_host_image_copy DONE (anv, lvp, nvk/Turing+, panvk, radv/gfx10+, tu, vn) VK_EXT_host_image_copy DONE (anv, lvp, nvk/Turing+, panvk, radv/gfx10+, tu, vn)
VK_EXT_pipeline_protected_access DONE (anv/gfx12+, vn) VK_EXT_pipeline_protected_access DONE (anv/gfx12+, vn)
VK_EXT_pipeline_robustness DONE (anv, lvp, nvk, panvk, radv, v3dv, tu, vn) VK_EXT_pipeline_robustness DONE (anv, lvp, nvk, panvk, radv, v3dv, tu, vn)
@ -536,9 +538,9 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_acceleration_structure DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, tu/a740+, vn) VK_KHR_acceleration_structure DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, tu/a740+, vn)
VK_KHR_android_surface not started VK_KHR_android_surface not started
VK_KHR_calibrated_timestamps DONE (anv, hk, nvk, panvk/v10+, radv, tu/a750+, vn) VK_KHR_calibrated_timestamps DONE (anv, hk, kk, nvk, panvk/v10+, radv, tu/a750+, vn)
VK_KHR_compute_shader_derivatives DONE (anv, lvp, nvk, radv, tu/a7xx+, vn) VK_KHR_compute_shader_derivatives DONE (anv, lvp, nvk, radv, tu/a7xx+, vn)
VK_KHR_cooperative_matrix DONE (anv, nvk/Turing+, radv/gfx11+) VK_KHR_cooperative_matrix DONE (anv, nvk/Turing+, radv/gfx11+, vn)
VK_KHR_depth_clamp_zero_one DONE (anv, nvk, panvk, radv, vn) VK_KHR_depth_clamp_zero_one DONE (anv, nvk, panvk, radv, vn)
VK_KHR_deferred_host_operations DONE (anv, hasvk, lvp, radv, tu, vn) VK_KHR_deferred_host_operations DONE (anv, hasvk, lvp, radv, tu, vn)
VK_KHR_display DONE (anv, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_display DONE (anv, nvk, panvk, pvr, radv, tu, v3dv, vn)
@ -557,48 +559,53 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_maintenance7 DONE (anv, hk, lvp, nvk, panvk/v10+, radv, tu, vn) VK_KHR_maintenance7 DONE (anv, hk, lvp, nvk, panvk/v10+, radv, tu, vn)
VK_KHR_maintenance8 DONE (anv, hk, lvp, nvk, panvk/v10+, radv, tu) VK_KHR_maintenance8 DONE (anv, hk, lvp, nvk, panvk/v10+, radv, tu)
VK_KHR_maintenance9 DONE (anv, hk, lvp, nvk, panvk, radv) VK_KHR_maintenance9 DONE (anv, hk, lvp, nvk, panvk, radv)
VK_KHR_maintenance10 DONE (anv, nvk, radv)
VK_KHR_performance_query DONE (anv, radv/gfx10.3+, tu, v3dv) VK_KHR_performance_query DONE (anv, radv/gfx10.3+, tu, v3dv)
VK_KHR_pipeline_binary DONE (radv) VK_KHR_pipeline_binary DONE (radv)
VK_KHR_pipeline_executable_properties DONE (anv, hk, nvk, panvk, hasvk, radv, tu, v3dv) VK_KHR_pipeline_executable_properties DONE (anv, hk, nvk, panvk, hasvk, radv, tu, v3dv)
VK_KHR_pipeline_library DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn) VK_KHR_pipeline_library DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn)
VK_KHR_present_id DONE (anv, nvk, radv, tu, vn) VK_KHR_present_id DONE (anv, hk, nvk, radv, tu, vn)
VK_KHR_present_id2 DONE (anv, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_present_id2 DONE (anv, hk, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_present_wait DONE (anv, nvk, radv, tu, vn) VK_KHR_present_wait DONE (anv, hk, nvk, radv, tu, vn)
VK_KHR_present_wait2 DONE (anv, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_present_wait2 DONE (anv, hk, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_ray_query DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, tu/a740+, vn) VK_KHR_ray_query DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, tu/a740+, vn)
VK_KHR_ray_tracing_maintenance1 DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, tu/a740+, vn) VK_KHR_ray_tracing_maintenance1 DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, tu/a740+, vn)
VK_KHR_ray_tracing_pipeline DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, vn) VK_KHR_ray_tracing_pipeline DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, vn)
VK_KHR_ray_tracing_position_fetch DONE (anv, lvp, radv/gfx10.3+, vn) VK_KHR_ray_tracing_position_fetch DONE (anv, lvp, radv/gfx10.3+, vn)
VK_KHR_shader_bfloat16 DONE (anv/gfx12.5+, radv/gfx12+) VK_KHR_robustness2 DONE (anv, pvr, radv, vn)
VK_KHR_shader_bfloat16 DONE (anv/gfx12.5+, radv/gfx12+, vn)
VK_KHR_shader_clock DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, vn) VK_KHR_shader_clock DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, vn)
VK_KHR_shader_maximal_reconvergence DONE (anv, hk, lvp, nvk, panvk/v10+, radv, vn) VK_KHR_shader_maximal_reconvergence DONE (anv, hk, kk, lvp, nvk, panvk/v10+, radv, vn)
VK_KHR_shader_relaxed_extended_instruction DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_shader_relaxed_extended_instruction DONE (anv, hasvk, hk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_shader_subgroup_uniform_control_flow DONE (anv, hasvk, hk, nvk, panvk/v10+, radv, tu, vn) VK_KHR_shader_subgroup_uniform_control_flow DONE (anv, hasvk, hk, kk, nvk, panvk/v10+, radv, tu, vn)
VK_KHR_shader_quad_control DONE (anv, hk, lvp, nvk, panvk/v10+, radv, vn) VK_KHR_shader_quad_control DONE (anv, hk, lvp, nvk, panvk/v10+, radv, vn)
VK_KHR_shader_untyped_pointers DONE (anv, nvk, radv) VK_KHR_shader_untyped_pointers DONE (anv, nvk, radv, vn)
VK_KHR_shared_presentable_image not started VK_KHR_shared_presentable_image not started
VK_KHR_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_surface_protected_capabilities DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn) VK_KHR_surface_protected_capabilities DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_swapchain DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_swapchain DONE (anv, dzn, hasvk, hk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_swapchain_mutable_format DONE (anv, hasvk, hk, lvp, nvk, pvr, radv, tu, v3dv, vn) VK_KHR_swapchain_mutable_format DONE (anv, hasvk, hk, kk, lvp, nvk, pvr, radv, tu, v3dv, vn)
VK_KHR_unified_image_layouts DONE (lvp, nvk, panvk, radv/gfx11+, tu) VK_KHR_unified_image_layouts DONE (lvp, nvk, panvk, radv/gfx11+, tu)
VK_KHR_wayland_surface DONE (anv, dzn, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_wayland_surface DONE (anv, dzn, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_workgroup_memory_explicit_layout DONE (anv, hk, lvp, nvk, hasvk, radv, tu, v3dv, vn) VK_KHR_workgroup_memory_explicit_layout DONE (anv, hk, kk, lvp, nvk, hasvk, radv, tu, v3dv, vn)
VK_KHR_win32_keyed_mutex not started VK_KHR_win32_keyed_mutex not started
VK_KHR_win32_surface DONE (dzn, lvp) VK_KHR_win32_surface DONE (dzn, lvp)
VK_KHR_xcb_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_xcb_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_xlib_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_KHR_xlib_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_surface_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_swapchain_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_acquire_xlib_display DONE (anv, hk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_acquire_xlib_display DONE (anv, hk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_attachment_feedback_loop_dynamic_state DONE (anv, lvp, radv, tu, vn) VK_EXT_attachment_feedback_loop_dynamic_state DONE (anv, lvp, radv, tu, vn)
VK_EXT_attachment_feedback_loop_layout DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_attachment_feedback_loop_layout DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_blend_operation_advanced DONE (vn) VK_EXT_blend_operation_advanced DONE (vn)
VK_EXT_border_color_swizzle DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv/gfx10+, tu, v3dv, vn) VK_EXT_border_color_swizzle DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv/gfx10+, tu, v3dv, vn)
VK_EXT_buffer_device_address DONE (anv, dzn/sm6.6+, hasvk, hk, nvk, panvk, radv, vn) VK_EXT_buffer_device_address DONE (anv, dzn/sm6.6+, hasvk, hk, nvk, panvk, radv, vn)
VK_EXT_calibrated_timestamps DONE (anv, hasvk, hk, nvk, panvk/v10+, lvp, radv, vn, tu/a750+) VK_EXT_calibrated_timestamps DONE (anv, hasvk, hk, kk, nvk, panvk/v10+, lvp, radv, vn, tu/a750+)
VK_EXT_color_write_enable DONE (anv, hasvk, hk, lvp, nvk, pvr, radv, tu, v3dv, vn) VK_EXT_color_write_enable DONE (anv, hasvk, hk, lvp, nvk, pvr, radv, tu, v3dv, vn)
VK_EXT_conditional_rendering DONE (anv, hasvk, lvp, nvk, radv, tu, vn) VK_EXT_conditional_rendering DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_EXT_conservative_rasterization DONE (anv, nvk, radv, vn, tu/a7xx+) VK_EXT_conservative_rasterization DONE (anv, nvk, radv, vn, tu/a7xx+)
VK_EXT_custom_border_color DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_custom_border_color DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_custom_resolve DONE (radv)
VK_EXT_debug_marker DONE (radv) VK_EXT_debug_marker DONE (radv)
VK_EXT_debug_report DONE (anv, dzn, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_debug_report DONE (anv, dzn, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_debug_utils DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_debug_utils DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
@ -611,38 +618,39 @@ Khronos extensions that are not part of any Vulkan version:
VK_EXT_device_address_binding_report DONE (radv, tu) VK_EXT_device_address_binding_report DONE (radv, tu)
VK_EXT_device_fault DONE (radv) VK_EXT_device_fault DONE (radv)
VK_EXT_device_generated_commands DONE (lvp, nvk/Turing+, radv/gfx8+) VK_EXT_device_generated_commands DONE (lvp, nvk/Turing+, radv/gfx8+)
VK_EXT_device_memory_report DONE (anv, radv, vn) VK_EXT_device_memory_report DONE (anv, panvk, radv, vn)
VK_EXT_direct_mode_display DONE (anv, hk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_direct_mode_display DONE (anv, hk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_discard_rectangles DONE (radv) VK_EXT_discard_rectangles DONE (nvk, radv)
VK_EXT_display_control DONE (anv, hasvk, nvk, panvk, radv, tu) VK_EXT_display_control DONE (anv, hasvk, nvk, panvk, radv, tu)
VK_EXT_display_surface_counter DONE (anv, lvp, nvk, panvk, radv, tu, vn) VK_EXT_display_surface_counter DONE (anv, lvp, nvk, panvk, radv, tu, vn)
VK_EXT_dynamic_rendering_unused_attachments DONE (anv, hk, lvp, nvk, radv, tu, vn) VK_EXT_dynamic_rendering_unused_attachments DONE (anv, hk, lvp, nvk, radv, tu, vn)
VK_EXT_extended_dynamic_state3 DONE (anv, hk, lvp, nvk, pvr, radv, tu, vn) VK_EXT_extended_dynamic_state3 DONE (anv, hk, lvp, nvk, pvr, radv, tu, vn)
VK_EXT_external_memory_acquire_unmodified DONE (anv, radv, vn) VK_EXT_external_memory_acquire_unmodified DONE (anv, panvk, radv, vn)
VK_EXT_external_memory_dma_buf DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_external_memory_dma_buf DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_external_memory_host DONE (anv, dzn, hasvk, lvp, radv) VK_EXT_external_memory_host DONE (anv, dzn, hasvk, lvp, radv)
VK_EXT_external_memory_metal DONE (kk)
VK_EXT_filter_cubic DONE (tu/a650+, vn) VK_EXT_filter_cubic DONE (tu/a650+, vn)
VK_EXT_fragment_density_map DONE (tu) VK_EXT_fragment_density_map DONE (tu)
VK_EXT_fragment_shader_interlock DONE (anv, lvp, radv/gfx9+, vn) VK_EXT_fragment_shader_interlock DONE (anv, lvp, radv/gfx9+, vn)
VK_EXT_global_priority DONE (anv, hasvk, panvk, radv, tu, vn, hk) VK_EXT_global_priority DONE (anv, hasvk, panvk, radv, tu, vn, hk, lvp)
VK_EXT_global_priority_query DONE (anv, hasvk, panvk, radv, tu, vn, hk) VK_EXT_global_priority_query DONE (anv, hasvk, panvk, radv, tu, vn, hk, lvp)
VK_EXT_graphics_pipeline_library DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn) VK_EXT_graphics_pipeline_library DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn)
VK_EXT_hdr_metadata DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn) VK_EXT_hdr_metadata DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn)
VK_EXT_headless_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_headless_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_image_2d_view_of_3d DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, vn) VK_EXT_image_2d_view_of_3d DONE (anv, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, vn)
VK_EXT_image_compression_control DONE (anv/gfx12-, radv) VK_EXT_image_compression_control DONE (anv/gfx12-, radv)
VK_EXT_image_drm_format_modifier DONE (anv, hasvk, hk, lvp, nvk, panvk/v10+, radv/gfx9+, tu, v3dv, vn) VK_EXT_image_drm_format_modifier DONE (anv, hasvk, hk, lvp, nvk, panvk, radv/gfx9+, tu, v3dv, vn)
VK_EXT_image_sliced_view_of_3d DONE (anv, hk, lvp, nvk, radv/gfx10+, vn) VK_EXT_image_sliced_view_of_3d DONE (anv, hk, lvp, nvk, radv/gfx10+, vn)
VK_EXT_image_view_min_lod DONE (anv, hasvk, hk, nvk, radv, tu, vn) VK_EXT_image_view_min_lod DONE (anv, hasvk, hk, nvk, radv, tu, vn)
VK_EXT_index_type_uint8 DONE (anv, hasvk, hk, nvk, lvp, panvk, pvr, radv/gfx8+, tu, v3dv, vn) VK_EXT_index_type_uint8 DONE (anv, hasvk, hk, nvk, lvp, panvk, pvr, radv/gfx8+, tu, v3dv, vn)
VK_EXT_legacy_vertex_attributes DONE (anv, lvp, nvk, radv, tu, vn) VK_EXT_legacy_vertex_attributes DONE (anv, lvp, nvk, radv, tu, vn)
VK_EXT_line_rasterization DONE (anv, hasvk, hk, nvk, panvk, pvr, lvp, radv, tu, v3dv, vn) VK_EXT_line_rasterization DONE (anv, hasvk, hk, nvk, panvk, pvr, lvp, radv, tu, v3dv, vn)
VK_EXT_load_store_op_none DONE (anv, hk, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_load_store_op_none DONE (anv, hk, kk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_memory_budget DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_memory_budget DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_memory_priority DONE (lvp, radv) VK_EXT_memory_priority DONE (lvp, radv)
VK_EXT_mesh_shader DONE (anv/gfx12.5+, lvp, radv) VK_EXT_mesh_shader DONE (anv/gfx12.5+, lvp, radv, vn)
VK_EXT_multi_draw DONE (anv, hasvk, hk, lvp, nvk, radv, tu, vn, v3dv) VK_EXT_multi_draw DONE (anv, hasvk, hk, lvp, nvk, radv, tu, vn, v3dv)
VK_EXT_multisampled_render_to_single_sampled DONE (lvp, vn) VK_EXT_multisampled_render_to_single_sampled DONE (lvp, vn, panvk)
VK_EXT_nested_command_buffer DONE (anv, lvp, nvk, radv, tu, vn) VK_EXT_nested_command_buffer DONE (anv, lvp, nvk, radv, tu, vn)
VK_EXT_non_seamless_cube_map DONE (anv, hasvk, hk, lvp, nvk, panvk, radv, tu, vn) VK_EXT_non_seamless_cube_map DONE (anv, hasvk, hk, lvp, nvk, panvk, radv, tu, vn)
VK_EXT_pageable_device_local_memory DONE (lvp) VK_EXT_pageable_device_local_memory DONE (lvp)
@ -659,26 +667,27 @@ Khronos extensions that are not part of any Vulkan version:
VK_EXT_sample_locations DONE (anv, hasvk, hk, nvk, radv, tu/a650+, vn, lavapipe) VK_EXT_sample_locations DONE (anv, hasvk, hk, nvk, radv, tu/a650+, vn, lavapipe)
VK_EXT_shader_atomic_float DONE (anv, hasvk, lvp, radv, tu, vn) VK_EXT_shader_atomic_float DONE (anv, hasvk, lvp, radv, tu, vn)
VK_EXT_shader_atomic_float2 DONE (anv, lvp, radv, vn) VK_EXT_shader_atomic_float2 DONE (anv, lvp, radv, vn)
VK_EXT_shader_float8 DONE (radv/gfx12+) VK_EXT_shader_float8 DONE (radv/gfx12+, vn)
VK_EXT_shader_image_atomic_int64 DONE (anv, lvp, nvk, radv, vn) VK_EXT_shader_image_atomic_int64 DONE (anv, lvp, nvk, radv, vn)
VK_EXT_shader_object DONE (anv, lvp, hk, nvk, radv) VK_EXT_shader_object DONE (anv, lvp, hk, nvk, radv)
VK_EXT_shader_replicated_composites DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, vn) VK_EXT_shader_replicated_composites DONE (anv, dzn, hasvk, kk, lvp, nvk, panvk, pvr, radv, tu, vn)
VK_EXT_shader_stencil_export DONE (anv, hk, lvp, radv, tu, vn) VK_EXT_shader_stencil_export DONE (anv, hk, lvp, radv, tu, vn)
VK_EXT_shader_subgroup_ballot DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, vn) VK_EXT_shader_subgroup_ballot DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, vn)
VK_EXT_shader_subgroup_vote DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, vn) VK_EXT_shader_subgroup_vote DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, radv, vn)
VK_EXT_shader_module_identifier DONE (anv, hasvk, hk, nvk, panvk, radv, tu, v3dv) VK_EXT_shader_module_identifier DONE (anv, hasvk, hk, nvk, panvk, radv, tu, v3dv)
VK_EXT_shader_uniform_buffer_unsized_array DONE (nvk, radv, vn)
VK_EXT_surface_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_surface_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_swapchain_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_swapchain_maintenance1 DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_transform_feedback DONE (anv, hasvk, hk, lvp, nvk, radv, tu, vn) VK_EXT_transform_feedback DONE (anv, hasvk, hk, lvp, nvk, radv, tu, vn)
VK_EXT_vertex_attribute_divisor DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_EXT_vertex_attribute_divisor DONE (anv, dzn, hasvk, hk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_vertex_input_dynamic_state DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn) VK_EXT_vertex_input_dynamic_state DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn)
VK_EXT_ycbcr_image_arrays DONE (anv, hasvk, hk, lvp, nvk, panvk/v10+, radv, vn) VK_EXT_ycbcr_image_arrays DONE (anv, hasvk, hk, lvp, nvk, panvk/v10+, radv, vn)
VK_EXT_zero_initialize_device_memory DONE (lvp, nvk, pvr, radv, tu) VK_EXT_zero_initialize_device_memory DONE (lvp, nvk, pvr, radv, tu)
VK_ANDROID_external_memory_android_hardware_buffer DONE (anv, lvp, panvk, radv, tu, v3dv, vn) VK_ANDROID_external_memory_android_hardware_buffer DONE (anv, lvp, panvk, radv, tu, v3dv, vn)
VK_ANDROID_native_buffer DONE (anv, lvp, panvk, radv, tu, v3dv, vn) VK_ANDROID_native_buffer DONE (anv, lvp, panvk, radv, tu, v3dv, vn)
VK_GOOGLE_decorate_string DONE (anv, hasvk, hk, lvp, nvk, panvk, radv, tu, vn) VK_GOOGLE_decorate_string DONE (anv, hasvk, hk, kk, lvp, nvk, panvk, radv, tu, vn)
VK_GOOGLE_hlsl_functionality1 DONE (anv, hasvk, hk, lvp, nvk, panvk, radv, tu, vn) VK_GOOGLE_hlsl_functionality1 DONE (anv, hasvk, hk, kk, lvp, nvk, panvk, radv, tu, vn)
VK_GOOGLE_user_type DONE (anv, hasvk, hk, nvk, panvk, radv, tu, vn) VK_GOOGLE_user_type DONE (anv, hasvk, hk, kk, lvp, nvk, panvk, radv, tu, vn)
VK_IMG_filter_cubic DONE (tu/a650+, vn) VK_IMG_filter_cubic DONE (tu/a650+, vn)
VK_NV_compute_shader_derivatives DONE (anv, hasvk, nvk, radv, tu/a7xx+, vn) VK_NV_compute_shader_derivatives DONE (anv, hasvk, nvk, radv, tu/a7xx+, vn)
VK_NVX_image_view_handle DONE (nvk) VK_NVX_image_view_handle DONE (nvk)
@ -705,15 +714,15 @@ Khronos extensions that are not part of any Vulkan version:
VK_ARM_rasterization_order_attachment_access DONE (lvp, tu, vn) VK_ARM_rasterization_order_attachment_access DONE (lvp, tu, vn)
VK_ARM_shader_core_builtins DONE (panvk) VK_ARM_shader_core_builtins DONE (panvk)
VK_ARM_shader_core_properties DONE (panvk/v10+) VK_ARM_shader_core_properties DONE (panvk/v10+)
VK_EXT_mutable_descriptor_type DONE (anv, hk, lvp, nvk, panvk/v9+, radv, tu, vn) VK_EXT_mutable_descriptor_type DONE (anv, hk, kk, lvp, nvk, panvk/v9+, radv, tu, vn)
VK_EXT_swapchain_colorspace DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_swapchain_colorspace DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_depth_clamp_zero_one DONE (anv, nvk, panvk, pvr, radv, tu, v3dv/vc7+, vn) VK_EXT_depth_clamp_zero_one DONE (anv, nvk, panvk, pvr, radv, tu, v3dv/vc7+, vn)
VK_INTEL_shader_integer_functions2 DONE (anv, hasvk, radv) VK_INTEL_shader_integer_functions2 DONE (anv, hasvk, radv)
VK_EXT_map_memory_placed DONE (anv, hk, nvk, pvr, radv, tu) VK_EXT_map_memory_placed DONE (anv, hk, nvk, pvr, radv, tu, vn)
VK_MESA_image_alignment_control DONE (anv, nvk, radv) VK_MESA_image_alignment_control DONE (anv, nvk, radv)
VK_EXT_legacy_dithering DONE (anv, tu, vn) VK_EXT_legacy_dithering DONE (anv, tu, vn)
VK_QCOM_fragment_density_map_offset DONE (tu) VK_QCOM_fragment_density_map_offset DONE (tu)
VK_VALVE_video_encode_rgb_conversion DONE (radv)
Rusticl OpenCL 1.0 -- all DONE: Rusticl OpenCL 1.0 -- all DONE:
Image support DONE Image support DONE

View file

@ -83,6 +83,7 @@ Linux, FreeBSD, and other operating systems.
drivers/asahi drivers/asahi
drivers/d3d12 drivers/d3d12
drivers/freedreno drivers/freedreno
drivers/kosmickrisp
drivers/lima drivers/lima
drivers/llvmpipe drivers/llvmpipe
drivers/nvk drivers/nvk

View file

@ -31,8 +31,7 @@ you're willing to maintain support for other compiler get in touch.
- Clang 5.0 or later (some parts of Mesa may require later versions) - Clang 5.0 or later (some parts of Mesa may require later versions)
- Microsoft Visual C++ compiler - Microsoft Visual C++ compiler
- Windows SDK of at least 20348 is required - Windows SDK of at least 20348 is required
- Visual Studio 2019 Version 16.11 or later for (ARM, X86, X64) - Visual Studio 2022 version 17.9 or later for (ARM, AARCH64, ARM64EC, X86, X64)
- Visual Studio 2022 version 17.8.6 or later for (AARCH64, ARM64EC)
Third party/extra tools. Third party/extra tools.
^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -43,6 +43,9 @@ The exact supported features vary per driver:
* - Panfrost * - Panfrost
- ``gpu.counters.panfrost`` - ``gpu.counters.panfrost``
- -
* - PanVK
- ``gpu.counters.panfrost``
- ``gpu.renderstages.panfrost``
* - V3D * - V3D
- ``gpu.counters.v3d`` - ``gpu.counters.v3d``
- -
@ -55,39 +58,7 @@ Run
To capture a trace with Perfetto you need to take the following steps: To capture a trace with Perfetto you need to take the following steps:
1. Build Perfetto from sources available at ``subprojects/perfetto`` following 1. Build Mesa with perfetto enabled.
`this guide <https://perfetto.dev/docs/quickstart/linux-tracing>`__.
2. Create a `trace config <https://perfetto.dev/docs/concepts/config>`__, which is
a json formatted text file with extension ``.cfg``, or use one of the config
files under the ``src/tool/pps/cfg`` directory. More examples of config files
can be found in ``subprojects/perfetto/test/configs``.
3. Change directory to ``subprojects/perfetto`` and run a
`convenience script <https://perfetto.dev/docs/getting-started/system-tracing#recording-your-first-system-trace>`__
to start the tracing service:
.. code-block:: sh
cd subprojects/perfetto
CONFIG=<path/to/gpu.cfg> OUT=out/linux_clang_release ./tools/tmux -n
4. Start other producers you may need, e.g. ``pps-producer``.
5. Start ``perfetto`` under the tmux session initiated in step 3.
6. Once tracing has finished, you can detach from tmux with :kbd:`Ctrl+b`,
:kbd:`d`, and the convenience script should automatically copy the trace
files into ``$HOME/Downloads``.
7. Go to `ui.perfetto.dev <https://ui.perfetto.dev>`__ and upload
``$HOME/Downloads/trace.protobuf`` by clicking on **Open trace file**.
8. Alternatively you can open the trace in `AGI <https://gpuinspector.dev/>`__
(which despite the name can be used to view non-android traces).
To be a bit more explicit, here is a listing of commands reproducing
the steps above :
.. code-block:: sh .. code-block:: sh
@ -96,19 +67,52 @@ the steps above :
# Build mesa # Build mesa
mesa $ meson compile -C build mesa $ meson compile -C build
2. Build Perfetto from sources available at ``subprojects/perfetto``.
.. code-block:: sh
# Within the Mesa repo, build perfetto # Within the Mesa repo, build perfetto
mesa $ cd subprojects/perfetto mesa $ cd subprojects/perfetto
perfetto $ ./tools/install-build-deps perfetto $ ./tools/install-build-deps
perfetto $ ./tools/gn gen --args='is_debug=false' out/linux perfetto $ ./tools/gn gen --args='is_debug=false' out/linux
perfetto $ ./tools/ninja -C out/linux perfetto $ ./tools/ninja -C out/linux
# Start perfetto # Example arm64 cross compile instead
perfetto $ CONFIG=../../src/tool/pps/cfg/gpu.cfg OUT=out/linux/ ./tools/tmux -n perfetto $ ./tools/install-build-deps --linux-arm
perfetto $ ./tools/gn gen --args='is_debug=false target_cpu="arm64"' out/linux-arm64
# In parallel from the Mesa repo, start the PPS producer More build options can be found in `this guide <https://perfetto.dev/docs/quickstart/linux-tracing>`__.
mesa $ ./build/src/tool/pps/pps-producer
# Back in the perfetto tmux, press enter to start the capture 3. Select a `trace config <https://perfetto.dev/docs/concepts/config>`__, likely
``src/tool/pps/cfg/system.cfg`` which does whole-system including GPU
profiling for any supported GPUs). Other configs are available in that
directory for CPU-only or GPU-only tracing, and more examples of config files
can be found in ``subprojects/perfetto/test/configs``.
4. Start the PPS producer to capture GPU performance counters.
.. code-block:: sh
mesa $ sudo meson devenv -C build pps-producer
5. Start your application (and any other GPU-using system components) you want
to trace using the perfetto-enabled Mesa build.
.. code-block:: sh
mesa $ meson devenv -C build vkcube
6. Capture a perfetto trace using ``tracebox``.
.. code-block:: sh
mesa $ sudo ./subprojects/perfetto/out/linux/tracebox --system-sockets --txt -c src/tool/pps/cfg/system.cfg -o vkcube.trace
7. Go to `ui.perfetto.dev <https://ui.perfetto.dev>`__ and upload
``vkcube.trace`` by clicking on **Open trace file**.
8. Alternatively you can open the trace in `AGI <https://gpuinspector.dev/>`__
(which despite the name can be used to view non-android traces).
CPU Tracing CPU Tracing
~~~~~~~~~~~ ~~~~~~~~~~~
@ -125,17 +129,20 @@ Currently, only EGL and the following drivers have CPU tracepoints.
- VC4 - VC4
- V3DV - V3DV
Vulkan data sources Render stage data sources
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
The Vulkan API gives the application control over recording of command The render stage data sources are the driver-specific traces of command buffer
buffers as well as when they are submitted to the hardware. As a execution on the GPU.
consequence, we need to ensure command buffers are properly
instrumented for the Perfetto driver data sources prior to Perfetto
actually collecting traces.
This can be achieved by setting the :envvar:`MESA_GPU_TRACES` The Vulkan API gives the application control over recording of command buffers
environment variable before starting a Vulkan application : as well as when they are submitted to the hardware, and command buffers can be
recorded once and reused repeatedly. Trace commands are normally only recorded
into a command buffer when a perfetto trace is active. Most applications don't
reuse command buffers, so you'll see traces appear shortly after the trace was
started, but if you have one of the rare applications that reuses command
buffers, you'll need to set the :envvar:`MESA_GPU_TRACES` environment variable
before starting a Vulkan application :
.. code-block:: sh .. code-block:: sh
@ -214,7 +221,7 @@ To run the producer, follow these two simple steps:
./build/pps-producer ./build/pps-producer
V3D / V3DV V3D / V3DV
---------- ^^^^^^^^^^
As we can only have one performance monitor active at a given time, we can only monitor As we can only have one performance monitor active at a given time, we can only monitor
32 performance counters. There is a need to define the performance counters of interest 32 performance counters. There is a need to define the performance counters of interest
@ -227,17 +234,6 @@ for pps_producer using the environment variable ``V3D_DS_COUNTER``.
Troubleshooting Troubleshooting
--------------- ---------------
Tmux
~~~~
If the convenience script ``tools/tmux`` keeps copying artifacts to your
``SSH_TARGET`` without starting the tmux session, make sure you have ``tmux``
installed in your system.
.. code-block:: sh
apt install tmux
Missing counter names Missing counter names
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~

View file

@ -1,6 +1,8 @@
25.2,2025-10-29,25.2.6,Eric Engestrom, 25.3,2025-12-31,25.3.3,Dylan Baker,
,2025-11-12,25.2.7,Eric Engestrom, ,2026-01-14,25.3.4,Dylan Baker,
25.3,2025-10-15,25.3.0-rc1,Dylan Baker,25.3 branchpoint ,2026-01-28,25.3.5,Dylan Baker,
,2025-10-22,25.3.0-rc2,Dylan Baker, ,2026-02-11,25.3.6,Dylan Baker,Last planned 25.3 release
,2025-10-29,25.3.0-rc3,Dylan Baker, 26.0,2026-01-14,26.0.0-rc1,Eric Engestrom,26.0 branchpoint
,2025-11-05,25.3.0-rc4,Dylan Baker,or 25.3.0 final ,2026-01-21,26.0.0-rc2,Eric Engestrom,
,2026-01-28,26.0.0-rc3,Eric Engestrom,
,2026-02-04,26.0.0-rc4,Eric Engestrom,or 26.0.0 final

1 25.2 25.3 2025-10-29 2025-12-31 25.2.6 25.3.3 Eric Engestrom Dylan Baker
2 2025-11-12 2026-01-14 25.2.7 25.3.4 Eric Engestrom Dylan Baker
3 25.3 2025-10-15 2026-01-28 25.3.0-rc1 25.3.5 Dylan Baker Dylan Baker 25.3 branchpoint
4 2025-10-22 2026-02-11 25.3.0-rc2 25.3.6 Dylan Baker Dylan Baker Last planned 25.3 release
5 26.0 2025-10-29 2026-01-14 25.3.0-rc3 26.0.0-rc1 Dylan Baker Eric Engestrom 26.0 branchpoint
6 2025-11-05 2026-01-21 25.3.0-rc4 26.0.0-rc2 Dylan Baker Eric Engestrom or 25.3.0 final
7 2026-01-28 26.0.0-rc3 Eric Engestrom
8 2026-02-04 26.0.0-rc4 Eric Engestrom or 26.0.0 final

View file

@ -3,6 +3,12 @@ Release Notes
The release notes summarize what's new or changed in each Mesa release. The release notes summarize what's new or changed in each Mesa release.
- :doc:`25.3.2 release notes <relnotes/25.3.2>`
- :doc:`25.2.8 release notes <relnotes/25.2.8>`
- :doc:`25.3.1 release notes <relnotes/25.3.1>`
- :doc:`25.3.0 release notes <relnotes/25.3.0>`
- :doc:`25.2.7 release notes <relnotes/25.2.7>`
- :doc:`25.2.6 release notes <relnotes/25.2.6>`
- :doc:`25.2.5 release notes <relnotes/25.2.5>` - :doc:`25.2.5 release notes <relnotes/25.2.5>`
- :doc:`25.2.4 release notes <relnotes/25.2.4>` - :doc:`25.2.4 release notes <relnotes/25.2.4>`
- :doc:`25.2.3 release notes <relnotes/25.2.3>` - :doc:`25.2.3 release notes <relnotes/25.2.3>`
@ -466,6 +472,12 @@ The release notes summarize what's new or changed in each Mesa release.
:maxdepth: 1 :maxdepth: 1
:hidden: :hidden:
25.3.2 <relnotes/25.3.2>
25.2.8 <relnotes/25.2.8>
25.3.1 <relnotes/25.3.1>
25.3.0 <relnotes/25.3.0>
25.2.7 <relnotes/25.2.7>
25.2.6 <relnotes/25.2.6>
25.2.5 <relnotes/25.2.5> 25.2.5 <relnotes/25.2.5>
25.2.4 <relnotes/25.2.4> 25.2.4 <relnotes/25.2.4>
25.2.3 <relnotes/25.2.3> 25.2.3 <relnotes/25.2.3>

199
docs/relnotes/25.2.6.rst Normal file
View file

@ -0,0 +1,199 @@
Mesa 25.2.6 Release Notes / 2025-10-29
======================================
Mesa 25.2.6 is a bug fix release which fixes bugs found since the 25.2.5 release.
Mesa 25.2.6 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 25.2.6 implements the Vulkan 1.4 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA checksums
-------------
::
SHA256: 361c97e8afa5fe20141c5362c5b489040751e12861c186a16c621a2fb182fc42 mesa-25.2.6.tar.xz
SHA512: c34f55132ee9097a7c4961745bf07a08fc612bf0f7c570c023fedb16c8eafbefdc1cc022f722c345780bb14ec4ce25d9a206a9196d9d51c97b389db5160de9cc mesa-25.2.6.tar.xz
New features
------------
- None
Bug fixes
---------
- [ANV][PTL][DG2] Flickering textures in Assassin's Creed Valhalla benchmark
- ADL, ANV: Wuthering Waves leads to gpu reset on Alder Lake iGPU
- [ANV][EXT_debug_utils] descriptor set object_name leak when not calling vkFreeDescriptorSets
- nvk: CTS failures in sample_locations_ext.verify_interpolation.samples_1
- [regression] [bisected] RuneLite GPU Experimental - GPU crash
- lp_test_arit.c:200:14: error: static declaration of rsqrtf follows non-static declaration
- build failure with glibc 2.42
- zink: chromium flickers in youtube when fullscreening videos
- r600: Attribute stride updates may be skipped
- anv: Assert in brew when descriptor indexing with modulo
- [ANV][TGL]: test_buffer_feedback_instructions_sm51 on vkd3d-proton crashes
Changes
-------
Alyssa Rosenzweig (1):
- anv: use D3D-compatible texturing for Proton
Benjamin Cheng (3):
- radv/video_enc: Cleanup slice count assert
- radv/video: Override H265 SPS block size parameters
- radv/video: Override H265 SPS unaligned resolutions
Connor Abbott (6):
- tu: Don't patch GMEM for input attachments never in GMEM
- tu: Fix 3d load path with D24S8 on a7xx
- tu: Also disable stencil load for attachments not in GMEM
- tu: Fix RT count with remapped color attachments
- tu: Rename tu_render_pass_attachment::clear_views to used_views
- tu: Fix attachment stores with subpasses with partial views
Danylo Piliaiev (2):
- tu: Destroy all mutexes used for device
- tu: Synchronize access to copy_timestamp_cs_pool
Emma Anholt (1):
- nir/shrink_stores: Don't shrink stores to an invalid num_components.
Eric Engestrom (8):
- docs: add sha sum for 25.2.5
- .pick_status.json: Mark !36883 commits as denominated
- .pick_status.json: Update to b82044c31b0be1c7682548a8e10905a4ff5b13d7
- .pick_status.json: Mark 77fb8fb062457dad73bd763e97bf757b6cd04080 as denominated
- .pick_status.json: Mark bca29b1c92320dea0004341a08cc76a18e3edaf3 as denominated
- .pick_status.json: Mark 8d05b7b72e70fe35d6ff6b5d65272ec520a707f3 as denominated
- .pick_status.json: Mark 006085e6769c3697c29cd5087dfabe7b5b8d046a as denominated
- .pick_status.json: Mark 343eef990e54d974d811f7414e79a8854b8c97f9 as denominated
Faith Ekstrand (7):
- panvk: Fix integer dot product properties
- nvk: Include the chipset in the pipeline/binary cache UUID
- nvk: Disable sampleLocationsSampleCounts for 1x MSAA
- nvk: Look at the right pointer in GetDescriptorInfo for SSBOs
- nvk: Capture/replay buffer addresses for EDB capture/replay
- panvk/shader: [de]serialize desc_info.max_varying_loads
- panvk/shader: Use the right copy size for deserializing dynamic UBOs/SSBOs
Gert Wollny (1):
- r600: Fix comparison of strides array when emitting vertex buffers
Job Noorman (2):
- nir: mark fneg distribution through fadd/ffma as nsz
- spirv: don't set in_bounds for structs
José Roberto de Souza (1):
- gallium/llvmpipe/test: Rename rsqrtf() to _rsqrtf()
Karol Herbst (1):
- nak: fix MMA latencies on Ampere
Konstantin Seurer (1):
- aco: Fixup out_launch_size_y in the RT prolog for 1D dispatch
Lionel Landwerlin (6):
- brw: fix invalid sparse bitfield offset computation
- brw: prevent LOAD_REG modifications on MOV_INDIRECT/BROADCAST
- brw: only consider cross lane access on non scalar VGRFs
- brw: fix ballot() type operations in shaders with HALT instructions
- anv: destroy sets when destroying pool
- vulkan/render_pass: Add a missing sType
Marek Olšák (2):
- r300: fix DXTC blits
- winsys/radeon: fix completely broken tessellation for gfx6-7
Mary Guillemard (5):
- hk: Fix maxVariableDescriptorCount with inline uniform block
- hk: Disable 1x in sampleLocationsSampleCounts
- hk: Remove unused allocation in queue_submit
- hk: Make width and height per block in HIC
- hk: Allocate the temp tile buffer in copy_image_to_image_cpu
Mel Henning (2):
- nvk: Fix maxVariableDescriptorCount with iub
- nvk: Really fix maxVariableDescriptorCount w/ iub
Mike Blumenkrantz (3):
- zink: defer swapchain updates for interval changes if acquired image is active
- zink: consistently set/unset msrtss in begin_rendering
- zink: collapse gfx pipeline fetching and binding conditionals
Natalie Vock (1):
- nir/lower_shader_calls: Repair SSA after wrap_instrs
Olivia Lee (1):
- panfrost: fix cl_local_size for precompiled shaders
Pierre-Eric Pelloux-Prayer (1):
- radeonsi: propagate shader updates for merged shaders
Ruijing Dong (1):
- radeonsi/vcn: Correct a typo condition for jpeg decoding
Sagar Ghuge (2):
- brw/rt: Move nir_build_vec3_mat_mult_col_major helper to header
- brw/rt: fix ray_object_(direction|origin) for closest-hit shaders
Taras Pisetskyi (1):
- drirc/anv: force_vk_vendor=-1 for Wuthering Waves
Timur Kristóf (4):
- radeonsi: Don't use compute queue with regalloc hang bug
- radv: Disable compute queues when the regalloc bug is present
- radv: Mitigate GPU hang on Hawaii in Dota 2 and RotTR
- ac/nir/ngg_mesh: Lower num_subgroups to constant
Valentine Burley (2):
- tu: Fix indexing with variable descriptor count
- tu: Fix maxVariableDescriptorCount with inline uniform blocks
Xaver Hugl (2):
- vulkan/wsi: require extended target volume support for scRGB
- vulkan/wsi: remove support for VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT
Yiwei Zhang (2):
- panvk: fix to advance vs driver_set properly
- panvk: fix to advance vs res_table properly

210
docs/relnotes/25.2.7.rst Normal file
View file

@ -0,0 +1,210 @@
Mesa 25.2.7 Release Notes / 2025-11-12
======================================
Mesa 25.2.7 is a bug fix release which fixes bugs found since the 25.2.6 release.
Mesa 25.2.7 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 25.2.7 implements the Vulkan 1.4 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA checksums
-------------
::
SHA256: b40232a642011820211aab5a9cdf754e106b0bce15044bc4496b0ac9615892ad mesa-25.2.7.tar.xz
SHA512: 87dd815e0d11d6ec0eb969ee93d3f376103bb899d90599e0b7902394e41c58139384df79f89633e132ca969348d3320f55308a74651d409b454d51f1bcda27bc mesa-25.2.7.tar.xz
New features
------------
- None
Bug fixes
---------
- Penumbra: Overture OpenGL game has graphical glitch for ice
- RustiCL: fence fd leak on CL-GL interop
- Uniform variable not updated correctly with shared contexts
- [radv] Borderlands 4 triggers a consistent GPU page fault on RDNA2
- radv: RE4 Separate Ways DLC hangs RDNA2 GPU
- ACO: fix a hazard when the number of attributes loaded/consumed don't match with VS prologs
- ACO: loading 64-bit attributes can override the fetch index in VS prologs
- nvk, nak: Broken icons in ENDLESS Legend 2 on a RTX 4080
- LLVMPipe's \`VkPhysicalDeviceAccelerationStructurePropertiesKHR::maxPrimitiveCount` is lower than Vulkan requires.
- asahi: DMABuf import of multi-plane YCbCr (NV12 from ISP) not renderer correctly
- asahi: DMABuf import of multi-plane YCbCr (NV12 from ISP) not renderer correctly
- brw: Gfx9 sampler messages violate r127 rule
- radv: No Man's Sky XESS page fault GPU reset
- r600/sfn: Assertion \`cir.alu_vec.empty()` failed
Changes
-------
Alyssa Rosenzweig (1):
- asahi,ail: fix multi-plane imports
Benjamin Cheng (2):
- vulkan/video: NULL check codec-specific chain
- radv/video: Fix dummy DPB addresses
Daniel Schürmann (1):
- radv/null_device: set more options which affect compilation
Danylo Piliaiev (2):
- vulkan: Always fill DS state for EXT_dynamic_rendering_unused_attachments
- tu: Use cmd->rp_trace u_trace for draw calls
Dave Airlie (1):
- c11/threads: fix build on c23
David Rosca (6):
- radeonsi/vcn: Fix AV1 bidir compound encode with order_hint disabled
- radv/video: Don't require encode FW version >= interface version
- radv/video: Fix AV1 bidir compound encode with order_hint disabled
- vulkan/video: Avoid NULL pointers in session parameters
- radv/video: Correctly handle no feedback query for encode
- radv/video: Add NULL checks for picture parameters
Dmitry Osipenko (1):
- virtio/vdrm: Fix varying offsets of struct vdrm_device members
Eric Engestrom (7):
- docs: add sha sum for 25.2.6
- .pick_status.json: Update to 2705d8bd8bb0cd049b4e91ac4e15ccc798abeda1
- .pick_status.json: Mark b2badb2b241b3f5637133634b6bb48ebb90e4fed as denominated
- .pick_status.json: Mark ff57c316964a73a7f763e2ff3ddfda99542813e1 as denominated
- asahi/virtio: fix memleak
- ci: track src/c11/ changes
- ci: track src/android_stub/ changes
Faith Ekstrand (3):
- drm-uapi: Import the new NVIDIA modifiers
- nil: Add support for Blackwell 8 and 16-bit modifiers
- nir: Add a couple panfrost sysvals to divergence analysis
Georg Lehmann (1):
- aco/gfx10_3: work around NSA hazard
Gert Wollny (1):
- r600/sfn: AR loads are not dependend on the future and other code blocks
Ian Romanick (2):
- brw: Apply Gfx9 vgrf127 workaround in more cases
- elk: Apply vgrf127 workaround in more cases
Janne Grunau (1):
- hk: Report the correct plane count in VkDrmFormatModifierProperties2?EXT
Karol Herbst (6):
- st/interop: fix fence leak
- rusticl/queue: fix error code for invalid queue properties part 1
- rusticl/queue: fix error code for invalid queue properties part 2
- rusticl/queue: fix error code for invalid sampler kernel arg
- rusticl/kernel: take no kernel_info reference inside the launch closure
- rusticl/spirv: preserve signed zeroes by default
Konstantin Seurer (5):
- lavapipe: Bump maxPrimitiveCount
- lavapipe: Zero image null descriptors
- lavapipe: Bump MAX_DESCRIPTOR_UNIFORM_BLOCK_SIZE
- gallivm/nir/soa: Use the sign of src1 for imod
- llvmpipe: Always recompute 1/w
Lars-Ivar Hesselberg Simonsen (3):
- panvk: Fix IUB decode
- pan/format: Fix mapping for I16F
- pan/format: Disable PAN_BIND_STORAGE_IMAGE for RGBA4/BGRA4
Lionel Landwerlin (3):
- u_trace: reserve chunk space before emitting copies
- anv: avoid invalid timestamp generation due to skipped commands
- vulkan/runtime: simplify robustness state hashing
Ludvig Lindau (1):
- panfrost: Make instrs_equal check res table/index
Marek Olšák (1):
- Revert ABI breakage "amd: Add user queue HQD count to hw_ip info"
Mel Henning (1):
- nak/opt_lop: Don't handle modifiers in dedup_srcs
Mike Blumenkrantz (1):
- zink: don't destroy old push layout when enabling fbfetch descriptor
Natalie Vock (1):
- radv: Fix PSO history with RT pipelines
Paul Gofman (1):
- driconf: add a workaround for Investigation Stories : gunsound
Ryan Houdek (1):
- freedreno/fdl: Fix typo in tiled_to_linear_2cpp
Sagar Ghuge (2):
- anv: Drop unwanted untyped flush for AS query
- intel/common: Consider 0 threads while setting TG
Samuel Pitoiset (3):
- radv: add a workaround for illegal depth/stencil descriptors with No Man's Sky
- aco: fix reserving VGPRs for 64-bit attributes in VS prologs
- radv,aco: wait for all VMEM loads when the prolog loads large 64-bit attributes
Sviatoslav Peleshko (2):
- mesa,driconf: Add WA to initialize vertex program outputs to vec4(0,0,0,1)
- driconf: Add vertex_program_default_out option for Penumbra: Overture
Tapani Pälli (1):
- anv: fix issues found with indirect data stride
Timothy Arceri (1):
- mesa: skip redundant uniform update optimisation if unsafe
Yiwei Zhang (6):
- panvk: fix sample shading of internal blend shader for MSAA
- llvmpipe: zero is also a valid fd
- llvmpipe: fix udmabuf mmap error check
- llvmpipe: add a missing alloc error handling in fd import
- llvmpipe: misc fixes for sparse binding
- glcpp/meson: fix libglcpp generated header dependency

249
docs/relnotes/25.2.8.rst Normal file
View file

@ -0,0 +1,249 @@
Mesa 25.2.8 Release Notes / 2025-12-04
======================================
Mesa 25.2.8 is a bug fix release which fixes bugs found since the 25.2.7 release.
Mesa 25.2.8 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 25.2.8 implements the Vulkan 1.4 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA checksums
-------------
::
SHA256: 097842f3e49d996868b38688db87b006f7d4541e93ce86d2f341d8b3e7be7c93 mesa-25.2.8.tar.xz
SHA512: a238965ee235bd9178d26b210fc3996b77927dab31964b76cd1e1e72cfffbefbd96e4a57ec4f5018205a58354cd41d6cf99bbc712b275a7518710a34511dfb13 mesa-25.2.8.tar.xz
New features
------------
- None
Bug fixes
---------
- FurMark gets glitchi graphics when using Vulkan API on UHD 620 (mesa 25.2.6 and 26.0)
- tu: resource leak
- [ANV][LNL] - Detroit: Become Human (1222140) - Flickering horizontal artifacts across the screen
- Zink on Android: failed to create dri2 screen
- Amnesia: The Bunker (2023) OpenGL graphics glitch on Intel graphics
- meson: When building radeonsi without llvm, it fails without setting amd_with_llvm to false explicitly
- venus: synchronization tests sometimes get stuck in semaphore/fence wait
- GNOME freeze, Nautilus crash and purple flickering on Intel Arc B580 with Mesa 25.2.2 (openSUSE Tumbleweed)
- Texture matrix stack pops do not seem to always update the texture matrix
- [BMG] Metro Exodus Enhanced Edition (1449560) - Crash
- Polaris, amdgpu: Application using VCE wedges GPU
- radv vulkan video encode does not process used_by_curr_pic_lt_flag correctly
- venus: random failures in dEQP.api.info.image_format_properties2.1d
- zink/radv: new cts fails on rdna3
- RADV Vulkan video encode isn't available on 25.2.7
Changes
-------
Aitor Camacho (2):
- vulkan/cmd_queue: Use vk_strdup and free allocated string memory
- vulkan/wsi: Fix double destroy of present_id_timeline at swapchain create
Anna Maniscalco (1):
- radv: recalculate legacy_gs_info on bind
Benjamin Cheng (4):
- radv/video: Align each layer of encode DPB to 256
- radv/video: Fix num_ref_idx_l{0,1} related overrides
- radv/video: Fix H264/H265 reference selection
- radv/video: Override direct_spatial_mv_pred to 1
Calder Young (3):
- brw: fix SIMD lowering of fp16 sampler message data with multiple components
- anv: Fix ray query shadow stack buffer size
- intel: Fix calculation of max_scratch_ids on fused devices
Christian Gmeiner (1):
- meson: require sysprof-capture-4 >= 4.49.0
Christoph Pillmayer (1):
- nir: Fix preseved metadata in sort_unstructured_blocks
Daniel Schürmann (2):
- nir/opt_large_constants: Fix dead deref instructions accessing lowered variables
- radv/shader_info: rename gs_ring_info -> legacy_gs_info and use union with ngg_info
Dave Airlie (1):
- dozen: return INCOMPATIBLE_DRIVER on instance create failure
David Rosca (6):
- radv/video: Fix enabling video encode
- vulkan/video: Fix coding AV1 seq_choose_screen_content_tools = 1
- radv/video: Fix coding allow_screen_content_tools and force_integer_mv
- radv/video: Fix coding used_by_curr_pic_lt_flag
- radeonsi/vce: Add workaround for unaligned input surface
- radeonsi/vcn: Reduce allocated size for pre-encode recon pics
Emma Anholt (1):
- tu: Fix leak of compute shader pipeline->base.executables_mem_ctx;
Eric Engestrom (6):
- docs: add sha sum for 25.2.7
- .pick_status.json: Update to df19ec302093b5e47c0d7556ea41af47d2b7af67
- .pick_status.json: Mark fa1fd2413f5a8a24959664e284372135b3deac83 as denominated
- .pick_status.json: Mark b2b5e83894a4e1dec0cd62f73f5598dd4e50c264 as denominated
- meson: auto-disable \`amd-use-llvm` when \`llvm=disabled`
- meson: auto-disable \`draw-use-llvm` when \`llvm=disabled`
Eric R. Smith (1):
- pan: fix a bifrost disassembly assert failure
Erik Faye-Lund (2):
- mesa/main: correct formatquery error-handling
- mesa/st: do not enable EXT_texture_buffer_object with rgba only
Faith Ekstrand (1):
- vulkan/drm-syncobj: Stop returning early waiting for sync files
Gert Wollny (1):
- r600/sfn: Don't start a new ALU-CF if LDS pipeline loads are pending
Ian Forbes (1):
- svga: Check if Stencil buffer is NULL
Ian Romanick (2):
- brw: Force allow_spilling when spill_all is set
- lavapipe: fp16 flrp must also be lowered
Jianxun Zhang (1):
- isl: Disable BMG Modifier (xe2)
Joshua Simmons (1):
- vtn: Fix OpCopyLogical destination type
Karol Herbst (2):
- rusticl/kernel: fix clGetKernelSuggestedLocalWorkSizeKHR implementation
- rusticl/kernel: Do not run kernels with a workgroup size beyond work_dim
Lionel Landwerlin (12):
- brw: fix workaround fence rlen field
- brw: fix SIMD lowering of sampler messages with fp16 data
- anv: ensure slab allocated memory matches image requirements
- anv: fixup load_ubo lowering
- brw: fixup 64bit atomics emulation on 2D array images
- anv: consider 64bit atomics on similar formats with mutable images
- anv: Wa_18040903259 only applies to RCS when in GPGPU mode
- brw: compute final copy propagation resulting source
- nir: fix lower_printf with no arguments
- spirv: fix printf generation
- nir/lower_printf: fix array alignment
- nir/lower_printf: fix missing singleton add
Mario Kleiner (1):
- wsi/wayland: Zero min_luminance, max_luminance HDR light levels are valid.
Matt Turner (1):
- meson: Fix sysprof-capture-4 dependency
Mel Henning (5):
- zink: Return zink_device in create_logical_device
- zink: Make screen->queue_lock a pointer
- zink: Create one queue lock per device
- zink: Lock queue_lock in zink_destroy_screen
- zink: Lock around screen_debug_marker_{begin,end}
Natalie Vock (4):
- aco/insert_nops: Consider s_setpc target susceptible to VALUReadSGPRHazard
- radv/rt: Keep updated nodes always active
- radv/rt: Correctly copy culling flags when updating to separate AS
- radv: Move VMID reservation to vkCreateDevice
Olivia Lee (2):
- panvk/csf: fix uninitialized read in draw context
- panvk/csf: explicitly set ls_sb_slot in set_fbds_provoking_vertex
Patrick Lerda (2):
- r600: fix rv770 read scratch compatibility
- r600: fix error filters compatibility
Paulo Zanoni (1):
- anv/sparse: we can support R64 and other atomics emulated formats
Pierre-Eric Pelloux-Prayer (1):
- radeonsi/sqtt: clear out sqtt bo on resize
Rob Clark (1):
- freedreno/a6xx: Fix UB in convert_color()
Samuel Pitoiset (2):
- radv: fix per-submit RGP captures on video queues
- radv: reduce maxTexelBufferElements to 1<<29
Sushma Venkatesh Reddy (1):
- drirc: Add anv_assume_full_subgroups for Detroit: Become Human
Tapani Pälli (3):
- drirc/iris: add drirc to disable threaded context
- drirc: set intel_disable_threaded_context for Amnesia The Bunker
- anv: add furmark workaround layer
Timothy Arceri (2):
- mesa: fix _mesa_update_texture_matrices()
- util/driconf: Add linux version of Penumbra fixes
Timur Kristóf (3):
- ac/nir/ngg: Fix scratch space for NGG GS streamout
- radv: Disable sparse mapping when unsupported by VM
- ac/gpu_info: Disable sparse VM mappings pre-Polaris, for now
Valentine Burley (2):
- intel/ci: Drop timeout overrides for pre-merge jobs
- egl: Disable kopper on Android
Yiwei Zhang (2):
- venus: use seq_cst for ring cs and tail update ordering
- venus: fix racy semaphore feedback counter update

6068
docs/relnotes/25.3.0.rst Normal file

File diff suppressed because it is too large Load diff

279
docs/relnotes/25.3.1.rst Normal file
View file

@ -0,0 +1,279 @@
Mesa 25.3.1 Release Notes / 2025-12-03
======================================
Mesa 25.3.1 is a bug fix release which fixes bugs found since the 25.3.0 release.
Mesa 25.3.1 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 25.3.1 implements the Vulkan 1.4 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA checksums
-------------
::
SHA256: 059d0d985622f49588f01aa29152804f4da8ffe6add046e00a52923379c2d8da mesa-25.3.1.tar.xz
SHA512: 7e2f7295f1f4df129935b60d75c890f6ae585ecc511f69f55a61826df5f2434ffdb4109c632af9842a986bf9beed430a0404d377e8335b71fa36682bd10533ba mesa-25.3.1.tar.xz
New features
------------
- None
Bug fixes
---------
- venus: synchronization tests sometimes get stuck in semaphore/fence wait
- [ANV][LNL] - Detroit: Become Human (1222140) - Flickering horizontal artifacts across the screen
- [ANV][LNL] - Eternal Strands (1491410) - Colorful graphical aberrations are present whenever a 3D asset is visible.
- [ANV][DG2/LNL] SolarBay extreme RT regression
- After 25.3 update some app windows became glitchy on uhd 620
- FurMark gets glitchi graphics when using Vulkan API on UHD 620 (mesa 25.2.6 and 26.0)
- tu: resource leak
- Regression: MSVC fails to build 32 bit binaries
- Zink on Android: failed to create dri2 screen
- Amnesia: The Bunker (2023) OpenGL graphics glitch on Intel graphics
- freedreno, tu: resource leak
- meson: When building radeonsi without llvm, it fails without setting amd_with_llvm to false explicitly
- loader.c:156:14: error: call to undeclared function 'drmCommandWriteRead'
- radv: RB+ for depth-only is broken with unused color attachments
- win_bison random failure extern_stdin:40: ERROR: end of file in string
- Texture matrix stack pops do not seem to always update the texture matrix
- Polaris, amdgpu: Application using VCE wedges GPU
- radv vulkan video encode does not process used_by_curr_pic_lt_flag correctly
- [BMG] Metro Exodus Enhanced Edition (1449560) - Crash
- venus: random failures in dEQP.api.info.image_format_properties2.1d
Changes
-------
Aitor Camacho (2):
- vulkan/cmd_queue: Use vk_strdup and free allocated string memory
- vulkan/wsi: Fix double destroy of present_id_timeline at swapchain create
Alyssa Rosenzweig (1):
- nir/sweep: fix use-after-free with dominance LCA
Benjamin Cheng (4):
- radv/video: Align each layer of encode DPB to 256
- radv/video: Fix num_ref_idx_l{0,1} related overrides
- radv/video: Fix H264/H265 reference selection
- radv/video: Override direct_spatial_mv_pred to 1
Calder Young (3):
- brw: fix SIMD lowering of fp16 sampler message data with multiple components
- anv: Fix ray query shadow stack buffer size
- intel: Fix calculation of max_scratch_ids on fused devices
Christoph Pillmayer (1):
- nir: Fix preseved metadata in sort_unstructured_blocks
Connor Abbott (1):
- tu: Handle case where pipeline writes unused color attachments
Daniel Schürmann (1):
- nir/opt_large_constants: Fix dead deref instructions accessing lowered variables
Dave Airlie (1):
- dozen: return INCOMPATIBLE_DRIVER on instance create failure
David Rosca (7):
- vulkan/video: Fix coding AV1 seq_choose_screen_content_tools = 1
- radv/video: Fix coding allow_screen_content_tools and force_integer_mv
- radv/video: Fix coding used_by_curr_pic_lt_flag
- radeonsi/vce: Add workaround for unaligned input surface
- radeonsi/vcn: Reduce allocated size for pre-encode recon pics
- radeonsi/vcn: Fix maybe uninitialized warning
- radv/video: Fix AV1 quantization map maxQIndexDelta value
Dylan Baker (9):
- docs: Add sha sums for 25.3.0
- .pick_status.json: Update to 018f45f9812cb5b728e2eb32a5b350efdd9ac90f
- .pick_status.json: Update to 7a3bfd1f7913819db315e6db8b42520a2d862690
- .pick_status.json: Update to 7c193ffef1a8316b4b666c9c2ec5afdd2035dd89
- .pick_status.json: Update to bcedc88f2142d9a2b277c7b848b744e13d426f76
- .pick_status.json: Update to 076a3834374b2ccd43dd1c7ce73f44795d601300
- .pick_status.json: Update to a71b4a4b954dcfc1667dc1b36f1f25ac02d3469b
- .pick_status.json: Update to ac37885fc85203c08f09345c637b6a21f642ed66
- docs/relnotes/25.3.0: Escape some rst language constructs
Emma Anholt (1):
- tu: Fix leak of compute shader pipeline->base.executables_mem_ctx;
Eric Engestrom (3):
- meson: auto-disable \`amd-use-llvm` when \`llvm=disabled`
- meson: auto-disable \`draw-use-llvm` when \`llvm=disabled`
- ci: use $CI_TRON_JOB_PRIORITY tag on all ci-tron jobs
Eric R. Smith (1):
- pan: fix a bifrost disassembly assert failure
Erik Faye-Lund (4):
- pan/kmod: fix priority query logic
- panfrost: remove stale code
- mesa/main: correct formatquery error-handling
- mesa/st: do not enable EXT_texture_buffer_object with rgba only
Faith Ekstrand (1):
- vulkan/drm-syncobj: Stop returning early waiting for sync files
Gil Pedersen (1):
- intel: Add PIPE_FORMAT_R10G10B10X2_UNORM support
Gurchetan Singh (1):
- util: fix arithmetic on a pointer to void warning
Hyunjun Ko (1):
- vulkan/video: Fix H.265 long-term reference handling
Ian Forbes (1):
- svga: Check if Stencil buffer is NULL
Ian Romanick (2):
- brw: Force allow_spilling when spill_all is set
- lavapipe: fp16 flrp must also be lowered
Icenowy Zheng (1):
- pvr: enable samplerMirrorClampToEdge feature
Karol Herbst (2):
- rusticl/kernel: fix clGetKernelSuggestedLocalWorkSizeKHR implementation
- rusticl/kernel: Do not run kernels with a workgroup size beyond work_dim
Lionel Landwerlin (15):
- brw: fixup 64bit atomics emulation on 2D array images
- brw: fix SIMD lowering of sampler messages with fp16 data
- brw: fix workaround fence rlen field
- anv: fixup load_ubo lowering
- anv: ensure slab allocated memory matches image requirements
- anv: consider 64bit atomics on similar formats with mutable images
- anv: Wa_18040903259 only applies to RCS when in GPGPU mode
- brw: compute final copy propagation resulting source
- nir: fix lower_printf with no arguments
- spirv: fix printf generation
- nir/lower_printf: fix array alignment
- nir/lower_printf: fix missing singleton add
- vulkan/runtime: track dynamic descriptor offsets for RT pipelines
- anv: fix broken ray tracing dynamic descriptors
- anv: add 32-wide subgroup requirement heuristic
Matt Turner (2):
- meson: Fix sysprof-capture-4 dependency
- meson: Let -Ddraw-use-llvm=false work for R300 on non-x86
Mel Henning (5):
- zink: Return zink_device in create_logical_device
- zink: Make screen->queue_lock a pointer
- zink: Create one queue lock per device
- zink: Lock queue_lock in zink_destroy_screen
- zink: Lock around screen_debug_marker_{begin,end}
Natalie Vock (3):
- aco/insert_nops: Consider s_setpc target susceptible to VALUReadSGPRHazard
- radv/rt: Keep updated nodes always active
- radv/rt: Correctly copy culling flags when updating to separate AS
Olivia Lee (2):
- panvk/csf: fix uninitialized read in draw context
- panvk/csf: explicitly set ls_sb_slot in set_fbds_provoking_vertex
Patrick Lerda (2):
- r600: fix rv770 read scratch compatibility
- r600: fix error filters compatibility
Pierre-Eric Pelloux-Prayer (2):
- radeonsi/sqtt: clear out sqtt bo on resize
- mesa: fix function prototype
Qiang Yu (1):
- glsl: support barrier() for task and mesh shader
Rob Clark (2):
- freedreno/a6xx: Fix UB in convert_color()
- freedreno: Fix internal VBO reference leak
Samuel Pitoiset (2):
- radv: fix RB+ for depth-only with unused attachments
- radv: fix per-submit RGP captures on video queues
Sushma Venkatesh Reddy (1):
- drirc: Add anv_assume_full_subgroups for Detroit: Become Human
Tapani Pälli (4):
- drirc/iris: add drirc to disable threaded context
- drirc: set intel_disable_threaded_context for Amnesia The Bunker
- anv: add furmark workaround layer
- anv: add vk_wsi_disable_unordered_submits and enable for GTK
Timothy Arceri (2):
- mesa: fix _mesa_update_texture_matrices()
- util/driconf: Add linux version of Penumbra fixes
Timur Kristóf (2):
- radv: Disable sparse mapping when unsupported by VM
- ac/gpu_info: Disable sparse VM mappings pre-Polaris, for now
Valentine Burley (1):
- egl: Disable kopper on Android
Yiwei Zhang (4):
- venus: use seq_cst for ring cs and tail update ordering
- venus: avoid re-imported dma-buf to have a larger map size
- venus: properly fix the blob mem mapping size
- venus: fix racy semaphore feedback counter update
Yonggang Luo (1):
- ci/microsoft: Downgrading WinFlexBison.win_flex_bison to version 2.5.24
Yurii Kolesnykov (1):
- loader: Wrap nouveau_zink_predicate with HAVE_LIBDRM

240
docs/relnotes/25.3.2.rst Normal file
View file

@ -0,0 +1,240 @@
Mesa 25.3.2 Release Notes / 2025-12-17
======================================
Mesa 25.3.2 is a bug fix release which fixes bugs found since the 25.3.1 release.
Mesa 25.3.2 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 25.3.2 implements the Vulkan 1.4 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA checksums
-------------
::
SHA256: e69dab0d0ea03e3e8cb141b032f58ea9fcf3b9c1f61b31f6592cb4bbd8d0185d mesa-25.3.2.tar.xz
SHA512: 499cb0aa254b5a706fb6c2414c23b9d5d03d9397475f7ad16744b982303a2a2bf643ef7adc64870645ee4355b5f95695becd6caff7d7f7caf698e6269589aa13 mesa-25.3.2.tar.xz
New features
------------
- None
Bug fixes
---------
- [bisected][iris] - Celeste - Lighting artifacts during gameplay
- [bsw][regression][bisected][hasvk] various crashing tests
- radv: incorrect vectorization of 8-bit/16-bit causes random GPU hangs with DXVK
- LLVM crashes when loading specific Minecraft Shaderpacks
- Firefox crashes in some Gallium drivers since mesa 25.3.0
- radv: Is radv_wsi_get_prime_blit_queue bugged?
- radv: don't include constant data in RGP captures
- [anv] mpv video playback blacks out when resized larger than video resolution
- corrupted video when using pRefList0ModOperations on radv h264
- [radv] [feature request] Add an env var to not expose resizable bar to app
- Steam Deck/9060 XT Consistently hang with game demo "Cursemark"
Changes
-------
Aitor Camacho (2):
- wsi/metal: Fix command buffer release at destroy
- wsi/metal: Fix blit_imate_to_image's pool selection for cmd buffer alloc
Anna Maniscalco (1):
- radv: recalculate legacy_gs_info on bind
Ashley Smith (1):
- panfrost,panvk: Enable shader_realtime_clock on panthor 1.6
Benjamin Cheng (2):
- radv/video: Fix force_integer_mv=1 on intra frame
- radv/video: Always end ref pic modification list
Boris Brezillon (5):
- panvk: Fix a memory leak in the descriptor set logic
- pan/bi: Fix leak in bi_iterator_schedule()
- panvk: Don't leak shader binaries when loaded from the cache
- panvk: Free the decode context in the create_device() error path
- pan/cs: Don't leak builder resources
Caio Oliveira (1):
- nir/gcm: Consider dead code elimination done by GCM as progress
Calder Young (3):
- anv: Fix scratch pool buffer allocation sizes
- anv: Fix misplaced assertion in anv_scratch_pool_alloc
- anv: Fix typo when checking if async rt scratch size changed
Connor Abbott (4):
- tu: Fix GRAS_BIN_FOVEAT* programming with more than 1 layer
- tu: Fix FragCoord offset when HW viewport offset is enabled
- tu: Fill render pass state when resuming
- ir3: Fix condition for using uniform predicates
Dave Airlie (1):
- nak/cmat: free the type mapping hash table.
Dylan Baker (16):
- docs: Add checksums for 25.3.1
- .pick_status.json: Update to b75cd07265b6d34cefde80399e7ff0cd7652dbca
- .pick_status.json: Mark 829bd406c04566962268138195ecb2c4d78da5cf as backported
- .pick_status.json: Update to b13003133d4440bfd33fc320c051b474458c8e02
- .pick_status.json: Update to 0104b3df414bddeab37ae6cf116c532410134bc0
- .pick_status.json: Update to f912db3f8dc0c0cb8cb2358e6ec79dd03b7a875d
- .pick_status.json: Update to 72b43c0595d41c233d039c32f63120e0c3c27f59
- .pick_status.json: Update to 095c2acf0180a1cbe7d60b6ffbfcd14e35724e22
- anv/video: Read the right source for memcpy
- anv/video: Cast intentional read past end of struct member to void*
- .pick_status.json: Update to b5cf3b1628bdf473ea40a6756a4098eb56151bbc
- .pick_status.json: Update to 518705a4fe794683a4c672f803e011490d24c12c
- .pick_status.json: Update to 9c16bbd0237575e5dd9bd4e5f25d6da990ac4925
- .pick_status.json: Update to dfdaee5ca74fbf1945326b454079575826df5a89
- .pick_status.json: Mark 6dff50c8bc7430bf04c0dc5d8dc648f6ed73e4f3 as backported
- .pick_status.json: Mark bbc8ce27048440befc0519ac03eeefa933f6ef0d as backported
Eric R. Smith (1):
- panfrost: do not allow skipping of fragment shader when alpha-to-coverage
Erik Faye-Lund (2):
- docs/panfrost: remove some stray newlines
- panfrost: do not over-estimate memory needed for dummy-rt
Faith Ekstrand (2):
- pan/bi: Fix LD_VAR_BUF indirect offset calculations
- pan/bi: Handle small vectors in bi_src_index()
Georg Lehmann (3):
- nir/opt_uniform_subgroup: don't try to optimize non trivial clustered reduce
- nir/opt_uniform_subgroup: fix swizzle_amd without fetch_inactive
- nir/divergence_analysis: fix swizzle_amd without fetch inactive
Gurchetan Singh (1):
- gfxstream: fix logspam in TLS helper function
Hans-Kristian Arntzen (1):
- egl/x11: Fix memory leak when querying translated coord.
Hyunjun Ko (1):
- anv/video: fix VP9 chroma subsampling format detection
Janne Grunau (1):
- util/driconf/asahi: Override GL renderer for web browsers
Karmjit Mahil (1):
- gallium: Fix gnu-empty-initalizer error
Karol Herbst (1):
- nir: add ACCESS to shared_uniform_block_intel
Kenneth Graunke (1):
- nir: Fix mod analysis of ishl to shift the recursive result
Konstantin Seurer (1):
- nir: Ignore ray query ranges that don't start with rq_initialize
LingMan (3):
- rust: build \`equivalent` dependency with the correct edition
- rust: build \`paste` dependency with the correct edition
- rust: build \`ucd-trie` dependency with the correct edition
Lionel Landwerlin (8):
- anv: fix internal representations of shaders
- anv: add missing device_memory_report for shaders
- anv: fixup error path for shader allocation
- anv: disable crast on SKL
- vulkan/runtime: add an internal flag for independent sets
- anv: reintroduce non independent sets dynamic descriptor optimization
- anv: move load_num_workgroups tracking to driver
- anv: fix dynamic buffers & independent sets
Mary Guillemard (1):
- nvk: Use rendering state attachment count when setting SET_CT_SELECT
Nanley Chery (3):
- anv: Don't allow STORAGE + CCS for Y_TILED mod
- intel/isl: Only assert surface addresses on gfx9+
- iris: Fix pipe control around fast-clears
Natalie Vock (1):
- radv: Move VMID reservation to vkCreateDevice
Patrick Lerda (1):
- r600: improve cayman scissor 1x1 workaround
Qiang Yu (1):
- ac/llvm: workaround legacy fma intrinsic crash on gfx12
Rhys Perry (2):
- ac/nir: fix calculation of aligned_new_size
- ac/nir: fix check for increasing size of non-descriptor loads
Rob Clark (3):
- freedreno/decode: Add extra indent levels
- gallium: Make upload_cb0 return a releasebuf
- asahi: Set prefer_real_buffer_in_constbuf0
Samuel Pitoiset (4):
- radv: add radv_hide_rebar_on_dgpu and enable for Red Dead Redemption 2
- radv: reduce maxTexelBufferElements to 1<<29
- radv: only include executable size when capturing shaders with RGP
- radv: fix race condition when getting the blit queue
Timothy Arceri (1):
- util/driconf: add Cursemark workaround
Utku Iseri (1):
- panfrost: add earlyzs FPK condition for v6-
Valentine Burley (1):
- panfrost/ci: Fix GitLab rules after YAML split
Yiwei Zhang (1):
- pan: fix pan_blend_reads_dest to consider special min/max funcs

View file

@ -1,89 +1,22 @@
EGL_EXT_create_context_robustness support on Panfrost V10+ VK_KHR_relaxed_block_layout on pvr
GL_ARB_robust_buffer_access_behavior, GL_KHR_robust_buffer_access_behavior and GL_KHR_robustness support on Panfrost VK_KHR_storage_buffer_storage_class on pvr
VK_EXT_mutable_descriptor_type on panvk/v9+ VK_EXT_external_memory_acquire_unmodified on panvk
GL_KHR_robustness on v3d VK_EXT_discard_rectangles on NVK
VK_ARM_shader_core_builtins on panvk VK_KHR_present_id on HoneyKrisp
VK_KHR_shader_untyped_pointers on anv VK_KHR_present_id2 on HoneyKrisp
cl_ext_immutable_memory_objects VK_KHR_present_wait on HoneyKrisp
VK_KHR_video_encode_intra_refresh on radv VK_KHR_present_wait2 on HoneyKrisp
VK_KHR_video_encode_quantization_map on radv VK_KHR_maintenance10 on ANV, NVK, RADV
GL_ATI_meminfo and GL_NVX_gpu_memory_info on r300 VK_EXT_shader_uniform_buffer_unsized_array on NVK, RADV
VK_KHR_shader_untyped_pointers on anv and RADV VK_EXT_device_memory_report on panvk
VK_KHR_maintenance8 on NVK VK_VALVE_video_encode_rgb_conversion on radv
VK_KHR_maintenance9 on NVK VK_EXT_custom_resolve on RADV
cl_khr_semaphore on radeonsi and zink GL_EXT_shader_pixel_local_storage on Panfrost v6+
cl_khr_external_semaphore on radeonsi and zink VK_EXT_image_drm_format_modifier on panvk/v7
cl_khr_external_semaphore_sync_fd on radeonsi and zink VK_KHR_sampler_ycbcr_conversion on panvk/v7
GL_NV_shader_atomic_int64 on radeonsi and Panfrost V9+ sparseResidencyImage2D on panvk v10+
VK_KHR_maintenance7 on panvk/v10+ sparseResidencyStandard2DBlockShape on panvk v10+
VK_KHR_maintenance8 on panvk/v10+ VK_KHR_surface_maintenance1 promotion everywhere EXT is exposed
VK_KHR_maintenance9 on panvk VK_KHR_swapchain_maintenance1 promotion everywhere EXT is exposed
VK_AMD_buffer_marker on NVK VK_KHR_dynamic_rendering on PowerVR
VK_EXT_ycbcr_2plane_444_formats on radv VK_EXT_multisampled_render_to_single_sampled on panvk
Removed VDPAU frontend
GL_NV_representative_fragment_test on zink
VK_KHR_maintenance9 on HoneyKrisp
sparseBinding on panvk/v10+
sparseResidencyBuffer on panvk/v10+
Vulkan 1.2 on pvr
VK_KHR_create_renderpass2 on pvr
VK_KHR_dedicated_allocation on pvr
VK_KHR_depth_stencil_resolve on pvr
VK_KHR_descriptor_update_template on pvr
VK_KHR_imageless_framebuffer on pvr
VK_KHR_line_rasterization on pvr
VK_KHR_maintenance1 on pvr
VK_KHR_maintenance2 on pvr
VK_KHR_maintenance3 on pvr
VK_KHR_multiview on pvr
VK_KHR_robustness2 on pvr
VK_KHR_separate_depth_stencil_layouts on pvr
VK_KHR_shader_draw_parameters on pvr
VK_KHR_shader_float_controls on pvr
VK_KHR_shader_subgroup_extended_types on pvr
VK_KHR_spirv_1_4 on pvr
VK_KHR_shader_terminate_invocation on pvr
VK_KHR_swapchain_mutable_format on pvr
VK_KHR_vertex_attribute_divisor on pvr
VK_EXT_border_color_swizzle on pvr
VK_EXT_color_write_enable on pvr
VK_EXT_custom_border_color on pvr
VK_EXT_depth_clamp_zero_one on pvr
VK_EXT_depth_clip_enable on pvr
VK_EXT_extended_dynamic_state on pvr
VK_EXT_extended_dynamic_state2 on pvr
VK_EXT_extended_dynamic_state3 on pvr
VK_EXT_image_2d_view_of_3d on pvr
VK_EXT_line_rasterization on pvr
VK_EXT_physical_device_drm on pvr
VK_EXT_provoking_vertex on pvr
VK_EXT_robustness2 on pvr
VK_EXT_queue_family_foreign on pvr
VK_EXT_separate_stencil_usage on pvr
VK_EXT_shader_demote_to_helper_invocation on pvr
VK_EXT_vertex_attribute_divisor on pvr
imageCubeArray on pvr
independentBlend on pvr
sampleRateShading on pvr
logicOp on pvr
drawIndirectFirstInstance on pvr
alphaToOne on pvr
samplerAnisotropy on pvr
shaderStorageImageExtendedFormats on pvr
shaderStorageImageReadWithoutFormat on pvr
shaderStorageImageWriteWithoutFormat on pvr
shaderClipDistance on pvr
shaderCullDistance on pvr
VK_EXT_zero_initialize_device_memory on pvr
VK_KHR_sampler_mirror_clamp_to_edge on pvr
VK_KHR_shader_non_semantic_info on pvr
VK_KHR_shader_relaxed_extended_instruction on pvr
VK_EXT_shader_replicated_composites on pvr
VK_KHR_device_group_creation on pvr
VK_KHR_map_memory2 on pvr
VK_EXT_map_memory_placed on pvr
VK_KHR_device_group on pvr
VK_KHR_buffer_device_address on pvr
GL_EXT_mesh_shader on zink
VK_KHR_wayland_surface on pvr
VK_NVX_image_view_handle on NVK

View file

@ -497,11 +497,12 @@ Our documentation is written as `reStructuredText`_ files in the
.. code-block:: sh .. code-block:: sh
# Install dependencies (adapt for your distribution) # Install dependencies (adapt for your distribution)
apk add coreutils graphviz py3-clang clang-dev musl-dev linux-headers apk add coreutils graphviz clang-dev musl-dev linux-headers
pip3 install sphinx===5.1.1 mako===1.2.3 hawkmoth===0.16.0 python3 -m venv docs-build
./docs-build/bin/pip3 install sphinx===8.2.3 mako===1.2.3 hawkmoth===0.19.0 clang===$(llvm-config --version)
# Build docs # Build docs (on Debian, set LD_LIBRARY_PATH to /usr/lib/llvm-VERSION/lib so it can find libclang.so)
sphinx-build -W -b html docs docs-html/ ./docs-build/bin/sphinx-build -W -b html docs docs-html/
The preferred language of the documentation is US English. This The preferred language of the documentation is US English. This
doesn't mean that everyone is expected to pay close attention to doesn't mean that everyone is expected to pay close attention to

View file

@ -75,7 +75,8 @@ __BEGIN_DECLS
#define ATRACE_TAG_AIDL (1<<24) #define ATRACE_TAG_AIDL (1<<24)
#define ATRACE_TAG_NNAPI (1<<25) #define ATRACE_TAG_NNAPI (1<<25)
#define ATRACE_TAG_RRO (1<<26) #define ATRACE_TAG_RRO (1<<26)
#define ATRACE_TAG_LAST ATRACE_TAG_RRO #define ATRACE_TAG_THERMAL (1 << 27)
#define ATRACE_TAG_LAST ATRACE_TAG_THERMAL
// Reserved for initialization. // Reserved for initialization.
#define ATRACE_TAG_NOT_READY (1ULL<<63) #define ATRACE_TAG_NOT_READY (1ULL<<63)
@ -88,6 +89,36 @@ __BEGIN_DECLS
#error ATRACE_TAG must be defined to be one of the tags defined in cutils/trace.h #error ATRACE_TAG must be defined to be one of the tags defined in cutils/trace.h
#endif #endif
/** Internal implementation detail. Do not use. */
void atrace_begin_body(const char*);
/** Internal implementation detail. Do not use. */
void atrace_end_body();
/** Internal implementation detail. Do not use. */
void atrace_async_begin_body(const char*, int32_t);
/** Internal implementation detail. Do not use. */
void atrace_async_end_body(const char*, int32_t);
/** Internal implementation detail. Do not use. */
void atrace_async_for_track_begin_body(const char*, const char*, int32_t);
/** Internal implementation detail. Do not use. */
void atrace_async_for_track_end_body(const char*, int32_t);
/** Internal implementation detail. Do not use. */
void atrace_instant_body(const char*);
/** Internal implementation detail. Do not use. */
void atrace_instant_for_track_body(const char*, const char*);
/** Internal implementation detail. Do not use. */
void atrace_int_body(const char*, int32_t);
/** Internal implementation detail. Do not use. */
void atrace_int64_body(const char*, int64_t);
/** /**
* Opens the trace file for writing and reads the property for initial tags. * Opens the trace file for writing and reads the property for initial tags.
* The atrace.tags.enableflags property sets the tags to trace. * The atrace.tags.enableflags property sets the tags to trace.
@ -158,7 +189,6 @@ static inline uint64_t atrace_is_tag_enabled(uint64_t tag)
static inline void atrace_begin(uint64_t tag, const char* name) static inline void atrace_begin(uint64_t tag, const char* name)
{ {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) { if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
void atrace_begin_body(const char*);
atrace_begin_body(name); atrace_begin_body(name);
} }
} }
@ -171,7 +201,6 @@ static inline void atrace_begin(uint64_t tag, const char* name)
static inline void atrace_end(uint64_t tag) static inline void atrace_end(uint64_t tag)
{ {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) { if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
void atrace_end_body();
atrace_end_body(); atrace_end_body();
} }
} }
@ -189,7 +218,6 @@ static inline void atrace_async_begin(uint64_t tag, const char* name,
int32_t cookie) int32_t cookie)
{ {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) { if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
void atrace_async_begin_body(const char*, int32_t);
atrace_async_begin_body(name, cookie); atrace_async_begin_body(name, cookie);
} }
} }
@ -202,11 +230,72 @@ static inline void atrace_async_begin(uint64_t tag, const char* name,
static inline void atrace_async_end(uint64_t tag, const char* name, int32_t cookie) static inline void atrace_async_end(uint64_t tag, const char* name, int32_t cookie)
{ {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) { if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
void atrace_async_end_body(const char*, int32_t);
atrace_async_end_body(name, cookie); atrace_async_end_body(name, cookie);
} }
} }
/**
* Trace the beginning of an asynchronous event. In addition to the name and a
* cookie as in ATRACE_ASYNC_BEGIN/ATRACE_ASYNC_END, a track name argument is
* provided, which is the name of the row where this async event should be
* recorded. The track name, name, and cookie used to begin an event must be
* used to end it.
* The cookie here must be unique on the track_name level, not the name level.
*/
#define ATRACE_ASYNC_FOR_TRACK_BEGIN(track_name, name, cookie) \
atrace_async_for_track_begin(ATRACE_TAG, track_name, name, cookie)
static inline void atrace_async_for_track_begin(uint64_t tag, const char* track_name,
const char* name, int32_t cookie) {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
atrace_async_for_track_begin_body(track_name, name, cookie);
}
}
/**
* Trace the end of an asynchronous event.
* This should correspond to a previous ATRACE_ASYNC_FOR_TRACK_BEGIN.
*/
#define ATRACE_ASYNC_FOR_TRACK_END(track_name, cookie) \
atrace_async_for_track_end(ATRACE_TAG, track_name, cookie)
static inline void atrace_async_for_track_end(uint64_t tag, const char* track_name,
int32_t cookie) {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
atrace_async_for_track_end_body(track_name, cookie);
}
}
/**
* Trace an instantaneous context. name is used to identify the context.
*
* An "instant" is an event with no defined duration. Visually is displayed like a single marker
* in the timeline (rather than a span, in the case of begin/end events).
*
* By default, instant events are added into a dedicated track that has the same name of the event.
* Use atrace_instant_for_track to put different instant events into the same timeline track/row.
*/
#define ATRACE_INSTANT(name) atrace_instant(ATRACE_TAG, name)
static inline void atrace_instant(uint64_t tag, const char* name) {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
atrace_instant_body(name);
}
}
/**
* Trace an instantaneous context. name is used to identify the context.
* track_name is the name of the row where the event should be recorded.
*
* An "instant" is an event with no defined duration. Visually is displayed like a single marker
* in the timeline (rather than a span, in the case of begin/end events).
*/
#define ATRACE_INSTANT_FOR_TRACK(trackName, name) \
atrace_instant_for_track(ATRACE_TAG, trackName, name)
static inline void atrace_instant_for_track(uint64_t tag, const char* track_name,
const char* name) {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
atrace_instant_for_track_body(track_name, name);
}
}
/** /**
* Traces an integer counter value. name is used to identify the counter. * Traces an integer counter value. name is used to identify the counter.
* This can be used to track how a value changes over time. * This can be used to track how a value changes over time.
@ -215,7 +304,6 @@ static inline void atrace_async_end(uint64_t tag, const char* name, int32_t cook
static inline void atrace_int(uint64_t tag, const char* name, int32_t value) static inline void atrace_int(uint64_t tag, const char* name, int32_t value)
{ {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) { if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
void atrace_int_body(const char*, int32_t);
atrace_int_body(name, value); atrace_int_body(name, value);
} }
} }
@ -228,7 +316,6 @@ static inline void atrace_int(uint64_t tag, const char* name, int32_t value)
static inline void atrace_int64(uint64_t tag, const char* name, int64_t value) static inline void atrace_int64(uint64_t tag, const char* name, int64_t value)
{ {
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) { if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
void atrace_int64_body(const char*, int64_t);
atrace_int64_body(name, value); atrace_int64_body(name, value);
} }
} }

View file

@ -1489,29 +1489,6 @@ struct drm_amdgpu_info_hw_ip {
__u32 available_rings; __u32 available_rings;
/** version info: bits 23:16 major, 15:8 minor, 7:0 revision */ /** version info: bits 23:16 major, 15:8 minor, 7:0 revision */
__u32 ip_discovery_version; __u32 ip_discovery_version;
/* Userq available slots */
__u32 userq_num_slots;
};
/* GFX metadata BO sizes and alignment info (in bytes) */
struct drm_amdgpu_info_uq_fw_areas_gfx {
/* shadow area size */
__u32 shadow_size;
/* shadow area base virtual mem alignment */
__u32 shadow_alignment;
/* context save area size */
__u32 csa_size;
/* context save area base virtual mem alignment */
__u32 csa_alignment;
};
/* IP specific metadata related information used in the
* subquery AMDGPU_INFO_UQ_FW_AREAS
*/
struct drm_amdgpu_info_uq_fw_areas {
union {
struct drm_amdgpu_info_uq_fw_areas_gfx gfx;
};
}; };
struct drm_amdgpu_info_num_handles { struct drm_amdgpu_info_num_handles {
@ -1577,6 +1554,39 @@ struct drm_amdgpu_info_gpuvm_fault {
__u32 vmhub; __u32 vmhub;
}; };
struct drm_amdgpu_info_uq_metadata_gfx {
/* shadow area size for gfx11 */
__u32 shadow_size;
/* shadow area base virtual alignment for gfx11 */
__u32 shadow_alignment;
/* context save area size for gfx11 */
__u32 csa_size;
/* context save area base virtual alignment for gfx11 */
__u32 csa_alignment;
};
struct drm_amdgpu_info_uq_metadata_compute {
/* EOP size for gfx11 */
__u32 eop_size;
/* EOP base virtual alignment for gfx11 */
__u32 eop_alignment;
};
struct drm_amdgpu_info_uq_metadata_sdma {
/* context save area size for sdma6 */
__u32 csa_size;
/* context save area base virtual alignment for sdma6 */
__u32 csa_alignment;
};
struct drm_amdgpu_info_uq_metadata {
union {
struct drm_amdgpu_info_uq_metadata_gfx gfx;
struct drm_amdgpu_info_uq_metadata_compute compute;
struct drm_amdgpu_info_uq_metadata_sdma sdma;
};
};
/* /*
* Supported GPU families * Supported GPU families
*/ */

View file

@ -979,14 +979,20 @@ extern "C" {
* 2 = Gob Height 8, Turing+ Page Kind mapping * 2 = Gob Height 8, Turing+ Page Kind mapping
* 3 = Reserved for future use. * 3 = Reserved for future use.
* *
* 22:22 s Sector layout. On Tegra GPUs prior to Xavier, there is a further * 22:22 s Sector layout. There is a further bit remapping step that occurs
* bit remapping step that occurs at an even lower level than the * 26:27 at an even lower level than the page kind and block linear
* page kind and block linear swizzles. This causes the layout of * swizzles. This causes the bit arrangement of surfaces in memory
* surfaces mapped in those SOC's GPUs to be incompatible with the * to differ subtly, and prevents direct sharing of surfaces between
* equivalent mapping on other GPUs in the same system. * GPUs with different layouts.
* *
* 0 = Tegra K1 - Tegra Parker/TX2 Layout. * 0 = Tegra K1 - Tegra Parker/TX2 Layout
* 1 = Desktop GPU and Tegra Xavier+ Layout * 1 = Pre-GB20x, GB20x 32+ bpp, GB10, Tegra Xavier-Orin Layout
* 2 = GB20x(Blackwell 2)+ 8 bpp surface layout
* 3 = GB20x(Blackwell 2)+ 16 bpp surface layout
* 4 = Reserved for future use.
* 5 = Reserved for future use.
* 6 = Reserved for future use.
* 7 = Reserved for future use.
* *
* 25:23 c Lossless Framebuffer Compression type. * 25:23 c Lossless Framebuffer Compression type.
* *
@ -1001,7 +1007,7 @@ extern "C" {
* 6 = Reserved for future use * 6 = Reserved for future use
* 7 = Reserved for future use * 7 = Reserved for future use
* *
* 55:25 - Reserved for future use. Must be zero. * 55:28 - Reserved for future use. Must be zero.
*/ */
#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \ #define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \
fourcc_mod_code(NVIDIA, (0x10 | \ fourcc_mod_code(NVIDIA, (0x10 | \
@ -1009,6 +1015,7 @@ extern "C" {
(((k) & 0xff) << 12) | \ (((k) & 0xff) << 12) | \
(((g) & 0x3) << 20) | \ (((g) & 0x3) << 20) | \
(((s) & 0x1) << 22) | \ (((s) & 0x1) << 22) | \
(((s) & 0x6) << 25) | \
(((c) & 0x7) << 23))) (((c) & 0x7) << 23)))
/* To grandfather in prior block linear format modifiers to the above layout, /* To grandfather in prior block linear format modifiers to the above layout,
@ -1017,7 +1024,7 @@ extern "C" {
* which corresponds to the "generic" kind used for simple single-sample * which corresponds to the "generic" kind used for simple single-sample
* uncompressed color formats on Fermi - Volta GPUs. * uncompressed color formats on Fermi - Volta GPUs.
*/ */
static __inline__ __u64 static inline __u64
drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
{ {
if (!(modifier & 0x10) || (modifier & (0xff << 12))) if (!(modifier & 0x10) || (modifier & (0xff << 12)))

View file

@ -24,6 +24,8 @@ extern "C" {
#define DRM_PANFROST_SET_LABEL_BO 0x09 #define DRM_PANFROST_SET_LABEL_BO 0x09
#define DRM_PANFROST_JM_CTX_CREATE 0x0a #define DRM_PANFROST_JM_CTX_CREATE 0x0a
#define DRM_PANFROST_JM_CTX_DESTROY 0x0b #define DRM_PANFROST_JM_CTX_DESTROY 0x0b
#define DRM_PANFROST_SYNC_BO 0x0c
#define DRM_PANFROST_QUERY_BO_INFO 0x0d
#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit) #define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo) #define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)
@ -35,6 +37,8 @@ extern "C" {
#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo) #define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)
#define DRM_IOCTL_PANFROST_JM_CTX_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_CREATE, struct drm_panfrost_jm_ctx_create) #define DRM_IOCTL_PANFROST_JM_CTX_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_CREATE, struct drm_panfrost_jm_ctx_create)
#define DRM_IOCTL_PANFROST_JM_CTX_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_DESTROY, struct drm_panfrost_jm_ctx_destroy) #define DRM_IOCTL_PANFROST_JM_CTX_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_DESTROY, struct drm_panfrost_jm_ctx_destroy)
#define DRM_IOCTL_PANFROST_SYNC_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SYNC_BO, struct drm_panfrost_sync_bo)
#define DRM_IOCTL_PANFROST_QUERY_BO_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_QUERY_BO_INFO, struct drm_panfrost_query_bo_info)
/* /*
* Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
@ -54,32 +58,46 @@ extern "C" {
* This asks the kernel to have the GPU execute a render command list. * This asks the kernel to have the GPU execute a render command list.
*/ */
struct drm_panfrost_submit { struct drm_panfrost_submit {
/**
/** Address to GPU mapping of job descriptor */ * @jc: Address to GPU mapping of job descriptor
*/
__u64 jc; __u64 jc;
/**
/** An optional array of sync objects to wait on before starting this job. */ * @in_syncs: An optional array of sync objects to wait on
* before starting this job.
*/
__u64 in_syncs; __u64 in_syncs;
/**
/** Number of sync objects to wait on before starting this job. */ * @in_sync_count: Number of sync objects to wait on before
* starting this job.
*/
__u32 in_sync_count; __u32 in_sync_count;
/**
/** An optional sync object to place the completion fence in. */ * @out_sync: An optional sync object to place the completion fence in.
*/
__u32 out_sync; __u32 out_sync;
/**
/** Pointer to a u32 array of the BOs that are referenced by the job. */ * @bo_handles: Pointer to a u32 array of the BOs that are
* referenced by the job.
*/
__u64 bo_handles; __u64 bo_handles;
/**
/** Number of BO handles passed in (size is that times 4). */ * @bo_handle_count: Number of BO handles passed in (size is
* that times 4).
*/
__u32 bo_handle_count; __u32 bo_handle_count;
/**
/** A combination of PANFROST_JD_REQ_* */ * @requirements: A combination of PANFROST_JD_REQ_*
*/
__u32 requirements; __u32 requirements;
/**
/** JM context handle. Zero if you want to use the default context. */ * @jm_ctx_handle: JM context handle. Zero if you want to use the
* default context.
*/
__u32 jm_ctx_handle; __u32 jm_ctx_handle;
/**
/** Padding field. MBZ. */ * @pad: Padding field. Must be zero.
*/
__u32 pad; __u32 pad;
}; };
@ -92,14 +110,26 @@ struct drm_panfrost_submit {
* completed. * completed.
*/ */
struct drm_panfrost_wait_bo { struct drm_panfrost_wait_bo {
/**
* @handle: Handle for the object to wait for.
*/
__u32 handle; __u32 handle;
/**
* @pad: Padding, must be zero-filled.
*/
__u32 pad; __u32 pad;
__s64 timeout_ns; /* absolute */ /**
* @timeout_ns: absolute number of nanoseconds to wait.
*/
__s64 timeout_ns;
}; };
/* Valid flags to pass to drm_panfrost_create_bo */ /* Valid flags to pass to drm_panfrost_create_bo.
* PANFROST_BO_WB_MMAP can't be set if PANFROST_BO_HEAP is.
*/
#define PANFROST_BO_NOEXEC 1 #define PANFROST_BO_NOEXEC 1
#define PANFROST_BO_HEAP 2 #define PANFROST_BO_HEAP 2
#define PANFROST_BO_WB_MMAP 4
/** /**
* struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs. * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.
@ -107,16 +137,26 @@ struct drm_panfrost_wait_bo {
* The flags argument is a bit mask of PANFROST_BO_* flags. * The flags argument is a bit mask of PANFROST_BO_* flags.
*/ */
struct drm_panfrost_create_bo { struct drm_panfrost_create_bo {
/**
* @size: size of shmem/BO area to create (bytes)
*/
__u32 size; __u32 size;
/**
* @flags: see PANFROST_BO_* flags
*/
__u32 flags; __u32 flags;
/** Returned GEM handle for the BO. */ /**
* @handle: Returned GEM handle for the BO.
*/
__u32 handle; __u32 handle;
/* Pad, must be zero-filled. */ /**
* @pad: Padding, must be zero-filled.
*/
__u32 pad; __u32 pad;
/** /**
* Returned offset for the BO in the GPU address space. This offset * @offset: Returned offset for the BO in the GPU address space.
* is private to the DRM fd and is valid for the lifetime of the GEM * This offset is private to the DRM fd and is valid for the
* handle. * lifetime of the GEM handle.
* *
* This offset value will always be nonzero, since various HW * This offset value will always be nonzero, since various HW
* units treat 0 specially. * units treat 0 specially.
@ -136,10 +176,17 @@ struct drm_panfrost_create_bo {
* used in a future extension. * used in a future extension.
*/ */
struct drm_panfrost_mmap_bo { struct drm_panfrost_mmap_bo {
/** Handle for the object being mapped. */ /**
* @handle: Handle for the object being mapped.
*/
__u32 handle; __u32 handle;
/**
* @flags: currently not used (should be zero)
*/
__u32 flags; __u32 flags;
/** offset into the drm node to use for subsequent mmap call. */ /**
* @offset: offset into the drm node to use for subsequent mmap call.
*/
__u64 offset; __u64 offset;
}; };
@ -188,6 +235,13 @@ enum drm_panfrost_param {
DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP, DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,
DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY, DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,
DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES, DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES,
DRM_PANFROST_PARAM_SELECTED_COHERENCY,
};
enum drm_panfrost_gpu_coherency {
DRM_PANFROST_GPU_COHERENCY_ACE_LITE = 0,
DRM_PANFROST_GPU_COHERENCY_ACE = 1,
DRM_PANFROST_GPU_COHERENCY_NONE = 31,
}; };
struct drm_panfrost_get_param { struct drm_panfrost_get_param {
@ -196,7 +250,7 @@ struct drm_panfrost_get_param {
__u64 value; __u64 value;
}; };
/** /*
* Returns the offset for the BO in the GPU address space for this DRM fd. * Returns the offset for the BO in the GPU address space for this DRM fd.
* This is the same value returned by drm_panfrost_create_bo, if that was called * This is the same value returned by drm_panfrost_create_bo, if that was called
* from this DRM fd. * from this DRM fd.
@ -244,12 +298,14 @@ struct drm_panfrost_madvise {
* struct drm_panfrost_set_label_bo - ioctl argument for labelling Panfrost BOs. * struct drm_panfrost_set_label_bo - ioctl argument for labelling Panfrost BOs.
*/ */
struct drm_panfrost_set_label_bo { struct drm_panfrost_set_label_bo {
/** @handle: Handle of the buffer object to label. */ /**
* @handle: Handle of the buffer object to label.
*/
__u32 handle; __u32 handle;
/**
/** @pad: MBZ. */ * @pad: Must be zero.
*/
__u32 pad; __u32 pad;
/** /**
* @label: User pointer to a NUL-terminated string * @label: User pointer to a NUL-terminated string
* *
@ -259,6 +315,66 @@ struct drm_panfrost_set_label_bo {
__u64 label; __u64 label;
}; };
/* Valid flags to pass to drm_panfrost_bo_sync_op */
#define PANFROST_BO_SYNC_CPU_CACHE_FLUSH 0
#define PANFROST_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE 1
/**
* struct drm_panthor_bo_flush_map_op - BO map sync op
*/
struct drm_panfrost_bo_sync_op {
/** @handle: Handle of the buffer object to sync. */
__u32 handle;
/** @type: Type of sync operation. */
__u32 type;
/**
* @offset: Offset into the BO at which the sync range starts.
*
* This will be rounded down to the nearest cache line as needed.
*/
__u32 offset;
/**
* @size: Size of the range to sync
*
* @size + @offset will be rounded up to the nearest cache line as
* needed.
*/
__u32 size;
};
/**
* struct drm_panfrost_sync_bo - ioctl argument for syncing BO maps
*/
struct drm_panfrost_sync_bo {
/** Array of struct drm_panfrost_bo_sync_op */
__u64 ops;
/** Number of BO sync ops */
__u32 op_count;
__u32 pad;
};
/** BO comes from a different subsystem. */
#define DRM_PANFROST_BO_IS_IMPORTED (1 << 0)
struct drm_panfrost_query_bo_info {
/** Handle of the object being queried. */
__u32 handle;
/** Extra flags that are not coming from the BO_CREATE ioctl(). */
__u32 extra_flags;
/** Flags passed at creation time. */
__u32 create_flags;
/** Will be zero on return. */
__u32 pad;
};
/* Definitions for coredump decoding in user space */ /* Definitions for coredump decoding in user space */
#define PANFROSTDUMP_MAJOR 1 #define PANFROSTDUMP_MAJOR 1
#define PANFROSTDUMP_MINOR 0 #define PANFROSTDUMP_MINOR 0
@ -330,10 +446,13 @@ enum drm_panfrost_jm_ctx_priority {
}; };
struct drm_panfrost_jm_ctx_create { struct drm_panfrost_jm_ctx_create {
/** @handle: Handle of the created JM context */ /**
* @handle: Handle of the created JM context
*/
__u32 handle; __u32 handle;
/**
/** @priority: Context priority (see enum drm_panfrost_jm_ctx_priority). */ * @priority: Context priority (see enum drm_panfrost_jm_ctx_priority).
*/
__u32 priority; __u32 priority;
}; };
@ -344,8 +463,9 @@ struct drm_panfrost_jm_ctx_destroy {
* Must be a valid context handle returned by DRM_IOCTL_PANTHOR_JM_CTX_CREATE. * Must be a valid context handle returned by DRM_IOCTL_PANTHOR_JM_CTX_CREATE.
*/ */
__u32 handle; __u32 handle;
/**
/** @pad: Padding field, MBZ. */ * @pad: Padding field, must be zero.
*/
__u32 pad; __u32 pad;
}; };

View file

@ -144,6 +144,16 @@ enum drm_panthor_ioctl_id {
* pgoff_t size. * pgoff_t size.
*/ */
DRM_PANTHOR_SET_USER_MMIO_OFFSET, DRM_PANTHOR_SET_USER_MMIO_OFFSET,
/** @DRM_PANTHOR_BO_SYNC: Sync BO data to/from the device */
DRM_PANTHOR_BO_SYNC,
/**
* @DRM_PANTHOR_BO_QUERY_INFO: Query information about a BO.
*
* This is useful for imported BOs.
*/
DRM_PANTHOR_BO_QUERY_INFO,
}; };
/** /**
@ -245,6 +255,26 @@ enum drm_panthor_dev_query_type {
DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO, DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,
}; };
/**
* enum drm_panthor_gpu_coherency: Type of GPU coherency
*/
enum drm_panthor_gpu_coherency {
/**
* @DRM_PANTHOR_GPU_COHERENCY_ACE_LITE: ACE Lite coherency.
*/
DRM_PANTHOR_GPU_COHERENCY_ACE_LITE = 0,
/**
* @DRM_PANTHOR_GPU_COHERENCY_ACE: ACE coherency.
*/
DRM_PANTHOR_GPU_COHERENCY_ACE = 1,
/**
* @DRM_PANTHOR_GPU_COHERENCY_NONE: No coherency.
*/
DRM_PANTHOR_GPU_COHERENCY_NONE = 31,
};
/** /**
* struct drm_panthor_gpu_info - GPU information * struct drm_panthor_gpu_info - GPU information
* *
@ -301,7 +331,16 @@ struct drm_panthor_gpu_info {
*/ */
__u32 thread_max_barrier_size; __u32 thread_max_barrier_size;
/** @coherency_features: Coherency features. */ /**
* @coherency_features: Coherency features.
*
* Combination of drm_panthor_gpu_coherency flags.
*
* Note that this is just what the coherency protocols supported by the
* GPU, but the actual coherency in place depends on the SoC
* integration and is reflected by
* drm_panthor_gpu_info::selected_coherency.
*/
__u32 coherency_features; __u32 coherency_features;
/** @texture_features: Texture features. */ /** @texture_features: Texture features. */
@ -310,8 +349,12 @@ struct drm_panthor_gpu_info {
/** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */ /** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */
__u32 as_present; __u32 as_present;
/** @pad0: MBZ. */ /**
__u32 pad0; * @select_coherency: Coherency selected for this device.
*
* One of drm_panthor_gpu_coherency.
*/
__u32 selected_coherency;
/** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */ /** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */
__u64 shader_present; __u64 shader_present;
@ -327,6 +370,9 @@ struct drm_panthor_gpu_info {
/** @pad: MBZ. */ /** @pad: MBZ. */
__u32 pad; __u32 pad;
/** @gpu_features: Bitmask describing supported GPU-wide features */
__u64 gpu_features;
}; };
/** /**
@ -635,6 +681,15 @@ struct drm_panthor_vm_get_state {
enum drm_panthor_bo_flags { enum drm_panthor_bo_flags {
/** @DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace. */ /** @DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace. */
DRM_PANTHOR_BO_NO_MMAP = (1 << 0), DRM_PANTHOR_BO_NO_MMAP = (1 << 0),
/**
* @DRM_PANTHOR_BO_WB_MMAP: Force "Write-Back Cacheable" CPU mapping.
*
* CPU map the buffer object in userspace by forcing the "Write-Back
* Cacheable" cacheability attribute. The mapping otherwise uses the
* "Non-Cacheable" attribute if the GPU is not IO coherent.
*/
DRM_PANTHOR_BO_WB_MMAP = (1 << 1),
}; };
/** /**
@ -1037,6 +1092,101 @@ struct drm_panthor_set_user_mmio_offset {
__u64 offset; __u64 offset;
}; };
/**
* enum drm_panthor_bo_sync_op_type - BO sync type
*/
enum drm_panthor_bo_sync_op_type {
/** @DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH: Flush CPU caches. */
DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH = 0,
/** @DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE: Flush and invalidate CPU caches. */
DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE = 1,
};
/**
* struct drm_panthor_bo_sync_op - BO map sync op
*/
struct drm_panthor_bo_sync_op {
/** @handle: Handle of the buffer object to sync. */
__u32 handle;
/** @type: Type of operation. */
__u32 type;
/**
* @offset: Offset into the BO at which the sync range starts.
*
* This will be rounded down to the nearest cache line as needed.
*/
__u64 offset;
/**
* @size: Size of the range to sync
*
* @size + @offset will be rounded up to the nearest cache line as
* needed.
*/
__u64 size;
};
/**
* struct drm_panthor_bo_sync - BO map sync request
*/
struct drm_panthor_bo_sync {
/**
* @ops: Array of struct drm_panthor_bo_sync_op sync operations.
*/
struct drm_panthor_obj_array ops;
};
/**
* enum drm_panthor_bo_extra_flags - Set of flags returned on a BO_QUERY_INFO request
*
* Those are flags reflecting BO properties that are not directly coming from the flags
* passed are creation time, or information on BOs that were imported from other drivers.
*/
enum drm_panthor_bo_extra_flags {
/**
* @DRM_PANTHOR_BO_IS_IMPORTED: BO has been imported from an external driver.
*
* Note that imported dma-buf handles are not flagged as imported if they
* where exported by panthor. Only buffers that are coming from other drivers
* (dma heaps, other GPUs, display controllers, V4L, ...).
*
* It's also important to note that all imported BOs are mapped cached and can't
* be considered IO-coherent even if the GPU is. This means they require explicit
* syncs that must go through the DRM_PANTHOR_BO_SYNC ioctl (userland cache
* maintenance is not allowed in that case, because extra operations might be
* needed to make changes visible to the CPU/device, like buffer migration when the
* exporter is a GPU with its own VRAM).
*/
DRM_PANTHOR_BO_IS_IMPORTED = (1 << 0),
};
/**
* struct drm_panthor_bo_query_info - Query BO info
*/
struct drm_panthor_bo_query_info {
/** @handle: Handle of the buffer object to query flags on. */
__u32 handle;
/**
* @extra_flags: Combination of enum drm_panthor_bo_extra_flags flags.
*/
__u32 extra_flags;
/**
* @create_flags: Flags passed at creation time.
*
* Combination of enum drm_panthor_bo_flags flags.
* Will be zero if the buffer comes from a different driver.
*/
__u32 create_flags;
/** @pad: Will be zero on return. */
__u32 pad;
};
/** /**
* DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number * DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number
* @__access: Access type. Must be R, W or RW. * @__access: Access type. Must be R, W or RW.
@ -1083,6 +1233,10 @@ enum {
DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label), DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label),
DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET = DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET =
DRM_IOCTL_PANTHOR(WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset), DRM_IOCTL_PANTHOR(WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset),
DRM_IOCTL_PANTHOR_BO_SYNC =
DRM_IOCTL_PANTHOR(WR, BO_SYNC, bo_sync),
DRM_IOCTL_PANTHOR_BO_QUERY_INFO =
DRM_IOCTL_PANTHOR(WR, BO_QUERY_INFO, bo_query_info),
}; };
#if defined(__cplusplus) #if defined(__cplusplus)

View file

@ -303,3 +303,10 @@ CHIPSET(0xb0b0, ptl, "PTL", "Intel(R) Graphics")
CHIPSET(0xfd80, wcl, "WCL", "Intel(R) Graphics") CHIPSET(0xfd80, wcl, "WCL", "Intel(R) Graphics")
CHIPSET(0xfd81, wcl, "WCL", "Intel(R) Graphics") CHIPSET(0xfd81, wcl, "WCL", "Intel(R) Graphics")
CHIPSET(0xd740, nvl_s_hx_ul, "NVL-S", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xd741, nvl_u_h, "NVL-U", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xd742, nvl_u_h, "NVL-H", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xd743, nvl_s_hx_ul, "NVL-HX", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xd744, nvl_s_hx_ul, "NVL-UL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xd745, nvl_s_hx_ul, "NVL-HX", "Intel(R) Graphics", FORCE_PROBE)

View file

@ -144,7 +144,7 @@ typedef enum StdVideoAV1ColorPrimaries {
STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432 = 12, STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432 = 12,
STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213 = 22, STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213 = 22,
STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID = 0x7FFFFFFF,
// STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED is a deprecated alias // STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED is a legacy alias
STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED = STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED, STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED = STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED,
STD_VIDEO_AV1_COLOR_PRIMARIES_MAX_ENUM = 0x7FFFFFFF STD_VIDEO_AV1_COLOR_PRIMARIES_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1ColorPrimaries; } StdVideoAV1ColorPrimaries;

File diff suppressed because it is too large Load diff

View file

@ -19,6 +19,75 @@ extern "C" {
// VK_OHOS_external_memory is a preprocessor guard. Do not pass it to API calls.
#define VK_OHOS_external_memory 1
struct OH_NativeBuffer;
#define VK_OHOS_EXTERNAL_MEMORY_SPEC_VERSION 1
#define VK_OHOS_EXTERNAL_MEMORY_EXTENSION_NAME "VK_OHOS_external_memory"
typedef struct VkNativeBufferUsageOHOS {
VkStructureType sType;
void* pNext;
uint64_t OHOSNativeBufferUsage;
} VkNativeBufferUsageOHOS;
typedef struct VkNativeBufferPropertiesOHOS {
VkStructureType sType;
void* pNext;
VkDeviceSize allocationSize;
uint32_t memoryTypeBits;
} VkNativeBufferPropertiesOHOS;
typedef struct VkNativeBufferFormatPropertiesOHOS {
VkStructureType sType;
void* pNext;
VkFormat format;
uint64_t externalFormat;
VkFormatFeatureFlags formatFeatures;
VkComponentMapping samplerYcbcrConversionComponents;
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
VkSamplerYcbcrRange suggestedYcbcrRange;
VkChromaLocation suggestedXChromaOffset;
VkChromaLocation suggestedYChromaOffset;
} VkNativeBufferFormatPropertiesOHOS;
typedef struct VkImportNativeBufferInfoOHOS {
VkStructureType sType;
const void* pNext;
struct OH_NativeBuffer* buffer;
} VkImportNativeBufferInfoOHOS;
typedef struct VkMemoryGetNativeBufferInfoOHOS {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
} VkMemoryGetNativeBufferInfoOHOS;
typedef struct VkExternalFormatOHOS {
VkStructureType sType;
void* pNext;
uint64_t externalFormat;
} VkExternalFormatOHOS;
typedef VkResult (VKAPI_PTR *PFN_vkGetNativeBufferPropertiesOHOS)(VkDevice device, const struct OH_NativeBuffer* buffer, VkNativeBufferPropertiesOHOS* pProperties);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryNativeBufferOHOS)(VkDevice device, const VkMemoryGetNativeBufferInfoOHOS* pInfo, struct OH_NativeBuffer** pBuffer);
#ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetNativeBufferPropertiesOHOS(
VkDevice device,
const struct OH_NativeBuffer* buffer,
VkNativeBufferPropertiesOHOS* pProperties);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryNativeBufferOHOS(
VkDevice device,
const VkMemoryGetNativeBufferInfoOHOS* pInfo,
struct OH_NativeBuffer** pBuffer);
#endif
#endif
// VK_OHOS_surface is a preprocessor guard. Do not pass it to API calls. // VK_OHOS_surface is a preprocessor guard. Do not pass it to API calls.
#define VK_OHOS_surface 1 #define VK_OHOS_surface 1
typedef struct NativeWindow OHNativeWindow; typedef struct NativeWindow OHNativeWindow;
@ -44,6 +113,68 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSurfaceOHOS(
#endif #endif
#endif #endif
// VK_OHOS_native_buffer is a preprocessor guard. Do not pass it to API calls.
#define VK_OHOS_native_buffer 1
struct OHBufferHandle;
#define VK_OHOS_NATIVE_BUFFER_SPEC_VERSION 1
#define VK_OHOS_NATIVE_BUFFER_EXTENSION_NAME "VK_OHOS_native_buffer"
typedef enum VkSwapchainImageUsageFlagBitsOHOS {
VK_SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_OHOS = 0x00000001,
VK_SWAPCHAIN_IMAGE_USAGE_FLAG_BITS_MAX_ENUM_OHOS = 0x7FFFFFFF
} VkSwapchainImageUsageFlagBitsOHOS;
typedef VkFlags VkSwapchainImageUsageFlagsOHOS;
typedef struct VkNativeBufferOHOS {
VkStructureType sType;
const void* pNext;
struct OHBufferHandle* handle;
} VkNativeBufferOHOS;
typedef struct VkSwapchainImageCreateInfoOHOS {
VkStructureType sType;
const void* pNext;
VkSwapchainImageUsageFlagsOHOS usage;
} VkSwapchainImageCreateInfoOHOS;
typedef struct VkPhysicalDevicePresentationPropertiesOHOS {
VkStructureType sType;
void* pNext;
VkBool32 sharedImage;
} VkPhysicalDevicePresentationPropertiesOHOS;
typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainGrallocUsageOHOS)(VkDevice device, VkFormat format, VkImageUsageFlags imageUsage, uint64_t* grallocUsage);
typedef VkResult (VKAPI_PTR *PFN_vkAcquireImageOHOS)(VkDevice device, VkImage image, int32_t nativeFenceFd, VkSemaphore semaphore, VkFence fence);
typedef VkResult (VKAPI_PTR *PFN_vkQueueSignalReleaseImageOHOS)(VkQueue queue, uint32_t waitSemaphoreCount, const VkSemaphore* pWaitSemaphores, VkImage image, int32_t* pNativeFenceFd);
#ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainGrallocUsageOHOS(
VkDevice device,
VkFormat format,
VkImageUsageFlags imageUsage,
uint64_t* grallocUsage);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireImageOHOS(
VkDevice device,
VkImage image,
int32_t nativeFenceFd,
VkSemaphore semaphore,
VkFence fence);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkQueueSignalReleaseImageOHOS(
VkQueue queue,
uint32_t waitSemaphoreCount,
const VkSemaphore* pWaitSemaphores,
VkImage image,
int32_t* pNativeFenceFd);
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -42,7 +42,7 @@ if get_option('layout') != 'mirror'
endif endif
with_llvm = get_option('llvm') with_llvm = get_option('llvm')
amd_with_llvm = get_option('amd-use-llvm') amd_with_llvm = with_llvm.allowed() and get_option('amd-use-llvm')
with_mesa_debug = get_option('buildtype') == 'debug' with_mesa_debug = get_option('buildtype') == 'debug'
@ -156,7 +156,13 @@ if gallium_drivers.contains('auto')
'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'llvmpipe', 'softpipe', 'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'llvmpipe', 'softpipe',
'iris', 'crocus', 'i915', 'zink' 'iris', 'crocus', 'i915', 'zink'
] ]
elif ['arm', 'aarch64'].contains(host_machine.cpu_family()) elif ['aarch64'].contains(host_machine.cpu_family())
gallium_drivers = [
'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau', 'svga',
'tegra', 'virgl', 'lima', 'panfrost', 'llvmpipe', 'softpipe', 'iris',
'zink', 'asahi'
]
elif ['arm'].contains(host_machine.cpu_family())
gallium_drivers = [ gallium_drivers = [
'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau', 'svga', 'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau', 'svga',
'tegra', 'virgl', 'lima', 'panfrost', 'llvmpipe', 'softpipe', 'iris', 'tegra', 'virgl', 'lima', 'panfrost', 'llvmpipe', 'softpipe', 'iris',
@ -218,10 +224,11 @@ with_gallium_ethosu = gallium_drivers.contains('ethosu')
foreach gallium_driver : gallium_drivers foreach gallium_driver : gallium_drivers
pre_args += '-DHAVE_@0@'.format(gallium_driver.to_upper()) pre_args += '-DHAVE_@0@'.format(gallium_driver.to_upper())
endforeach endforeach
draw_with_llvm = with_llvm.allowed() and get_option('draw-use-llvm')
with_llvm = with_llvm \ with_llvm = with_llvm \
.enable_if(with_gallium_i915, error_message : 'i915 Gallium driver requires LLVM for vertex shaders') \ .enable_if(with_gallium_i915, error_message : 'i915 Gallium driver requires LLVM for vertex shaders') \
.enable_if(with_gallium_llvmpipe, error_message : 'LLVMPipe Gallium driver requires LLVM') \ .enable_if(with_gallium_llvmpipe, error_message : 'LLVMPipe Gallium driver requires LLVM') \
.enable_if(with_gallium_r300, error_message : 'R300 Gallium driver requires LLVM for vertex shaders') \ .enable_if(with_gallium_r300 and draw_with_llvm, error_message : 'R300 Gallium driver requires LLVM for vertex shaders on IGP parts') \
.enable_if(with_gallium_r600 and amd_with_llvm, error_message : 'R600 Gallium driver configured to require LLVM') \ .enable_if(with_gallium_r600 and amd_with_llvm, error_message : 'R600 Gallium driver configured to require LLVM') \
.enable_if(with_gallium_radeonsi and amd_with_llvm, error_message : 'RadeonSI Gallium driver configured to require LLVM') .enable_if(with_gallium_radeonsi and amd_with_llvm, error_message : 'RadeonSI Gallium driver configured to require LLVM')
@ -249,7 +256,9 @@ if _vulkan_drivers.contains('auto')
if system_has_kms_drm if system_has_kms_drm
if host_machine.cpu_family().startswith('x86') if host_machine.cpu_family().startswith('x86')
_vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'nouveau', 'swrast'] _vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'nouveau', 'swrast']
elif ['arm', 'aarch64'].contains(host_machine.cpu_family()) elif ['aarch64'].contains(host_machine.cpu_family())
_vulkan_drivers = ['swrast', 'intel', 'panfrost', 'freedreno', 'asahi']
elif ['arm'].contains(host_machine.cpu_family())
_vulkan_drivers = ['swrast', 'intel', 'panfrost', 'freedreno'] _vulkan_drivers = ['swrast', 'intel', 'panfrost', 'freedreno']
elif ['mips', 'mips64', 'ppc', 'ppc64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family()) elif ['mips', 'mips64', 'ppc', 'ppc64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
_vulkan_drivers = ['amd', 'swrast'] _vulkan_drivers = ['amd', 'swrast']
@ -271,7 +280,7 @@ elif _vulkan_drivers.contains('all')
_vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'swrast', _vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'swrast',
'freedreno', 'panfrost', 'virtio', 'broadcom', 'freedreno', 'panfrost', 'virtio', 'broadcom',
'imagination', 'microsoft-experimental', 'imagination', 'microsoft-experimental',
'nouveau', 'asahi', 'gfxstream'] 'nouveau', 'asahi', 'gfxstream', 'kosmickrisp']
endif endif
with_intel_vk = _vulkan_drivers.contains('intel') with_intel_vk = _vulkan_drivers.contains('intel')
@ -288,6 +297,7 @@ with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental')
with_nouveau_vk = _vulkan_drivers.contains('nouveau') with_nouveau_vk = _vulkan_drivers.contains('nouveau')
with_asahi_vk = _vulkan_drivers.contains('asahi') with_asahi_vk = _vulkan_drivers.contains('asahi')
with_gfxstream_vk = _vulkan_drivers.contains('gfxstream') with_gfxstream_vk = _vulkan_drivers.contains('gfxstream')
with_kosmickrisp_vk = _vulkan_drivers.contains('kosmickrisp')
with_any_vk = _vulkan_drivers.length() != 0 with_any_vk = _vulkan_drivers.length() != 0
with_llvm = with_llvm \ with_llvm = with_llvm \
@ -366,9 +376,15 @@ endif
if with_aco_tests and not with_amd_vk if with_aco_tests and not with_amd_vk
error('ACO tests require Radv') error('ACO tests require Radv')
endif endif
if with_aco_tests and not with_tools.contains('drm-shim')
error('ACO tests require AMDGPU drm-shim')
endif
if with_radv_tests and not with_amd_vk if with_radv_tests and not with_amd_vk
error('RADV tests require RADV') error('RADV tests require RADV')
endif endif
if with_radv_tests and not with_tools.contains('drm-shim')
error('RADV tests require AMDGPU drm-shim')
endif
with_microsoft_clc = get_option('microsoft-clc').enabled() with_microsoft_clc = get_option('microsoft-clc').enabled()
with_spirv_to_dxil = get_option('spirv-to-dxil') with_spirv_to_dxil = get_option('spirv-to-dxil')
@ -674,17 +690,26 @@ _va_drivers = [
with_gallium_virgl, with_gallium_virgl,
] ]
allow_fallback_for_libva = get_option('allow-fallback-for').contains('libva')
fallback_libva_options = []
_va = get_option('gallium-va') \ _va = get_option('gallium-va') \
.require(_va_drivers.contains(true), .require(_va_drivers.contains(true),
error_message : 'VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.') error_message : 'VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.')
_dep_va_name = host_machine.system() == 'windows' ? 'libva-win32' : 'libva' _dep_va_name = host_machine.system() == 'windows' ? 'libva-win32' : 'libva'
dep_va = dependency(_dep_va_name, version : '>= 1.8.0', required : _va) dep_va = dependency(
_dep_va_name, version : '>= 1.8.0',
required : _va,
allow_fallback: allow_fallback_for_libva,
default_options: fallback_libva_options
)
if dep_va.found() if dep_va.found()
dep_va_headers = dep_va.partial_dependency(compile_args : true) dep_va_headers = dep_va.partial_dependency(compile_args : true, includes : true)
if cc.has_header_symbol('va/va.h', 'VASurfaceAttribDRMFormatModifiers', if cc.has_header_symbol('va/va.h', 'VASurfaceAttribDRMFormatModifiers',
dependencies: dep_va_headers) dependencies: dep_va_headers)
pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS' pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS'
endif endif
libva_version = cc.get_define('VA_VERSION', prefix: '#include "va/va_version.h"',
dependencies: dep_va_headers).split('.')
endif endif
with_gallium_va = dep_va.found() with_gallium_va = dep_va.found()
@ -763,9 +788,7 @@ if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') or
rustc = meson.get_compiler('rust') rustc = meson.get_compiler('rust')
rust = import('rust') rust = import('rust')
# Keep this in sync with the MINIMUM_SUPPORTED_RUST_VERSION in # Keep this in sync with the `msrv` in clippy.toml
# .gitlab-ci/container/build-rust.sh and the `rustup default` line in
# .gitlab-ci/meson/build.sh
if rustc.version().version_compare('< 1.82') if rustc.version().version_compare('< 1.82')
error('Mesa requires Rust 1.82.0 or newer') error('Mesa requires Rust 1.82.0 or newer')
endif endif
@ -797,6 +820,19 @@ if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') or
bindgen_output_args += ['--raw-line', '#![allow(unnecessary_transmutes)]'] bindgen_output_args += ['--raw-line', '#![allow(unnecessary_transmutes)]']
endif endif
rust_global_args = [
# We want to be able to write `else { if {} }` when it makes more sense than
# collapsing it into `else if {}`.
'-Aclippy::collapsible_else_if',
# "Needless lifetimes" might be needless but they're harmless and we
# prefer being explicit, so allow them.
'-Aclippy::needless_lifetimes',
# Being explicit has value, allow it.
'-Aclippy::question_mark',
]
rust_2024_lint_args = [ rust_2024_lint_args = [
'-Dboxed_slice_into_iter', '-Dboxed_slice_into_iter',
'-Ddeprecated_safe_2024', '-Ddeprecated_safe_2024',
@ -829,6 +865,7 @@ with_driver_using_cl = [
with_gallium_asahi, with_asahi_vk, with_tools.contains('asahi'), with_gallium_asahi, with_asahi_vk, with_tools.contains('asahi'),
with_gallium_panfrost, with_panfrost_vk, with_gallium_panfrost, with_panfrost_vk,
with_nouveau_vk, with_imagination_vk, with_nouveau_vk, with_imagination_vk,
with_kosmickrisp_vk,
].contains(true) ].contains(true)
if get_option('mesa-clc') == 'system' if get_option('mesa-clc') == 'system'
@ -845,6 +882,10 @@ endif
with_llvm = with_llvm \ with_llvm = with_llvm \
.enable_if(with_clc, error_message : 'CLC requires LLVM') .enable_if(with_clc, error_message : 'CLC requires LLVM')
with_poly = [
with_gallium_asahi, with_asahi_vk, with_tools.contains('asahi'),
].contains(true)
dep_clc = null_dep dep_clc = null_dep
if with_clc if with_clc
dep_clc = dependency('libclc') dep_clc = dependency('libclc')
@ -1139,6 +1180,7 @@ if cc.get_argument_syntax() == 'msvc'
'/we4024', # Error when passing different type of parameter '/we4024', # Error when passing different type of parameter
'/we4189', # 'identifier' : local variable is initialized but not referenced '/we4189', # 'identifier' : local variable is initialized but not referenced
'/Zc:__cplusplus', #Set __cplusplus macro to match the /std:c++<version> on the command line '/Zc:__cplusplus', #Set __cplusplus macro to match the /std:c++<version> on the command line
'/Zc:enumTypes', # Enables C++ conforming enum underlying type and enumerator type deduction
'/Zc:preprocessor', # Use the standards-conforming preprocessor '/Zc:preprocessor', # Use the standards-conforming preprocessor
] ]
c_args += cc.get_supported_arguments(_trial) c_args += cc.get_supported_arguments(_trial)
@ -1227,7 +1269,12 @@ else
# Check for C and C++ arguments for MSVC compatibility. These are only used # Check for C and C++ arguments for MSVC compatibility. These are only used
# in parts of the mesa code base that need to compile with MSVC, mainly # in parts of the mesa code base that need to compile with MSVC, mainly
# common code # common code
_trial_msvc = ['-Werror=pointer-arith', '-Werror=vla', '-Werror=gnu-empty-initializer'] _trial_msvc = [
'-Werror=pointer-arith',
'-Werror=vla',
'-Werror=gnu-empty-initializer',
'-Wgnu-pointer-arith',
]
c_msvc_compat_args += cc.get_supported_arguments(_trial_msvc) c_msvc_compat_args += cc.get_supported_arguments(_trial_msvc)
cpp_msvc_compat_args += cpp.get_supported_arguments(_trial_msvc) cpp_msvc_compat_args += cpp.get_supported_arguments(_trial_msvc)
endif endif
@ -1464,7 +1511,10 @@ endif
if cc.has_header_symbol('errno.h', 'program_invocation_name', if cc.has_header_symbol('errno.h', 'program_invocation_name',
args : '-D_GNU_SOURCE') args : '-D_GNU_SOURCE')
pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME' pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME'
elif with_tools.contains('intel') elif with_tools.contains('intel') and not with_platform_android
# Intel tools is supported on Android where the program name is from
# `getprogname()` without `program_invocation_name` in glibc.
# See `src/util/u_process.c` for more details.
error('Intel tools require the program_invocation_name variable') error('Intel tools require the program_invocation_name variable')
endif endif
@ -1611,7 +1661,7 @@ if dep_thread.found()
endif endif
with_expat = get_option('expat') \ with_expat = get_option('expat') \
.disable_auto_if(with_platform_android or with_platform_windows) \ .disable_auto_if(with_platform_windows) \
.enable_if(with_intel_tools, error_message : 'Intel tools require expat') .enable_if(with_intel_tools, error_message : 'Intel tools require expat')
if host_machine.system() == 'darwin' if host_machine.system() == 'darwin'
@ -1744,7 +1794,6 @@ if with_clc
# but we don't know what LLVM version we are using yet # but we don't know what LLVM version we are using yet
llvm_optional_modules += ['all-targets', 'windowsdriver', 'frontendhlsl', 'frontenddriver'] llvm_optional_modules += ['all-targets', 'windowsdriver', 'frontendhlsl', 'frontenddriver']
endif endif
draw_with_llvm = get_option('draw-use-llvm')
if draw_with_llvm if draw_with_llvm
llvm_modules += 'native' llvm_modules += 'native'
# lto is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet # lto is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
@ -1788,8 +1837,12 @@ if dep_llvm.found()
error('Lavapipe and llvmpipe require LLVM draw support.') error('Lavapipe and llvmpipe require LLVM draw support.')
endif endif
if (with_gallium_i915 or with_gallium_r300) and not draw_with_llvm if with_gallium_i915 and not draw_with_llvm
error('i915 and R300 require LLVM draw support for vertex shaders.') error('i915 requires LLVM draw support for vertex shaders.')
endif
if with_gallium_r300 and not draw_with_llvm and host_machine.cpu_family() == 'x86'
error('r300 requires LLVM draw support for vertex shaders.')
endif endif
if host_machine.system() != 'windows' if host_machine.system() != 'windows'
@ -1895,6 +1948,7 @@ dep_lua = dependency('lua54', 'lua5.4', 'lua-5.4',
'lua53', 'lua5.3', 'lua-5.3', 'lua53', 'lua5.3', 'lua-5.3',
'lua', required: false, 'lua', required: false,
allow_fallback: with_tools.contains('freedreno'), allow_fallback: with_tools.contains('freedreno'),
disabler : true,
version: '>=5.3') version: '>=5.3')
# Be explicit about only using this lib on Windows, to avoid picking # Be explicit about only using this lib on Windows, to avoid picking
@ -2191,7 +2245,7 @@ endif
with_sysprof = get_option('sysprof') with_sysprof = get_option('sysprof')
if with_sysprof if with_sysprof
dep_sysprof = dependency('sysprof-capture-4', version: '>= 3.38.0') dep_sysprof = dependency('sysprof-capture-4', version: '>= 49.0')
pre_args += '-DHAVE_SYSPROF' pre_args += '-DHAVE_SYSPROF'
endif endif
@ -2276,6 +2330,13 @@ else
vulkan_icd_lib_path = get_option('prefix') / get_option('libdir') vulkan_icd_lib_path = get_option('prefix') / get_option('libdir')
endif endif
vulkan_manifest_per_architecture = get_option('vulkan-manifest-per-architecture')
if vulkan_manifest_per_architecture
vulkan_manifest_suffix = '@0@.json'.format(host_machine.cpu())
else
vulkan_manifest_suffix = 'json'
endif
subdir('include') subdir('include')
subdir('bin') subdir('bin')

View file

@ -209,7 +209,7 @@ option(
choices : ['auto', 'amd', 'broadcom', 'freedreno', 'intel', 'intel_hasvk', choices : ['auto', 'amd', 'broadcom', 'freedreno', 'intel', 'intel_hasvk',
'panfrost', 'swrast', 'virtio', 'imagination', 'panfrost', 'swrast', 'virtio', 'imagination',
'microsoft-experimental', 'nouveau', 'asahi', 'gfxstream', 'microsoft-experimental', 'nouveau', 'asahi', 'gfxstream',
'all'], 'kosmickrisp', 'all'],
description : 'List of vulkan drivers to build. If this is set to auto ' + description : 'List of vulkan drivers to build. If this is set to auto ' +
'all drivers applicable to the target OS/architecture ' + 'all drivers applicable to the target OS/architecture ' +
'will be built' 'will be built'
@ -286,6 +286,19 @@ option(
'Default: $datadir/vulkan/icd.d' 'Default: $datadir/vulkan/icd.d'
) )
option(
'vulkan-manifest-per-architecture',
type : 'boolean',
value : true,
description : 'If true, Vulkan ICDs have a separate JSON manifest per ' +
'architecture, for example lvp_icd.x86_64.json. ' +
'(Recommended for non-default ${prefix}.) ' +
'If false, all architectures share a single JSON manifest, ' +
'for example lvp_icd.json, referencing the library by its ' +
'basename. ' +
'(Recommended for Unix OS distros installing into /usr.)'
)
option( option(
'moltenvk-dir', 'moltenvk-dir',
type : 'string', type : 'string',
@ -833,7 +846,7 @@ option(
type : 'array', type : 'array',
value : ['perfetto'], value : ['perfetto'],
choices : [ choices : [
'libdrm', 'perfetto', 'libdrm', 'libva', 'perfetto',
], ],
description : 'Allows the fallback mechanism if the dependency is not available on the system, or too old.' description : 'Allows the fallback mechanism if the dependency is not available on the system, or too old.'
) )

View file

@ -103,6 +103,8 @@ ForEachMacros:
- foreach_list_typed_safe - foreach_list_typed_safe
- foreach_two_lists - foreach_two_lists
- U_SPARSE_BITSET_FOREACH_SET
# nir # nir
- nir_foreach_function_temp_variable - nir_foreach_function_temp_variable
- nir_foreach_function_temp_variable_safe - nir_foreach_function_temp_variable_safe
@ -237,7 +239,9 @@ ForEachMacros:
- agx_foreach_reg_dest - agx_foreach_reg_dest
- agx_foreach_successor - agx_foreach_successor
- foreach_next_use - foreach_next_use
- libagx_foreach_xfb
# poly
- poly_foreach_xfb
# radv # radv
- PHASE - PHASE

View file

@ -27,12 +27,12 @@
#define FAMILY_NV 0x8F //# 143 / Navi: 10 #define FAMILY_NV 0x8F //# 143 / Navi: 10
#define FAMILY_VGH 0x90 //# 144 / Van Gogh #define FAMILY_VGH 0x90 //# 144 / Van Gogh
#define FAMILY_NV3 0x91 //# 145 / Navi: 3x #define FAMILY_NV3 0x91 //# 145 / Navi: 3x
#define FAMILY_GFX1150 0x96 #define FAMILY_STX 0x96
#define FAMILY_PHX 0x94 //# 148 / Phoenix #define FAMILY_PHX 0x94 //# 148 / Phoenix
#define FAMILY_RMB 0x92 //# 146 / Rembrandt #define FAMILY_RMB 0x92 //# 146 / Rembrandt
#define FAMILY_RPL 0x95 //# 149 / Raphael #define FAMILY_RPL 0x95 //# 149 / Raphael
#define FAMILY_MDN 0x97 //# 151 / Mendocino #define FAMILY_MDN 0x97 //# 151 / Mendocino
#define FAMILY_GFX12 0x98 #define FAMILY_NV4 0x98
// AMDGPU_FAMILY_IS(familyId, familyName) // AMDGPU_FAMILY_IS(familyId, familyName)
#define FAMILY_IS(f, fn) (f == FAMILY_##fn) #define FAMILY_IS(f, fn) (f == FAMILY_##fn)
@ -101,9 +101,9 @@
#define AMDGPU_NAVI31_RANGE 0x01, 0x10 //# 01 <= x < 16 #define AMDGPU_NAVI31_RANGE 0x01, 0x10 //# 01 <= x < 16
#define AMDGPU_NAVI32_RANGE 0x20, 0xFF //# 32 <= x < 255 #define AMDGPU_NAVI32_RANGE 0x20, 0xFF //# 32 <= x < 255
#define AMDGPU_NAVI33_RANGE 0x10, 0x20 //# 16 <= x < 32 #define AMDGPU_NAVI33_RANGE 0x10, 0x20 //# 16 <= x < 32
#define AMDGPU_GFX1150_RANGE 0x01, 0x40 //# 1 <= x < 64 #define AMDGPU_STRIX1_RANGE 0x01, 0x40 //# 1 <= x < 64
#define AMDGPU_GFX1151_RANGE 0xC0, 0xFF //# 192 <= x < 255 #define AMDGPU_STRIX_HALO_RANGE 0xC0, 0xFF //# 192 <= x < 255
#define AMDGPU_GFX1152_RANGE 0x40, 0x50 //# 64 <= x < 80 #define AMDGPU_KRACKAN1_RANGE 0x40, 0x50 //# 64 <= x < 80
#define AMDGPU_GFX1153_RANGE 0x50, 0xC0 //# 80 <= x < 192 #define AMDGPU_GFX1153_RANGE 0x50, 0xC0 //# 80 <= x < 192
#define AMDGPU_PHOENIX1_RANGE 0x01, 0x80 //# 1 <= x < 128 #define AMDGPU_PHOENIX1_RANGE 0x01, 0x80 //# 1 <= x < 128
#define AMDGPU_PHOENIX2_RANGE 0x80, 0xC0 //# 128 <= x < 192 #define AMDGPU_PHOENIX2_RANGE 0x80, 0xC0 //# 128 <= x < 192
@ -181,9 +181,9 @@
#define ASICREV_IS_NAVI31_P(r) ASICREV_IS(r, NAVI31) #define ASICREV_IS_NAVI31_P(r) ASICREV_IS(r, NAVI31)
#define ASICREV_IS_NAVI32_P(r) ASICREV_IS(r, NAVI32) #define ASICREV_IS_NAVI32_P(r) ASICREV_IS(r, NAVI32)
#define ASICREV_IS_NAVI33_P(r) ASICREV_IS(r, NAVI33) #define ASICREV_IS_NAVI33_P(r) ASICREV_IS(r, NAVI33)
#define ASICREV_IS_GFX1150(r) ASICREV_IS(r, GFX1150) #define ASICREV_IS_STRIX1(r) ASICREV_IS(r, STRIX1)
#define ASICREV_IS_GFX1151(r) ASICREV_IS(r, GFX1151) #define ASICREV_IS_STRIX_HALO(r) ASICREV_IS(r, STRIX_HALO)
#define ASICREV_IS_GFX1152(r) ASICREV_IS(r, GFX1152) #define ASICREV_IS_KRACKAN1(r) ASICREV_IS(r, KRACKAN1)
#define ASICREV_IS_GFX1153(r) ASICREV_IS(r, GFX1153) #define ASICREV_IS_GFX1153(r) ASICREV_IS(r, GFX1153)
#define ASICREV_IS_PHOENIX(r) ASICREV_IS(r, PHOENIX) #define ASICREV_IS_PHOENIX(r) ASICREV_IS(r, PHOENIX)
#define ASICREV_IS_PHOENIX2(r) ASICREV_IS(r, PHOENIX2) #define ASICREV_IS_PHOENIX2(r) ASICREV_IS(r, PHOENIX2)

View file

@ -220,11 +220,11 @@ ADDR_E_RETURNCODE Lib::Create(
pLib = Gfx10HwlInit(&client); pLib = Gfx10HwlInit(&client);
break; break;
case FAMILY_NV3: case FAMILY_NV3:
case FAMILY_GFX1150: case FAMILY_STX:
case FAMILY_PHX: case FAMILY_PHX:
pLib = Gfx11HwlInit(&client); pLib = Gfx11HwlInit(&client);
break; break;
case FAMILY_GFX12: case FAMILY_NV4:
pLib = Gfx12HwlInit(&client); pLib = Gfx12HwlInit(&client);
break; break;
default: default:

View file

@ -750,9 +750,9 @@ ChipFamily Gfx11Lib::HwlConvertChipFamily(
} }
break; break;
case FAMILY_GFX1150: case FAMILY_STX:
{ {
m_settings.isGfx1150 = 1; m_settings.isStrix = 1;
} }
break; break;
case FAMILY_PHX: case FAMILY_PHX:
@ -1743,7 +1743,7 @@ UINT_32 Gfx11Lib::GetValidDisplaySwizzleModes(
if (false if (false
|| (m_settings.isPhoenix) || (m_settings.isPhoenix)
|| (m_settings.isGfx1150) || (m_settings.isStrix)
) )
{ {
// Not all GPUs support displaying with 256kB swizzle modes. // Not all GPUs support displaying with 256kB swizzle modes.

View file

@ -34,7 +34,7 @@ struct Gfx11ChipSettings
{ {
struct struct
{ {
UINT_32 isGfx1150 : 1; UINT_32 isStrix : 1;
UINT_32 isPhoenix : 1; UINT_32 isPhoenix : 1;
UINT_32 reserved1 : 30; UINT_32 reserved1 : 30;

View file

@ -43,12 +43,8 @@ multisample-dEQP-GLES31.functional.blend_equation_advanced.basic.multiply,Fail
multisample-dEQP-GLES31.functional.blend_equation_advanced.basic.overlay,Fail multisample-dEQP-GLES31.functional.blend_equation_advanced.basic.overlay,Fail
multisample-dEQP-GLES31.functional.blend_equation_advanced.basic.screen,Fail multisample-dEQP-GLES31.functional.blend_equation_advanced.basic.screen,Fail
# new with ANGLE 2024-10-17
KHR-GLES31.core.texture_buffer.texture_buffer_max_size,Fail
# New failure with ANGLE 2025-02-12 # New failure with ANGLE 2025-02-12
KHR-GLES3.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit,Crash KHR-GLES3.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit,Crash
# New failures with ES CTS 3.2.12.0 # New failures with ES CTS 3.2.12.0
KHR-GLES3.framebuffer_blit.scissor_blit,Crash
KHR-GLES3.framebuffer_blit.multisampled_to_singlesampled_blit_depth_config_test,Crash KHR-GLES3.framebuffer_blit.multisampled_to_singlesampled_blit_depth_config_test,Crash

View file

@ -347,14 +347,16 @@
.ci-tron-test-amdgpu: .ci-tron-test-amdgpu:
variables: variables:
CI_TRON_PATTERN__JOB_WARN__REGEX: 'ring .* timeout' CI_TRON_PATTERN__JOB_WARN__REGEX: 'ring .* timeout'
CI_TRON_INITRAMFS__DEPMOD__URL: "https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64.depmod.cpio.xz" CI_TRON_KERNEL__URL: "https://fs.mupuf.org/radv/linux-6.17.3_w_buddy_fixes/linux-x86_64"
CI_TRON_INITRAMFS__GPU__URL: "https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64.gpu.cpio" CI_TRON_INITRAMFS__DEPMOD__URL: "https://fs.mupuf.org/radv/linux-6.17.3_w_buddy_fixes/linux-x86_64.depmod.cpio.xz"
CI_TRON_INITRAMFS__GPU__URL: "https://fs.mupuf.org/radv/linux-6.17.3_w_buddy_fixes/linux-x86_64.gpu_amdgpu.cpio"
CI_TRON_INITRAMFS__GPU__FORMAT__0__ARCHIVE__KEEP__0__PATH: "(lib/(modules|firmware/amdgpu)/.*)" CI_TRON_INITRAMFS__GPU__FORMAT__0__ARCHIVE__KEEP__0__PATH: "(lib/(modules|firmware/amdgpu)/.*)"
CI_TRON_KERNEL_CMDLINE__LOAD_MODULES: 'modules_load=amdgpu' CI_TRON_KERNEL_CMDLINE__LOAD_MODULES: 'modules_load=amdgpu'
tags: tags:
- farm:$RUNNER_FARM_LOCATION - farm:$RUNNER_FARM_LOCATION
- $CI_TRON_DUT_SETUP_TAGS - $CI_TRON_DUT_SETUP_TAGS
- amdgpu:$INTEGRATED_OR_DISCRETE - amdgpu:$INTEGRATED_OR_DISCRETE
- ci-tron:priority:$CI_TRON_JOB_PRIORITY
.ci-tron-test-radv: .ci-tron-test-radv:
extends: .ci-tron-test-amdgpu extends: .ci-tron-test-amdgpu
@ -417,20 +419,6 @@
CI_TRON_KERNEL_CMDLINE__TSC_WORKAROUND: 'tsc=unstable' CI_TRON_KERNEL_CMDLINE__TSC_WORKAROUND: 'tsc=unstable'
GPU_VERSION: radv-polaris10 GPU_VERSION: radv-polaris10
# FIXME: B2C's 6.16 kernel regressed and leads to the following hang with a 10% probability. Let's keep using the
# last known working kernel until the bisection is over.
# [ 32.648386] amdgpu 0000:2d:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring kiq_0.2.1.0 test failed (-110)
# [ 32.648641] [drm:gfx_v8_0_hw_fini [amdgpu]] *ERROR* KCQ disable failed
# [ 32.900818] amdgpu: cp is busy, skip halt cp
# [ 33.152738] amdgpu: rlc is busy, skip halt rlc
# [ 33.980604] amdgpu 0000:2d:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring gfx test failed (-110)
# [ 33.980854] amdgpu 0000:2d:00.0: amdgpu: resume of IP block <gfx_v8_0> failed -110
# [ 33.980860] amdgpu 0000:2d:00.0: amdgpu: GPU Recovery Failed: -110
CI_TRON_KERNEL__URL: "https://fs.mupuf.org/radv/linux-6.15.9/linux-x86_64"
CI_TRON_INITRAMFS__DEPMOD__URL: "https://fs.mupuf.org/radv/linux-6.15.9/linux-x86_64.depmod.cpio.xz"
CI_TRON_INITRAMFS__GPU__URL: "https://fs.mupuf.org/radv/linux-6.15.9/linux-x86_64.gpu.cpio"
.polaris10-test-valve-mupuf: .polaris10-test-valve-mupuf:
extends: .polaris10-test-valve extends: .polaris10-test-valve
variables: variables:
@ -489,11 +477,6 @@
INTEGRATED_OR_DISCRETE: discrete INTEGRATED_OR_DISCRETE: discrete
GPU_VERSION: radv-navi21 GPU_VERSION: radv-navi21
FDO_CI_CONCURRENT: 32 FDO_CI_CONCURRENT: 32
# FIXME: drop everything below to use the same kernel as the rest of the amdgpu jobs
CI_TRON_KERNEL__URL: https://fs.mupuf.org/linux-6.6-b2c-radv-ci
CI_TRON_INITRAMFS__DEPMOD__URL: null
CI_TRON_INITRAMFS__GPU__URL: null
CI_TRON_INITRAMFS__GPU__FORMAT__0__ARCHIVE__KEEP__0__PATH: null
.vangogh-test-valve: .vangogh-test-valve:
variables: variables:
@ -502,11 +485,6 @@
INTEGRATED_OR_DISCRETE: integrated INTEGRATED_OR_DISCRETE: integrated
GPU_VERSION: radv-vangogh GPU_VERSION: radv-vangogh
FDO_CI_CONCURRENT: 8 FDO_CI_CONCURRENT: 8
tags:
- farm:$RUNNER_FARM_LOCATION
- amdgpu:$INTEGRATED_OR_DISCRETE
- $CI_TRON_DUT_SETUP_TAGS
- $CI_TRON_JOB_PRIORITY_TAG
.raphael-test-valve: .raphael-test-valve:
variables: variables:
@ -523,12 +501,6 @@
INTEGRATED_OR_DISCRETE: discrete INTEGRATED_OR_DISCRETE: discrete
GPU_VERSION: radv-navi31 GPU_VERSION: radv-navi31
FDO_CI_CONCURRENT: 32 FDO_CI_CONCURRENT: 32
# FIXME: drop everything below to use the same kernel as the rest of the amdgpu jobs
CI_TRON_KERNEL__URL: https://fs.mupuf.org/linux-6.6-b2c-radv-ci
CI_TRON_INITRAMFS__DEPMOD__URL: null
CI_TRON_INITRAMFS__GPU__URL: null
CI_TRON_INITRAMFS__GPU__FORMAT__0__ARCHIVE__KEEP__0__PATH: null
.gfx1201-test-valve: .gfx1201-test-valve:
variables: variables:
@ -536,4 +508,4 @@
CI_TRON_DUT_SETUP_TAGS: amdgpu:codename:NAVI48 CI_TRON_DUT_SETUP_TAGS: amdgpu:codename:NAVI48
INTEGRATED_OR_DISCRETE: discrete INTEGRATED_OR_DISCRETE: discrete
GPU_VERSION: radv-gfx1201 GPU_VERSION: radv-gfx1201
FDO_CI_CONCURRENT: 16 # FIXME: Replace with 32 when the zerovram regression is addressed FDO_CI_CONCURRENT: 32

View file

@ -193,7 +193,6 @@ radv-tahiti-vkcts:
timeout: 1h timeout: 1h
variables: variables:
CI_TRON_TIMEOUT__OVERALL__MINUTES: 50 CI_TRON_TIMEOUT__OVERALL__MINUTES: 50
RADV_PERFTEST: video_decode,video_encode
radv-hawaii-vkcts: radv-hawaii-vkcts:
extends: extends:
@ -203,7 +202,6 @@ radv-hawaii-vkcts:
timeout: 1h timeout: 1h
variables: variables:
CI_TRON_TIMEOUT__OVERALL__MINUTES: 50 CI_TRON_TIMEOUT__OVERALL__MINUTES: 50
RADV_PERFTEST: video_decode,video_encode
radv-polaris10-vkcts: radv-polaris10-vkcts:
extends: extends:
@ -312,8 +310,7 @@ radv-navi31-vkcts:
- .radv-valve-rules - .radv-valve-rules
variables: variables:
RADV_DEBUG: nomeshshader # Disable mesh shaders until task shaders stop hanging RADV_DEBUG: nomeshshader # Disable mesh shaders until task shaders stop hanging
# TODO: Remove video_encode,video_decode with next kernel. RADV_PERFTEST: transfer_queue,hic
RADV_PERFTEST: transfer_queue,video_decode,video_encode,hic
CI_TRON_TIMEOUT__OVERALL__MINUTES: 20 CI_TRON_TIMEOUT__OVERALL__MINUTES: 20
@ -362,8 +359,8 @@ radv-fossils:
# RDNA3 (GFX11) # RDNA3 (GFX11)
- AMDGPU_GPU_ID="NAVI31" - AMDGPU_GPU_ID="NAVI31"
./install/fossilize-runner.sh ./install/fossilize-runner.sh
# RDNA3.5 (GFX1150) # RDNA3.5 (STRIX1)
- AMDGPU_GPU_ID="GFX1150" - AMDGPU_GPU_ID="STRIX1"
./install/fossilize-runner.sh ./install/fossilize-runner.sh
############### vkd3d-proton ############### vkd3d-proton

View file

@ -1,4 +1,4 @@
KHR-GL46.es_31_compatibility.shader_image_load_store.basic-allFormats-store-fs,Fail KHR-GL46.shader_image_load_store.basic-allTargets-atomic,Fail
KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r11f_g11f_b10f,Fail KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r11f_g11f_b10f,Fail
KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r16,Fail KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r16,Fail
KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r16f,Fail KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r16f,Fail

View file

@ -3,3 +3,7 @@ dEQP-GLES31.functional.geometry_shading.basic.output_256
KHR-GLES31.core.tessellation_shader.vertex.vertex_ordering KHR-GLES31.core.tessellation_shader.vertex.vertex_ordering
KHR-GL46.tessellation_shader.vertex.vertex_ordering KHR-GL46.tessellation_shader.vertex.vertex_ordering
KHR-Single-GL46.arrays_of_arrays_gl.AtomicUsage KHR-Single-GL46.arrays_of_arrays_gl.AtomicUsage
# The mesh shader tests trigger GPU resets on amdgpu, making the system
# unstable, so they have to be be skipped for now.
KHR-Single-GL46.meshShader.*

View file

@ -411,7 +411,3 @@ KHR-GL46.sparse_texture2_tests.UncommittedRegionsAccess_texture_cube_map_r32i,Fa
KHR-GL46.sparse_texture2_tests.UncommittedRegionsAccess_texture_2d_multisample_r32ui,Fail KHR-GL46.sparse_texture2_tests.UncommittedRegionsAccess_texture_2d_multisample_r32ui,Fail
KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r32ui,Fail KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r32ui,Fail
KHR-GL46.sparse_texture2_tests.UncommittedRegionsAccess_texture_2d_array_rg16f,Fail KHR-GL46.sparse_texture2_tests.UncommittedRegionsAccess_texture_2d_array_rg16f,Fail
# New failures with GL CTS 4.6.6.0
KHR-GL46.es_31_compatibility.shader_image_load_store.basic-allFormats-store-fs,Fail
KHR-GL46.direct_state_access.vertex_arrays_vertex_buffers_errors,Fail

Some files were not shown because too many files have changed in this diff Show more