Natalie Vock
9c8a17e172
aco/lower_to_hw_instr: Lower calls
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34531 >
2025-09-15 17:16:20 +00:00
Natalie Vock
3667a7b687
aco: Add call info
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34531 >
2025-09-15 17:16:20 +00:00
Natalie Vock
af812862b7
aco: Add call-related program/block properties
...
Indicates various properties about calls: Whether a program is an
indirect callee, whether a program or block contains function calls, and
whether registers used by a caller need to be preserved.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34531 >
2025-09-15 17:16:20 +00:00
Natalie Vock
917a98b722
aco: Add ABI and Pseudo CALL format
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34531 >
2025-09-15 17:16:20 +00:00
Natalie Vock
e850650f92
aco: Add function call attributes
...
ACO needs RADV to set certain attributes on NIR functions to help with
compilation of function calls.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34531 >
2025-09-15 17:16:20 +00:00
Natalie Vock
d18b438832
aco: Add RegisterDemand::operator!=
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34531 >
2025-09-15 17:16:20 +00:00
Karol Herbst
cbc838b7d1
rusticl: reference resource in sampler and image view wrappers
...
Since b3133e250e ("gallium: add pipe_context::resource_release to
eliminate buffer refcounting") we need to take a reference for every bound
buffer object.
As we create image views on buffers, and kinda take partly reference
already just do it properly for now so we don't end up with
use-after-frees in drivers.
Fixes: dee9600a ("zink: eliminate buffer refcounting to improve performance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37350 >
2025-09-15 16:56:22 +00:00
Job Noorman
563b0b347a
ir3: don't create merge sets for subreg moves
...
There are multiple places where RA assumes merge sets are either
all-full or all-half registers. Creating merge sets for subreg moves
mixes full and half registers which may lead to RA failures.
Fix this by not creating merge sets for subreg moves anymore. Instead,
we manually try to allocate a subreg move's src for its dst when
selecting a register during RA, similar to how ALU/SFU instructions try
to reuse their srcs.
Totals:
Instrs: 363174291 -> 363175216 (+0.00%); split: -0.00%, +0.00%
CodeSize: 922975364 -> 922977230 (+0.00%); split: -0.00%, +0.00%
NOPs: 47652421 -> 47652444 (+0.00%); split: -0.00%, +0.00%
MOVs: 15652959 -> 15653065 (+0.00%); split: -0.00%, +0.00%
COVs: 4097203 -> 4097052 (-0.00%); split: -0.01%, +0.00%
(ss): 7806025 -> 7806183 (+0.00%); split: -0.00%, +0.00%
(sy): 3981862 -> 3981855 (-0.00%); split: -0.00%, +0.00%
(ss)-stall: 26612057 -> 26612789 (+0.00%); split: -0.00%, +0.00%
(sy)-stall: 111568786 -> 111568721 (-0.00%); split: -0.00%, +0.00%
STPs: 345796 -> 345792 (-0.00%)
LDPs: 191118 -> 191111 (-0.00%)
Preamble Instrs: 160491915 -> 160492355 (+0.00%); split: -0.00%, +0.00%
Last helper: 116587870 -> 116588273 (+0.00%); split: -0.00%, +0.00%
Cat0: 53288367 -> 53288384 (+0.00%); split: -0.00%, +0.00%
Cat1: 20954383 -> 20954336 (-0.00%); split: -0.00%, +0.00%
Cat2: 155294307 -> 155295252 (+0.00%); split: -0.00%, +0.00%
Cat6: 4623070 -> 4623059 (-0.00%)
Cat7: 9302363 -> 9302384 (+0.00%); split: -0.00%, +0.00%
Totals from 979 (0.07% of 1352016) affected shaders:
Instrs: 1324850 -> 1325775 (+0.07%); split: -0.07%, +0.14%
CodeSize: 2596114 -> 2597980 (+0.07%); split: -0.04%, +0.11%
NOPs: 330197 -> 330220 (+0.01%); split: -0.23%, +0.24%
MOVs: 62592 -> 62698 (+0.17%); split: -0.35%, +0.52%
COVs: 49011 -> 48860 (-0.31%); split: -0.62%, +0.31%
(ss): 35671 -> 35829 (+0.44%); split: -0.28%, +0.73%
(sy): 18936 -> 18929 (-0.04%); split: -0.13%, +0.09%
(ss)-stall: 157929 -> 158661 (+0.46%); split: -0.36%, +0.82%
(sy)-stall: 543371 -> 543306 (-0.01%); split: -0.20%, +0.19%
STPs: 2741 -> 2737 (-0.15%)
LDPs: 3022 -> 3015 (-0.23%)
Preamble Instrs: 322588 -> 323028 (+0.14%); split: -0.01%, +0.14%
Last helper: 298996 -> 299399 (+0.13%); split: -0.05%, +0.19%
Cat0: 361575 -> 361592 (+0.00%); split: -0.21%, +0.22%
Cat1: 111733 -> 111686 (-0.04%); split: -0.45%, +0.41%
Cat2: 487366 -> 488311 (+0.19%); split: -0.04%, +0.23%
Cat6: 21239 -> 21228 (-0.05%)
Cat7: 37170 -> 37191 (+0.06%); split: -0.06%, +0.12%
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Fixes: c757b22c5f ("ir3: add subreg move optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37368 >
2025-09-15 15:07:47 +00:00
Julian Orth
efc2bb64ce
kms-swrast: export dmabufs with DRM_RDWR
...
This is required for the dmabufs to be usable with llvmpipe.
Fixes #13609
Signed-off-by: Julian Orth <ju.orth@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37088 >
2025-09-15 14:50:00 +00:00
Mike Blumenkrantz
dfcdae378a
zink: don't use screen ralloc context for screen::pipeline_libs
...
set_rehash will realloc this memory, which triggers a UAF on screen destroy
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37370 >
2025-09-15 14:29:38 +00:00
Mike Blumenkrantz
f7480771c6
zink: stop unsetting zink_gfx_pipeline::modules on shader unbind
...
this conflicts with the optimal_key
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37370 >
2025-09-15 14:29:38 +00:00
David Rosca
e1ea3f8bbf
radv/video: Always use OBU_FRAME in AV1 encode
...
Saves couple bytes per frame.
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37176 >
2025-09-15 14:12:17 +00:00
Patrick Lerda
06da0e7310
r600: fix emit_ssbo_atomic_op when ssbo_image_offset is non-zero
...
The value read was incorrect.
This change was tested on palm, barts and cayman, it fixes all the variants
of the advanced-sso-simple test:
khr-gl4[56]/es_31_compatibility/shader_image_load_store/advanced-sso-simple: fail pass
khr-gles31/core/shader_image_load_store/advanced-sso-simple: fail pass
Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37225 >
2025-09-15 13:57:34 +00:00
Erik Faye-Lund
1a9dc3de1f
panfrost: add per-gpu GLES2 extension lists
...
This allows us to avoid accidental feature regressions, by verifying
that the reality matches the expectations in CI.
This is inspired by a similar change in r300.
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37363 >
2025-09-15 12:56:15 +00:00
Quentin Schulz
b1a28b1165
meson: fix libcl assert() reproducibility
...
The current -fmacro-prefix-map only handles removal of relative paths
but we still need to handle absolute paths.
The following path can be found in libvulkan_panfrost.so when building
with Yocto for example:
/work/build/tmp/work/cortexa76-cortexa55-crypto-poky-linux/mesa/25.2.0/sources/mesa-25.2.0/src/panfrost/libpan/../../util/bitpack_helpers.h
These paths currently seem to only appear in the binary in strings that
start with "Shader assertion fail at " which seems to indicate there are
calls to assert() with absolute paths as well as relative paths (which
are already patched with fmacro-prefix-map).
By stripping the project source and build root directories from the
paths with -fmacro-prefix-map, we get rid of this reproducibility issue
(which incidentally makes the build fail due to buildpaths QA issue).
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36927 >
2025-09-15 12:18:37 +00:00
Quentin Schulz
6afe429b7c
meson: replace global_source_root/global_build_root with project_*
...
global_source_root() and global_build_root() typically shouldn't be used
in case the current project can be used as a subproject as it'll return
the path to the main project[1][2].
Instead, let's do as suggested by the documentation and use
project_source_root() and project_build_root() instead.
[1] https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonglobal_source_root
[2] https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonglobal_build_root
Suggested-by: Eric Engestrom <eric@igalia.com >
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36927 >
2025-09-15 12:18:37 +00:00
Quentin Schulz
e1765a2914
nvk: remove unused relative_dir variable
...
In commit f35172b6a4 ("meson: make CL args common"), the
fmacro-prefix-map using relative_dir variable was moved from child
meson.build files to the main meson.build file. However, the
relative_dir variable assignment from src/nouveau/vulkan/meson.build
wasn't removed, while src/asahi/libagx's and src/panfrost/libpan's were.
This seems to be an oversight, so let's remove this seemingly now unused
relative_dir meson variable from nvk's meson.build.
This also allows us to remove the use of discouraged global_build_root()
[1] and global_source_root()[2].
[1] https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonglobal_build_root
[2] https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonglobal_source_root
Fixes: f35172b6a4 ("meson: make CL args common")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36927 >
2025-09-15 12:18:37 +00:00
Sergi Blanch Torne
b886ca33b8
ci: fix gc2000 fails duplication
...
From !37273 in commit db3501ec4f , the transition Fail to Crash on two tests
produced a duplication in the fails file. The pre-merge didn't catch it, but
in the nightlies and in the ci-uprev attempts to uprev Piglit the jobs report
the duplication error.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37364 >
2025-09-15 11:25:55 +00:00
Boris Brezillon
a620f33b7c
panvk: Add planar Z24S8 support
...
It allows us to use AFBC even if separateDepthStencilLayouts=true.
Unfortunately, AFBC(S8) is only supported on v9+, so we keep using
interleaved Z24S8 on earlier gens.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
741df48085
panvk: Stop using panvk_image_can_use_afbc() in panvk_image_can_use_mod()
...
panvk_image_can_use_afbc() doesn't know about depth/stencil format
lowering, and does the AFBC format check on the wrong format if planar
depth/stencil is enabled. Inline what we need from this helper in
panvk_image_can_use_mod(). Ultimately we should make it so that
panvk_image_can_use_afbc() uses panvk_image_can_use_mod() and not the
other way around.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
2cd851a55f
panvk: Pass an image to panvk_plane_count()
...
We're going to support Z24S8 planar images, but only on v9+. Let's
pass an image to panvk_plane_index() so we can extract the stencil
plane index from the number of planes instead of basing it only on the
format.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
7ac76d4e91
panvk: Initialize panvk_image::plane_count early
...
We are about to use it at initialization time, so let's make sure it's
initialized as early as possible. We defer the initialization to a helper
because we will extend it to support planar Z24S8.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
9c2c43c5e4
pan/lib: Hook-up Z24_UNORM_PACKED support
...
Only works on Valhall for now.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
18f352090d
util/format: Add a Z24_UNORM_PACKED format
...
Mali GPUs support Z24_UNORM stored on three bytes instead of four. Add
a new format for this case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
f67d267237
panvk: Make AFBC an opt-out
...
Use AFBC when we can.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
7cdd938e6e
panvk: Disallow AFBC(D24S8) if separateDepthStencilLayouts=true
...
We can't have separate depth/stencil layouts with Z24S8, so make sure
we always use a linear layout in that case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
b4b874ef24
panvk: Consolidate image copy format selection
...
Non-UNORM/non-RGBA8 formats forces blend shaders to be used when the
graphics pipeline is involved. We also have a few formats that can't
be used with AFBC, so let's consolidate the formats we pick when using
a graphics pipeline independently of the image modifier.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
3643a4115b
panvk: Make panvk_meta.h per-gen
...
All the meta stuff is per-gen anyway, and there's nothing in
pan_device.h needing the stuff defined in panvk_meta.h, so let's
just make this file per-gen, which will allow us to use PAN_ARCH in
the inline helpers.
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/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
d47b016a84
panvk: Don't allow AFBC if the format format is mutable on v7-
...
We can't create texture descriptors with a format that's different
from the image format, because the texture format encodes the
compression mode on Bifrost. So let's forbid AFBC when
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT is set.
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/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
cbe461c930
pan/afbc: Allow AFBC on UINT/SINT/SNORM types on v9+
...
Thanks to the decorrelation of compression mode and texture format,
AFBC is type-agnostic on v9+. We can thus safely allow UINT, SINT and
SNORM variants. The FLOAT variants are still not supported though.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
dc00bd9825
pan/desc: Upgrade writeback format to RAW32 on v9+ when AFBC(RAW24)
...
AFBC(RAW24) is not supported on v9+. Use RAW32 instead, and let the AFBC
compression mode select the actual size.
No Fixes tag here, because AFBC(RAW24) is not a thing until we allow
non-UNORM formats with AFBC.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
62dcc4c01b
panfrost: Explictly filter out AFBC(SNORM)
...
We are about to allow any type that is not FLOAT on v9+ at the
pan_afbc_format() level, but this regresses
dEQP-GLES31.functional.copy_image.non_compressed.viewclass_16_bits.*_snorm*
tests because of the clamping that's done on values that fall outside
the [-2^(b-1)+1, 2^(b-1)-1] range (b being the number of bits in the
SNORM component).
In order to fix that, we would have to use a _UNORM type when copying,
but:
1. There are many places where internal copies can happen and it's hard
to identify all of them
2. If we do it at the panfrost_blit_no_afbc_legalization() level, we
might do format re-interpretation that's not wanted by the gallium
layer
Given AFBC(SNORM) has not been supported so far, let's just go for the
simple solution and filter it out explicitly in panfrost_should_afbc().
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/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
8c208bc41e
pan/afbc: Cache the pan_afbc_mode selection
...
One we have selected a pan_afbc_mode (AKA AFBC format) for an image,
there's no reason for it change, so let's cache that at the
pan_image_layout level and re-use it when we can instead of doing
the pipe format -> afbc mode conversion over and over again.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
f57cc49683
util/format: Autogen type conversion helpers
...
We are about to need new type converters for our AFBC mode selection
logic (AFBC is type agnostic, but we currently accept only UNORM
formats), so let's switch to an autogen solution for the existing ones,
and generate all missing type converters along the way.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
909d4deea8
panvk: Hook-up optimal modifier selection
...
Pass a pan_image_usage object to pan_image_test_props() and do the mod
selection in two passes: one where we only accept optimal modifiers,
and if none was found, a second pass to pick a non-optimal one.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
5ac236a937
pan/afbc: Add missing S8 and Z32 cases to pan_afbc_format()
...
AFBC(Z32) has always been supported through AFBC(RGBA8), the entry was
just missing. AFBC(S8) on the other hand, is something that has been
added to v9.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
05c2d45c3c
panfrost: Explicitly reject AFBC(Z32)
...
We are about to extend pan_afbc_format() to support AFBC(Z32),
but the the AFBC(Z32) + S8 combination doesn't work on v7-, so
we need to filter AFBC(Z32) out in panfrost_should_afbc() on
v7-.
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/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
42b90f858e
pan/format: Fix the mapping for Z32_FLOAT on v7+
...
Mapping Z32_FLOAT to R32F works fine until we start using AFBC(Z32),
which triggers DATA_INVALID faults. That's not an issue on v9+
because the compression mode and texture format are decorrelated,
but we need this change if we want to support AFBC(Z32) on v7.
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/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
bff39c4f25
pan/mod: Allow testing if a modifier is optimal
...
Testing if a modifier is supported for a set of image properties is not
enough when we're supposed to pick the best modifier among a selection
of modifiers. Extend the image/mod logic to report if a modifier is
optimal when supported.
This forces us to pass extra usage information through a new
pan_image_usage object. When this usage info is missing (NULL), the
mod layer assumes a set of usage that would make the modifier optimal.
Note that the usage info also allows us to reject a few more cases
that would otherwise need to be checked by the frontend.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Erik Faye-Lund
a4547fd4b1
pan/lib: set afbc mode based on plane-format, not view
...
The AFBC mode describes the mode of the plane-format, which is what is
stored in memory, not the image view format (which is the
interpretation of the *decompressed* memory).
This requires us to move the special S8 cases to a separate
pan_afbc_decompression_mode() helper, since those are
decompression-only mode which we need to view Z24S8 (AKA RGBA8)
as X24S8, or R8 as R8R8. While at it, get rid of PAN_AFBC_MODE_S8,
since it's not a thing in practice.
No Fixes or Cc-stable tag here, because things were working just
fine before that in the gallium driver, and AFBC is still an opt-in
feature in panvk.
Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/205
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
2668316917
panfrost: Fix panfrost_batch_to_fb_info() for stencil-only attachments
...
Stencil-only attachments should go in the stencil view, not the
depth/stencil one.
Cc: mesa-stable
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/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
dd698919ca
panvk/jm: Add a JM barrier on clear AFBC jobs
...
We need to add a JM barrier after the memset(0) COMPUTE job if we want
to ensure the header reset happens before any texturing from this texture
in subsequent COMPUTE/VERTEX jobs.
Fixes: c95f899305 ("panvk: add a meta command for transitioning image layout
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
b2fabf1ffe
panvk/jm: Automatically open a batch in dispatch_precomp()
...
cmd_clear_afbc_metadata() might be called before any other job, and it's
assuming dispatch_precomp() doesn't fail in that case. We could
explicitly open the batch in cmd_clear_afbc_metadata(), but checking for
cur_batch==NULL and opening a new batch seems to be okay too, and it
allows us to not special case for v7 in cmd_clear_afbc_metadata().
Fixes: c95f899305 ("panvk: add a meta command for transitioning image layout")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
023972827a
panvk/jm: Preload the FB even if we have no draws queued
...
There seems to be cases where we end up with a depth/stencil preload,
with no draw associated to it, so let's make sure we preload in that
case, otherwise we will write invalid data back.
Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
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/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
ec9a5c8278
panvk: Pass a correct aspect to panvk_plane_index()
...
In panvk_vX_cmd_meta.c, panvk_plane_index() is passed the bit position
instead of an aspect in a couple places.
Fixes: c95f899305 ("panvk: add a meta command for transitioning image layout")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Boris Brezillon
7943441cad
panvk: Fix panvk_image_can_use_afbc() for GetPhysicalDeviceImageFormatProperties2()
...
Commit 33eff977f6 ("panvk: Use pan_image_test_props() to do our
modifier check") removed the checks that are already done by
pan_image_test_props() from panvk_image_can_use_afbc(), but it didn't
account for the fact panvk_image_can_use_afbc() is also used to
report suboptimal setup when HOST_TRANSFER is set.
Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Fixes: 33eff977f6 ("panvk: Use pan_image_test_props() to do our modifier check")
Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/204
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158 >
2025-09-15 10:59:04 +00:00
Christian Gmeiner
2a5d515922
etnaviv: Support PIPE_FORMAT_S8_UINT stencil format
...
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37014 >
2025-09-15 10:45:17 +00:00
Christian Gmeiner
fda092729d
etnaviv: rs: Support 8bpp for clears
...
Needs a GPU with S8 support.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37014 >
2025-09-15 10:45:17 +00:00
Christian Gmeiner
750c2fab76
etnaviv: Update headers from rnndb
...
Update to rnndb commit 2d84bab111c0
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37014 >
2025-09-15 10:45:16 +00:00
Christian Gmeiner
7028b78252
etnaviv: hwdb: Add S8 feature
...
This feature tells if the GPU core supports 8bit stencil.
The bit in the gc_feature_database.h is called REG_RSS8 but lets call it
just S8 to name it more generic.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37014 >
2025-09-15 10:45:16 +00:00