mesa/src
Loïc Molinari 98c8c95755 panfrost: Fix AFBC packing
Layout refactoring commits broke AFBC packing while removing several
fields to simplify the logic. The stride and height are now derived
when necessary at packing time based on the resource modifier. The
problem is that the code assumes that the source and destination
headers are the same although the source and destination modifiers
might differ and create size mismatches when passed to the AFBC
utilities in pan_afbc.h. The destination modifier is set as the source
modifier without the AFBC_FORMAT_MOD_SPARSE and AFBC_FORMAT_MOD_TILED
flags. While the AFBC_FORMAT_MOD_SPARSE flag doesn't have any impact
on these utilities, the AFBC_FORMAT_MOD_TILED flag does.

This commit fixes the issue by keeping the same header block layout
(linear or tiled header layout) when packing a resource. This allows
to simply parse header blocks linearly without having to bother with
the internal layout (Morton order). The tiled packed resource might
also benefit from better cache accesses.

Fixes: a2e9ce39e9 pan/layout: Drop pan_image_slice_layout::afbc::{stride_sb,nr_sblocks}
Fixes: 01d325ba63 pan/layout: Interleave header/body in AFBC(3D)
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35001>
2025-07-12 11:58:13 +00:00
..
amd ac/nir: remove redundant option dont_export_cull_distances 2025-07-12 10:28:21 +00:00
android_stub
asahi asahi: fix disasm of large shaders 2025-07-10 14:55:18 -04:00
broadcom broadcom/ci: document recent flakes 2025-07-11 15:04:21 +02:00
c11
compiler nir: Unvendor sampler_lod_parameters(_pan) 2025-07-12 10:48:03 +00:00
drm-shim
egl egl/wayland: Move bind_wayland_display to legacy build option 2025-07-10 14:51:20 +00:00
etnaviv ci: separate hidden jobs to -inc yml files 2025-06-30 12:32:29 +00:00
freedreno freedreno/ci: Add ASan jobs on a618 2025-07-12 09:21:03 +00:00
gallium panfrost: Fix AFBC packing 2025-07-12 11:58:13 +00:00
gbm egl/wayland: Move bind_wayland_display to legacy build option 2025-07-10 14:51:20 +00:00
getopt
gfxstream gfxstream: Small optimization on transformDescriptorSetList 2025-06-26 17:11:41 +00:00
glx glx: Drop LIBGL_DRI3_DISABLE 2025-07-10 17:11:13 +00:00
gtest
imagination pvr: enable partial vertex input dmas 2025-07-08 23:10:59 +00:00
imgui
intel anv: Set TG size based on number of threads 2025-07-10 22:08:36 +00:00
loader dri: fix __DRI_IMAGE_FORMAT* to PIPE_FORMAT* mappings 2025-06-30 23:04:57 +00:00
mapi mesa: support NV_timeline_semaphore 2025-07-07 21:18:29 +00:00
mesa mesa: remove gl_program.Target 2025-07-11 02:25:50 +00:00
microsoft dozen: adopt wsi_common_get_memory 2025-07-09 23:45:04 +00:00
nouveau nvk/ci: document usual run time for ad106 job 2025-07-11 15:04:21 +02:00
panfrost nir: Unvendor sampler_lod_parameters(_pan) 2025-07-12 10:48:03 +00:00
tool perfetto/android: align datasource names with tooling expectations 2025-04-08 18:29:10 +00:00
util ac/nir: handle VARYING_SLOT_VARn_16BIT the same as other slots 2025-07-12 05:20:02 +00:00
virtio venus: adopt wsi_common_get_memory 2025-07-09 23:45:03 +00:00
vulkan vk/runtime: Handle VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE 2025-07-11 22:05:18 +00:00
x11 glx/egl/x11: fix x11_dri3_check_multibuffer 2025-02-17 02:50:15 +00:00
.clang-format libagx: port pre-GS to CL 2025-06-27 15:31:49 +00:00
meson.build egl/wayland: Move bind_wayland_display to legacy build option 2025-07-10 14:51:20 +00:00