Commit graph

72290 commits

Author SHA1 Message Date
Marek Olšák
a20f189a04 radeonsi: don't set progress uselessly in si_postprocess_nir
it's unused here

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:24 +00:00
Marek Olšák
6a1eeefce5 radeonsi: call nir_lower_fp16_casts in si_postprocess_nir
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:23 +00:00
Marek Olšák
cd1e6982a8 radeonsi: move NIR callbacks to si_get.c
they are only used to set NIR options

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:22 +00:00
Marek Olšák
823565fff1 radeonsi/ci: update gfx12 flakes
The uniform block tests are only flaky with LLVM.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:22 +00:00
Marek Olšák
55d53e827a radeonsi: use si_preprocess/postprocess_nir function names
Most drivers use such names.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:22 +00:00
Marek Olšák
8ceef4e3d4 radeonsi: lower compute system values later
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:21 +00:00
Marek Olšák
3cc5517925 radeonsi: move CS sysval si_shader_info fields into si_shader_variant_info
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:21 +00:00
Marek Olšák
04e6e70e69 radeonsi: move CS user SGPR layout determination into si_shader_variant_info
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:20 +00:00
Marek Olšák
1bff4115e7 radeonsi: rename si_shader_info & si_shader_variant_info sysval fields
the prefix is changed to uses_sysval_*, some variables are renamed
completely to match the NIR names

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:19 +00:00
Marek Olšák
ce7c989b2b radeonsi: fold nir_lower_compute_system_values_options into pass parameters
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:18 +00:00
Marek Olšák
2250b05067 radeonsi: lower nir_var_mem_shared later
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:18 +00:00
Marek Olšák
d320a6553c radeonsi: update XFB info in the correct place after mediump IO lowering
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:16 +00:00
Marek Olšák
68690eaf4a Revert "radeonsi: use nir_opt_large_constants earlier"
This reverts commit df2eaba411.

We no longer use LCSSA because divergence analysis doesn't need it anymore.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:15 +00:00
Marek Olšák
7f7dbf68f4 radeonsi: call si_nir_mark_divergent_texture_non_uniform later
it doesn't have to be called in finalize_nir

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:15 +00:00
Marek Olšák
314e81def5 radeonsi: remove unnecessary NIR divergence analysis invocations
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:14 +00:00
Marek Olšák
e76fae1e0c radeonsi: rename si_nir_scan_shader -> si_nir_gather_info, etc.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:14 +00:00
Marek Olšák
4875e0a993 radeonsi: don't scalarize IO in finalize_nir
To make NIR more readable for ST_DEBUG=nir.

Shader info needs small changes to handle vector clipdist outputs.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:13 +00:00
Marek Olšák
904cc43556 radeonsi: remove unused FS input slots due to colors
This might have decreased performance due to extra LDS usage.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:12 +00:00
Marek Olšák
d06616063c radeonsi: assert that IO bases don't have holes & the same base isn't used twice
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:11 +00:00
Marek Olšák
affaf36685 radeonsi: assert that invalid FS inputs aren't present
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:11 +00:00
Marek Olšák
e5b1c568b9 radeonsi: fix color interpolation when finalize_nir is called twice
Calling finalize_nir twice causes si_nir_lower_color_inputs_to_sysvals
to be called twice. The pass always sets color interpolation to FLAT
at the beginning, and then lowers color input loads and sets the correct
interpolation mode. However, when the pass is called for the second time,
it just sets color interpolation to flat and does nothing, which overrides
the original interpolation mode.

This fixes color interpolation for those cases. This only happens with
ATI_fragment_shader AFAIK.

Fixes: deda05e2b7 - nir: move nir_lower_color_inputs into radeonsi

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:11 +00:00
Alyssa Rosenzweig
56b90a70b3 asahi: fix garbage with query reads
no, I don't know how this worked before.

fixes

KHR-GL45.conditional_render_inverted.functional
KHR-GL46.transform_feedback_overflow_query_ARB.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39111>
2025-12-31 10:27:04 -05:00
Alyssa Rosenzweig
130c1b0bd5 asahi: use flat tile size encoding
this is way more convenient.

(some cosmetic stuff squashed in).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39111>
2025-12-31 10:27:03 -05:00
Rob Clark
d197ea37d1 freedreno/a6xx: Extract out GMEM cache helper
Extract out a helper to calculate placement of various caches that live
in GMEM.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39052>
2025-12-30 07:42:07 -08:00
Michael Tretter
ebf1454410 r600: remove LLVM dependency
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
r600 doesn't use LLVM anymore. Remove the remaining print of the version
number and the dependencies in the build system.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39071>
2025-12-30 00:27:53 +00:00
Michael Tretter
8c4d824e39 r600: fix documentation of preoptir
The preoptir still prints the intermediate representation before
optimization, but now this isn't LLVM IR but NIR.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39071>
2025-12-30 00:27:53 +00:00
Michael Tretter
64a2081c7f r600: remove obsolete option for experimental NIR support
NIR shaders is the default for the r600 driver now. There is no point in
an option to enable this as experimental support.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39071>
2025-12-30 00:27:53 +00:00
Emma Anholt
974ca32643 freedreno/a3xx-a5xx: restore cbuf0 direct upload.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This broke a number of dEQP tests, for reasons that are unclear -- in
looking at cffdumps, the const setup looks appropriate, just changing from
e.g:

VS_CTRL_REG1(CONSTLEN=2)
FS_CTRL_REG1(CONSTLEN=1)
LOAD_STATE6(VERT, DIRECT, DST_OFF=2, NUM_UNIT=2)
LOAD_STATE6(FRAG, DIRECT, DST_OFF=0, NUM_UNIT=2)

to:

VS_CTRL_REG1(CONSTLEN=2)
FS_CTRL_REG1(CONSTLEN=1)
LOAD_STATE6(VERT, DIRECT, DST_OFF=2, NUM_UNIT=2)
LOAD_STATE6(FRAG, INDIRECT, DST_OFF=0, NUM_UNIT=2)

Fixes: 203ac73374 ("gallium: set prefer_real_buffer_in_constbuf0 for all drivers using tc")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39070>
2025-12-29 17:04:08 +00:00
Emma Anholt
08fc55cce9 freedreno/a3xx: Improve the name of CONSTFOOTPRINT and fix constlen==0 case.
It maybe doesn't matter, since if constlen is 0 you aren't accessing any
constants to hit the bounds check, but it sure looks wrong in dumps.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39070>
2025-12-29 17:04:08 +00:00
Georg Lehmann
5e8cc19a3b nir: remove per shader float fast math flags
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These were redundant with the per alu fast math flags.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39026>
2025-12-29 10:57:06 +00:00
Georg Lehmann
0e2b31c8df gallivm: stop using per shader float fast math flags
They are no longer set anywhere.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39026>
2025-12-29 10:57:06 +00:00
Georg Lehmann
44318091d8 gallivm: use nir_alu_instr_is_sz/nan_preserve
Just use the helper, this should be functionally the same.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39026>
2025-12-29 10:57:04 +00:00
Adam Jackson
0d5db86eba iris: Stop hardcoding 0:2:0 for the PCI bus address
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33656>
2025-12-26 05:15:41 +00:00
Samuel Pitoiset
b3c983b8dd amd,radv,radeonsi: add a new function to update windowed perf counters
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39065>
2025-12-24 07:20:01 +00:00
André
7219411f78 nouveau: fix memory leak by freeing drm version before returning
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 821f4c8d ("nouveau: import libdrm_nouveau")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Signed-off-by: André Costa <andre_miguel_costa@hotmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39066>
2025-12-23 21:06:39 +01:00
Linus Karl
7700ba28f5 ethos: fix build on non LP64 architectures
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/14310
Signed-off-by: Linus Karl <linus@lotz.li>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38592>
2025-12-23 08:58:26 +00:00
Linus Karl
01cb7d7fd1 rocket: fix build on non LP64 architectures
Cc: mesa-stable
Signed-off-by: Linus Karl <linus@lotz.li>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38592>
2025-12-23 08:58:26 +00:00
Juan A. Suarez Romero
0cab626014 v3d: don't build disk cache access on shader disablement
Don't build shader cache related functions when shader cache is disabled
on compile time.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14512
Backport-to: 25.3
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39064>
2025-12-23 08:42:38 +00:00
Timur Kristóf
fc57fa4589 radv, radeonsi: Don't pass task ring info to mesh/task payload lowering
The pass now uses the ring descriptors to figure these out.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39032>
2025-12-22 15:17:59 +00:00
Pavel Ondračka
18331bf89d r300: enable guardband for draw
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37977>
2025-12-22 14:32:08 +00:00
Pavel Ondračka
0d4aa5f55f r300: pop-free clipping
Ported from r600: fix pop-free clipping by Patrick Lerda

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37977>
2025-12-22 14:32:08 +00:00
Pavel Ondračka
4d36c637dd r300: program explicit scissor around viewport
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37977>
2025-12-22 14:32:07 +00:00
Daniel Schürmann
f7c4aa48a0 ac/gpu_info: add some more flags to ac_cu_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38701>
2025-12-22 07:34:46 +00:00
Daniel Schürmann
f791e46c47 aco: add ac_cu_info to aco_compiler_options
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38701>
2025-12-22 07:34:46 +00:00
Daniel Schürmann
6f4e8046b5 ac/gpu_info: create separate function ac_fill_cu_info() to fill out CU info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38701>
2025-12-22 07:34:45 +00:00
Daniel Schürmann
553b431aca ac/gpu_info: move some CU information into separate struct ac_cu_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38701>
2025-12-22 07:34:44 +00:00
Daniel Schürmann
b9c7cea719 radeonsi: use si_shader_encode_{sgprs|vgprs} in si_compute.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38701>
2025-12-22 07:34:42 +00:00
Valentine Burley
f8ed6c578a zink/ci: Mark new TGL glx failures as flakes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These newly failures can pass intermittently.

Fixes: a00f6ee033 ("zink/ci: Add tests to the anv-tgl fails list to reflect CI state")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39056>
2025-12-21 11:38:31 +00:00
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
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