Commit graph

207539 commits

Author SHA1 Message Date
Caio Oliveira
d14fa6683b intel/executor: update SFID names in macros to match recent changes
After commit 88309a9818, SFID names were renamed

- "dp data 1" became "hdc1"
- "thread_spawner" became "ts/btd"

Update macros in executor to use the new SFID names so the
generated assembly can be parsed correctly.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35701>
2025-06-25 17:31:00 -07:00
Antonino Maniscalco
32a6b7ae09 freedreno/decode: expose lookback as a cli option
It is sometimes necessary to exetend the lookback in order to catch
`CP_INDIRECT_BUFFER` packets.

Expose it as a command line option to facilitate that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35752>
2025-06-26 00:10:16 +00:00
Timothy Arceri
eaad90c262 util/cpu: fix broken powerpc linux builds
Fixes: 0ffbfa1d54 ("util/cpu: Teach the Linux code about getauxval()")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35727>
2025-06-25 23:39:23 +00:00
Eric Engestrom
2801c51a9e freedreno/drm: fix libvdrm inclusion logic
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 0e3584df44 ("freedreno/drm/virtio: Switch to vdrm helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
2025-06-26 01:02:37 +02:00
Eric Engestrom
1a6fc7006a meson: split subdir for virtio/vdrm and virtio/vulkan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
2025-06-25 22:21:48 +00:00
Eric Engestrom
6f8c4a7ce1 virtio: move inc_virtio up one folder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
2025-06-25 22:21:48 +00:00
Eric Engestrom
a1daeb87a8 meson: fix vdrm inclusion logic
This is about which driver use vdrm, not which OS we're on.

Fixes the build on non-KMS/DRM system.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12899
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
2025-06-25 22:21:48 +00:00
Eric Engestrom
d0c7bea727 meson: allow "venus without virgl" builds
`cc: mesa-stable` instead of `fixes:` because several commits have
modified this but keeping this bug:
- 06e57e3231 ("virtio: Add vdrm native-context helper") made
  an unconditional copy of subdir(virtio)
- cede4e7ac3 ("meson: Only include virtio when DRM available")
  introduced a new condition, which doesn't cover everything that was
  needed
- other commits made more changes

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
2025-06-25 22:21:47 +00:00
Eric Engestrom
b4ed35994d meson: bump required meson version to 1.4
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35652#note_2973761

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35742>
2025-06-25 21:55:16 +00:00
Eric Engestrom
474774ea58 meson: drop error for meson < 1.3 since we require 1.3+ already
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35742>
2025-06-25 21:55:16 +00:00
Eric Engestrom
cd9879d632 docs: drop outdated line about meson version
Clearly we don't keep this line updated, so let's just drop it to not
state incorrect information.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35742>
2025-06-25 21:55:15 +00:00
Mohamed Ahmed
ab6c55893b nil/copy.rs: Add host copy support for Fermi-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35756>
2025-06-25 21:32:38 +00:00
Faith Ekstrand
3c5b4fdc82 nil: Rename a few GOB types
This adds a single catch-all depth/stencil GOB type instead of Turing
having its own and renames the Fermi GOB type FermiColor because we
don't want to pretend depth/stencil and color are the same anywhere at
the moment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35756>
2025-06-25 21:32:38 +00:00
Faith Ekstrand
c83493cfb2 nil: Fix the GOBType::TuringColor2D description
The sectors were in the wrong order.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35756>
2025-06-25 21:32:37 +00:00
Antonino Maniscalco
8ea0b00a75 zink: wait for sparse queue to go idle
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When destroying the context we should also wait for the sparse queue to
go idle.

cc: mesa-stable

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35750>
2025-06-25 18:24:35 +00:00
Samuel Pitoiset
e91029c82d aco: consider that nir_tex_src_{coord,ddx} can be the first source
Only -1 means it's not found, but 0 is still valid.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35736>
2025-06-25 17:20:02 +00:00
Eric R. Smith
fddd455e9c pan: Teach libpanfrost about YU08/Y010
This is just a matter of adding a few entries to existing
arrays/switch-statements, the rest of the logic stays
unchanged.

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/35318>
2025-06-25 18:40:32 +02:00
Eric R. Smith
f2093b137e dri2: Teach the DRI layer about YU08 and YU10
Add the necessary bits to support YU08/YU10 images.

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/35318>
2025-06-25 18:38:40 +02:00
Eric R. Smith
8c68512b84 gallium/st: Teach the state tracker about YU08 and YU10 formats
Add the necessary bits to the state tracker to support single plane
YUV 420 formats (YU08 and YU10 fourcc codes).

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/35318>
2025-06-25 18:38:37 +02:00
Eric R. Smith
d4f83a96c9 util/format: add support for YU08 and YU10 formats
Adds support for single plane YUV 420 formats (YU08 and YU10 fourcc
codes). The internal layout for these is unspecified and driver
specific.

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/35318>
2025-06-25 18:37:28 +02:00
Pierre-Eric Pelloux-Prayer
bb22697437 winsys/amdgpu: use mesa_loge instead of fprintf
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's helpful on platforms with custom loggers like Android.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
2025-06-25 16:19:59 +00:00
Pierre-Eric Pelloux-Prayer
c1bfbabca3 radeonsi: use mesa_loge instead of fprintf
It's helpful on platforms with custom loggers like Android.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
2025-06-25 16:19:59 +00:00
Pierre-Eric Pelloux-Prayer
514a35b5ae winsys/amdgpu: remove return value from amdgpu_init_cs_context
It can't fail.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
2025-06-25 16:19:59 +00:00
Pierre-Eric Pelloux-Prayer
613e9e9c23 radeonsi: check set_debug_callback before use
The callback might not be installed yet if si_create_context fails
early.

Fixes: 59a3f38ff6 ("radeonsi: clear the debug callback on ctx destroy")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
2025-06-25 16:19:58 +00:00
Michel Dänzer
ac8dc19512 radeonsi: Don't assert src_va != 0 with CP_DMA_CLEAR
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
CP_DMA_CLEAR just clears the destination, which doesn't require a valid
source address.

Fixes spurious assertion failures running xserver build tests (with
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34958 also
applied).

Fixes: a1b8c6c404 ("radeosi: assert addresses are not NULL in a couple of places")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35718>
2025-06-25 14:35:22 +00:00
Lars-Ivar Hesselberg Simonsen
ef91ad64d5 panvk/v10+: Advertise nullDescriptor support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Advertise support for VK_EXT_robustness2 with only the nullDescriptor
feature enabled.

Except for index buffers, the same implementation should work for v9 as
well.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Lars-Ivar Hesselberg Simonsen
228d62479a panvk/v9+: Handle nullDescriptor for texture/image builtins
When loading the texure/image glsl builtins from a descriptor, we
currently apply modifiers to account for the stored value. This does not
work for nullDescriptors.

Therefore, check whether the Descriptor Type field is set to zero, which
would indicate a nullDescriptor, and if so directly return zero.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Lars-Ivar Hesselberg Simonsen
a789867cb4 panvk/v10+: Implement nullDescriptor support
Adds support for nullDescriptors in PanVK by memsetting the relevant
descriptors to zero. This is valid for v9+.

Note that vertex/index buffers require special handling in order to rely
on out-of-bounds behavior.
For index buffers specifically, the approach is only valid for v10+, as
v9 does not have a way to specify index buffer size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Lars-Ivar Hesselberg Simonsen
bbe3c7e1a3 pan/genxml/v9+: Add support for NullDescriptor decode
It's now valuable to know whether a decoded descriptor is completely
zeroed (NullDescriptor) or invalid.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Georg Lehmann
01d20680e2 aco/optimizer: generalize p_create_vector of split vector opt
Foz-DB Navi48:
Totals from 116 (0.14% of 80251) affected shaders:
MaxWaves: 2965 -> 2972 (+0.24%)
Instrs: 145933 -> 144632 (-0.89%); split: -0.91%, +0.02%
CodeSize: 815968 -> 806512 (-1.16%); split: -1.20%, +0.04%
VGPRs: 7240 -> 7144 (-1.33%); split: -1.66%, +0.33%
Latency: 3065858 -> 3063802 (-0.07%); split: -0.11%, +0.05%
InvThroughput: 745395 -> 743506 (-0.25%); split: -0.26%, +0.01%
VClause: 3702 -> 3694 (-0.22%); split: -0.65%, +0.43%
SClause: 3187 -> 3191 (+0.13%)
Copies: 12716 -> 11804 (-7.17%); split: -7.42%, +0.25%
Branches: 3501 -> 3503 (+0.06%)
PreVGPRs: 5400 -> 5327 (-1.35%); split: -1.41%, +0.06%
VALU: 76455 -> 75492 (-1.26%); split: -1.30%, +0.04%
SALU: 23594 -> 23595 (+0.00%); split: -0.00%, +0.01%
VOPD: 1478 -> 1527 (+3.32%); split: +4.67%, -1.35%

Mostly helps FSR4.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35674>
2025-06-25 11:03:30 +00:00
Boris Brezillon
5fe1b95b33 pan: Make it so all pan_image_xxx helpers get passed an image
Some layout related helpers are being passed images subfields. Let's
make things consistent by always passing an image, plus extra parameters
to specify which part of the image is addressed.

While at it, move these helpers protypes/definitions to pan_image.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:53 +02:00
Boris Brezillon
53e5e07c4b pan: Add the concept of modifier handler
There are a few operations that are modifier specific. Instead of
spreading the

   if (is_mod_x) do_x
   else if (is_mod_y) do_y
   ...

pattern, let's add the concept of mod handler so we can abstract away
these operations and get rid of some boiler-plate.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:53 +02:00
Boris Brezillon
0f90ae39c4 panfrost: Allow AFBC(3D) on Valhall
Now that pan_layout_init() has been fixed to report the correct
slice size, we can do what the comment says and allow AFBC(3D)
on v7+.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:53 +02:00
Boris Brezillon
92ea3139c1 pan/layout: Don't mix AFBC and non-AFBC properties
AFBC is different from other modifiers (AFRC, u-tiled and linear) in that
metadata is placed in a separate memory section that needs to be properly
sized/aligned. This forces us to have header/body (or metadata/payload)
info stored at the layout level if we don't want to recalculate one
from the other everytime we need to fill descriptors.

Those properties were already present, but some of them were encoded in
non-afbc prefixed fields which makes things very confusing. Let's clarify
that by moving AFBC properties to their own struct, and move the
previously generic {row,surface}_stride_B to a tiled_or_linear struct.
We use a union to combine both.

With this sanitized semantics, we can fix some inconsistencies in our
AFBC layout initialization, hence the functional changes to
test-layout.cpp.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:53 +02:00
Boris Brezillon
b06f6b81a6 pan/layout: Fix WSI.Import test
We were leaving the depth to zero, but the layout code expects a depth
of at least one.

Add an assert() in pan_image_layout_init() to catch this in the future.

Fixes: 916f75a2a6 ("pan/layout: Test WSI import behavior on all supported format/mods")
Signed-off-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/35555>
2025-06-25 12:10:47 +02:00
Boris Brezillon
f87cd970e3 pan/layout: Document the strict property
pan_image_layout_constraints::strict only applies to imports of AFBC/AFRC
resources. Linear/tiled imports are already strict, and any new modifier
addition should be strict too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
1f2aa429d8 pan/layout: Get rid of pan_image_[render]block_size_el()
Now that things are handled per-modifier at the pan_layout level, there's
no good reason to keep those helpers.

The BlockSize.Linear test is dropped, since blocksize is assumed to be
<1,1> all the time.

panfrost_resource_create_with_modifier() is changed to make use of the
pan_image_get_wsi_row_pitch() helper to calculate the DUMB_BUFFER
stride/width.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
e6f8cab698 pan/layout: Split the logic per modifier
Prepare for mod handlers by splitting the layout logic per modifier.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
18f87b6ada pan/format: De-duplicate get_plane_blocksize()
Expose a pan_format_get_planed_blocksize() so we don't have to duplicate
the logic in test-layout.cpp.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
4bf983fb26 pan/afbc: Add the pan_afbc_{super,render}block_size_el() helpers
Those are just pan_afbc_{render,super}block_size_el() but with the
size returned in number of elements instead of pixels. This is only
relevant for YUV-formats whose block extent is bigger than one pixel.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
8b93e8c33e pan/layout: Get rid of pan_image_surface_{offset,stride}()
For AFBC images it's not clear what the offset/stride refers to (header
or body). Let's clear the confusion by dropping the helper and letting
the callers dereference the layout directly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
0825eccb47 pan/image: Get rid of pan_iview_get_surface()
No longer used, get rid of it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
8a8ea487de pan/desc: Split the attachment descriptor emission per modifier
Will be needed for the pan_mod_handler abstraction we'll introduce later
on.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
d4f89986ff pan/genxml: Get rid of the Plane descriptor
We use specialized plane descriptors now almost everywhere except when
we want to get the plane descriptor size, and we can use a null plane in
that case, so let's get rid of the old definitions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
4b3be4a4a6 pan/texture: Split the texture payload emission logic per modifier
This is a preliminary step to allow delegating texture payload emission
to a modifier handler.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
442be34441 pan/genxml: Introduce per-type plane descriptors
It makes it easier to decipher when reading a dump, and it will also
make overlapping fields impossible to set twice once we've converted the
texture logic to use those.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
5b654a07b1 pan/afxc: s/pan_format_supports_afxc/pan_afxc_supports_format/
Let's stay consistent with the rest of the afxc helpers and
prefix this helper with pan_afxc.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
1522fdc371 pan/afbc: Fix header alignment requirement on Midgard
This is actually 64 byte on Midgard. This makes pan_afbc_body_align()
and pan_afbc_header_align() return the same value, so let's define
one as a wrapper around the other.

Not flagged as a fix because pan_image_layout() init is handling AFBC
header alignment properly on Midgard already, but we want that fixed
to cleanup the image layout logic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
883ce63db5 pan/genxml: Reconcile AFBC RT properties naming on v5+
Pick the same names we use on v9+ for the "Render Target AFBC Overlay"
properties that exist on v5+ too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
a2e9ce39e9 pan/layout: Drop pan_image_slice_layout::afbc::{stride_sb,nr_sblocks}
Those fields are only used for AFBC packing which has deep knowledge
of AFBC layouts and can easily recover the row_stride/size in superblock
from other layout fields.

By getting rid of these two fields we also reduce the number of ways we
can express the same information, which makes things less confusing
overall.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00