Commit graph

221273 commits

Author SHA1 Message Date
Loïc Molinari
a4bd10c773 pan/crc: Enable CRC for multiple RTs on v6
v6 supports Transaction Elimination with multiple RTs at the condition
the write buffer size of the enabled color attachments for a tile
doesn't exceed 1600 bytes.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 17:43:05 +02:00
Loïc Molinari
c566aaed2e pan/crc: Store CRC state in a struct
Add the pan_crc_state structure and use it to store CRC state. The
struct only has a valid boolean for now but will be extended
later. This removes some explicit dereferencing, allows to wrap
state handling inside functions and helps readability.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 17:43:01 +02:00
Loïc Molinari
9960843c13 pan/crc: allow setting a NULL pointer to the CRC validity state
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 17:30:31 +02:00
Loïc Molinari
32229dba83 pan/crc: Cache temporary CRC info
Retrieve and cache temporary CRC info once at the beginning of
pan_emit_fbd(). This makes CRC info retrieval more localized and
avoids duplication.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 17:18:28 +02:00
Loïc Molinari
d911ef7c9d pan/crc: Simplify CRC buffer initialization
Transaction Elimination on a RT is disabled until there's a full frame
render with all tiles forcefully written back. This is currently done
by letting the Gallium driver track states and fix up FB preload by
disabling clean_fragment_write on the pre-frame DCD and by setting the
pre-frame mode to "always" (instead of "intersect").

This commit forces the write-back of all the tiles by setting
clean_tile_write_enable on the FBD instead. This simplifies the code
and removes most of the CRC state tracking from the Gallium driver.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 17:11:14 +02:00
Loïc Molinari
789ae79688 pan/crc: Move CRC selection function closer to caller
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:52:08 +02:00
Loïc Molinari
8c7adaf1ea pan/crc: Disallow CRC on sparse AFBC images
AFBC-P images are read only.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:47:48 +02:00
Loïc Molinari
dbd3f9b6ad pan/crc: Check CRC requirements in dedicated function
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:47:44 +02:00
Loïc Molinari
00f4ed9643 pan/crc: Use RT selection loop in single RT case
The single RT case can now use a common code path.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:18:37 +02:00
Loïc Molinari
f2a678ed45 pan/crc: Simplify CRC buffer selection logic
This commit doesn't really change the selection logic but tries to
make the reasoning more straightforward and prepare for future commits
where the CRC state will be cached.

A usable RT must pass a few conditional checks like the availability
of a CRC buffer. A selected RT must be usable and either have a valid
CRC buffer or be fully covered. In the MRT case, the first usable RT
with a valid CRC buffer is selected. If no RT has a CRC buffer
initialized, then the first usable RT is selected at the condition
it's fully covered.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:18:37 +02:00
Loïc Molinari
e39e303e23 pan/crc: Check CRC buffer validity and coverage on v5 and v6 too
CRC RT selection for v5 and v6 (v4 isn't supported) currently returns
0 (instead of -1) as long as the CRC buffer is usable but without
checking its validity like it's done for v7+. While it doesn't
incorrectly enable Transaction Elimination, it uselessly makes
dependent CRC code paths taken.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:18:37 +02:00
Loïc Molinari
bda7f8572e pan/crc: Check AFBC renderblock size on v5 and v6 too
Arch v5 and v6 should test the AFBC render block size too. In the
non-AFBC case, there's no need to check for the tile size which is
checked earlier by the caller.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:18:37 +02:00
Loïc Molinari
7fe62246dd pan/crc: Introduce pan_fb_is_fully_covered()
Add function to retrieve whether the area of a pan_fb_info data
structure is fully covered by the draw extent.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:18:37 +02:00
Loïc Molinari
b965adc60f pan/crc: Restrict CRC buffer creation to 1st RT mipmap level
Restrict the creation of a CRC buffer for an image to the 1st mipmap
level. At emit_fbd() time, Transation Elimination is only enabled if
CRC is enabled for the selected RT and if its first configured level
is 0.

This was previously enforced at the Gallium driver level but it needs
to be done at the lib level to later support PanVK too.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2026-04-16 16:18:37 +02:00
Marek Olšák
c4bd6bd590 radeonsi: just get si_shader_info::num_inputs from NIR
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
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
f249c297b2 radeonsi: set num_vs_inputs from nir->num_inputs and use it more
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
46c77ed745 radeonsi: don't call nir_recompute_io_bases for FS
the bases are unused now

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
a1f4d3e49b radeonsi: remove si_shader_info::input_semantic[]
it's unused now

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
3d356a99a7 radeonsi: compute si_shader_info::inputs_read without input_semantic[]
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
49888328a6 radeonsi: compute si_shader_info::color_attr_index without input_semantic[]
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:11 +00:00
Marek Olšák
e591bfea38 radv: remove radv_recompute_fs_input_bases
the bases are unused, so it does nothing now

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:11 +00:00
Marek Olšák
a96c854234 ac,radv,radeonsi: don't use nir_intrinsic_base for FS inputs
This all is needed to switch to the new helper.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:11 +00:00
Marek Olšák
dfe5fbc1d7 radeonsi: update shader info in si_nir_lower_color_flatshade_twoside
needed to get rid of IO bases

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:11 +00:00
Marek Olšák
264843c51f ac/llvm: reorder/remove variables in visit_load_input
Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:10 +00:00
Marek Olšák
195eea461c ac/llvm: correctly load 16-bit TCS inputs from VGPRs and simplify
The conversions to integer and bitcasts are unnecessary because everything
is already integer.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:10 +00:00
Marek Olšák
a48ffce4bd ac,radeonsi: stop using nir_intrinsic_base for TCS inputs passed via VGPRs
This also removes one use of input_semantic[].

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:10 +00:00
Marek Olšák
c8ce9d4b48 radeonsi: remove si_shader_info::num_outputs
Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:09 +00:00
Marek Olšák
a4396f2da6 radeonsi: remove si_shader_info::output_semantic[]
It does nothing now.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:09 +00:00
Marek Olšák
d4538b90a7 radeonsi: stop using output_semantic[] for LS outputs passed via VGPRs
this is also required to make mediump work

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:09 +00:00
Marek Olšák
ef229b8c3e radeonsi: stop using si_shader_info::output_semantic for passthrough TCS
This will allow removing output_semantic.

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:08 +00:00
Marek Olšák
debedefbeb radeonsi: stop setting si_shader_info::output_semantic for FS
FS doesn't use it anymore.

Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:08 +00:00
Marek Olšák
b60acfc5fb radeonsi: don't recompute IO bases for FS outputs
They are unused now.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:07 +00:00
Marek Olšák
ef44d8e9c8 ac,radeonsi: don't use nir_intrinsic_base for FS outputs
It was only used by the PS epilog in radeonsi.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:07 +00:00
Marek Olšák
99546f7bad ac/nir: add ac_nir_get_io_driver_location as replacement for IO bases
Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:07 +00:00
Marek Olšák
835f5faf14 nir: add back color0/1 system values and VARYING_SLOT_PARAM_GEN_AMD
It turns out we need the color sysvals recorded in system_values_read,
and PARAM_GEN is for point smoothing.

Acked-by: Pierre-Eric
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:07 +00:00
Karol Herbst
e09045e26c nak: the MS location comes last in TLD, same spot as depth compare in TEX
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Some Max Payne 3 shaders are impacted by this and probably will fix some
issue there. The VK CTS isn't testing this, but it was verified to fix a
real problem by inserting 0 offsets into the instruction and having CTS
tests fail with the old ordering.

Totals from 3 (0.00% of 1163204) affected shaders:
CodeSize: 2496 -> 2736 (+9.62%)
Static cycle count: 732 -> 741 (+1.23%)

Fixes: ad01fbdda0 ("nak: Add a NIR texture lowering pass")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40957>
2026-04-15 17:00:07 +00:00
Eric Engestrom
d6cc17cbdb docs: add sha sum for 26.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40986>
2026-04-15 17:44:45 +02:00
Eric Engestrom
d0b459ec0e docs: add release notes for 26.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40986>
2026-04-15 17:44:45 +02:00
Eric Engestrom
486b307265 docs: update calendar for 26.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40986>
2026-04-15 17:44:45 +02:00
Rhys Perry
7f3900ed20 ac/nir_lower_global_access: perform range analysis if useful
fossil-db (navi31):
Totals from 1197 (0.59% of 202426) affected shaders:
Instrs: 2117283 -> 2108380 (-0.42%); split: -0.47%, +0.05%
CodeSize: 11183776 -> 11140060 (-0.39%); split: -0.42%, +0.03%
Latency: 13568247 -> 13648044 (+0.59%); split: -0.13%, +0.72%
InvThroughput: 2389746 -> 2376716 (-0.55%); split: -0.63%, +0.09%
VClause: 43337 -> 43138 (-0.46%); split: -0.51%, +0.05%
SClause: 31035 -> 31027 (-0.03%); split: -0.22%, +0.20%
Copies: 227528 -> 227002 (-0.23%); split: -0.59%, +0.36%
Branches: 29393 -> 29392 (-0.00%); split: -0.01%, +0.00%
PreSGPRs: 64238 -> 64336 (+0.15%)
PreVGPRs: 70480 -> 70468 (-0.02%)
VALU: 1387439 -> 1379274 (-0.59%); split: -0.59%, +0.00%
SALU: 185514 -> 185382 (-0.07%); split: -0.56%, +0.49%
VOPD: 4425 -> 4400 (-0.56%); split: +0.66%, -1.22%

fossil-db (navi21):
Totals from 1197 (0.59% of 202427) affected shaders:
Instrs: 1987004 -> 1974920 (-0.61%); split: -0.64%, +0.03%
CodeSize: 10803928 -> 10745204 (-0.54%); split: -0.56%, +0.01%
VGPRs: 83848 -> 83856 (+0.01%); split: -0.01%, +0.02%
SpillSGPRs: 9843 -> 9861 (+0.18%)
Latency: 14518481 -> 14534898 (+0.11%); split: -0.17%, +0.29%
InvThroughput: 3712336 -> 3698081 (-0.38%); split: -0.52%, +0.13%
VClause: 52677 -> 52546 (-0.25%); split: -0.51%, +0.27%
SClause: 31113 -> 31050 (-0.20%); split: -0.37%, +0.17%
Copies: 219723 -> 218017 (-0.78%); split: -1.05%, +0.27%
Branches: 33717 -> 33716 (-0.00%); split: -0.01%, +0.00%
PreSGPRs: 66364 -> 66480 (+0.17%)
PreVGPRs: 71048 -> 71036 (-0.02%)
VALU: 1442585 -> 1431331 (-0.78%); split: -0.78%, +0.00%
SALU: 209617 -> 208517 (-0.52%); split: -0.88%, +0.35%

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/40945>
2026-04-15 15:13:10 +00:00
Eric Engestrom
1e03ef5c38 docs: update calendar for 26.1.0-rc1
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/40981>
2026-04-15 14:37:28 +00:00
Zan Dobersek
4d4a951ac6 fd: add a8xx perfcntr countables
Add the a8xx perfcntr countables lists for each supported perfcntr group,
as collected from the proprietary profiling tools.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40971>
2026-04-15 14:09:24 +00:00
Eric Engestrom
9444b9c2c5 docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40978>
2026-04-15 13:15:35 +00:00
Eric Engestrom
d55ae5985b VERSION: bump to 26.2
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40978>
2026-04-15 13:15:35 +00:00
Benjamin Cheng
9182da14a7 radv: Relax linear requirement to VCN1 and prior
With the previous commit ("ac/surface: Filter swizzle modes for VCN"),
only video-compatible swizzle modes will be picked, so we can enable
tiling for VCN2+.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40948>
2026-04-15 12:48:57 +00:00
Benjamin Cheng
fcaab2b921 ac/surface: Filter swizzle modes for VCN
This will allow compatible swizzle modes to be picked for RADV (radeonsi
filters modifiers when creating video surfaces).

This mirrors the logic from ac_modifier_supports_video, and in
addition ensures that XOR swizzle modes are disabled for image arrays
because VCN does not support slice indices.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40948>
2026-04-15 12:48:57 +00:00
Christian Gmeiner
713cecb1df panvk: Advertise VK_EXT_rgba10x6_formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Map X6R10X6G10X6B10X6A10_UNORM to the native R10X6G10X6B10X6A10X6_UNORM
HW format on PAN_ARCH >= 11 where it is supported.

Enable the extension with formatRgba10x6WithoutYCbCrSampler in the
physical device, allowing VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16
to be used as a regular color format without YCbCr sampler conversion.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40653>
2026-04-15 12:16:53 +00:00
Christian Gmeiner
9f172ba4da util/format, vulkan: Add PIPE_FORMAT_X6R10X6G10X6B10X6A10_UNORM
The format has 4 x 16-bit words with 10-bit unorm values in bits [15:6]
and 6 padding bits in [5:0]. Since this requires 8 channel slots but the
format system only supports 4, use layout "other" with hand-written
pack/unpack conversion functions.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40653>
2026-04-15 12:16:53 +00:00
Christian Gmeiner
81b8113a9f radv: Don't advertise any features for R10X6G10X6B10X6A10X6_UNORM_4PACK16
The recent addition of PIPE_FORMAT_X6R10X6G10X6B10X6A10_UNORM caused
vk_format_to_pipe_format() to map VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16
to a real pipe format, which made radv_physical_device_get_format_properties()
advertise BLIT_SRC/SAMPLED_IMAGE for it. The hardware samples the data as plain
R16G16B16A16 UNORM, which doesn't match the 10-bit UNORM semantics the spec
(and CTS) require, so dEQP-VK.api.copy_and_blit.core.blit_image.* tests with
r10x6g10x6b10x6a10x6_unorm_4pack16 as the source started failing on gfx1201.

Override the mapping to PIPE_FORMAT_NONE so RADV reports zero format features,
matching the behavior prior to the new pipe format being added. Proper support
can be restored once VK_EXT_rgba10x6_formats is implemented.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40653>
2026-04-15 12:16:53 +00:00
Samuel Pitoiset
dc0d6100f9 radv/ci: document a descriptor heap failure
Test bug.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40918>
2026-04-15 11:22:10 +00:00