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>
This commit is contained in:
Boris Brezillon
2025-06-13 19:22:54 +02:00
parent 1522fdc371
commit 5b654a07b1
11 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -177,7 +177,7 @@ static void
pan_afbc_reswizzle_border_color(const struct pipe_sampler_state *cso,
struct panfrost_sampler_state *so)
{
if (!pan_format_supports_afbc(PAN_ARCH, cso->border_color_format))
if (!pan_afbc_supports_format(PAN_ARCH, cso->border_color_format))
return;
/* On v7, pan_texture.c composes the API swizzle with a bijective
@@ -1794,7 +1794,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
#if PAN_ARCH == 7
/* v7 requires AFBC reswizzle */
if (!util_format_is_depth_or_stencil(format) && !pan_format_is_yuv(format) &&
pan_format_supports_afbc(PAN_ARCH, format))
pan_afbc_supports_format(PAN_ARCH, format))
GENX(pan_texture_afbc_reswizzle)(&iview);
#endif
@@ -920,7 +920,7 @@ pan_preload_emit_textures(struct pan_pool *pool, const struct pan_fb_info *fb,
#if PAN_ARCH == 7
/* v7 requires AFBC reswizzle. */
if (!pan_format_is_yuv(view->format) &&
pan_format_supports_afbc(PAN_ARCH, view->format)) {
pan_afbc_supports_format(PAN_ARCH, view->format)) {
struct pan_image_view *pview = &patched_views[patched_count++];
*pview = *view;
GENX(pan_texture_afbc_reswizzle)(pview);
+2 -2
View File
@@ -536,7 +536,7 @@ panfrost_should_afbc(struct panfrost_device *dev,
return false;
/* Only a small selection of formats are AFBC'able */
if (!pan_format_supports_afbc(dev->arch, fmt))
if (!pan_afbc_supports_format(dev->arch, fmt))
return false;
/* AFBC does not support layered (GLES3 style) multisampling. Use
@@ -654,7 +654,7 @@ panfrost_should_afrc(struct panfrost_device *dev,
return false;
/* Only a small selection of formats are AFRC'able */
if (!pan_format_supports_afrc(fmt))
if (!pan_afrc_supports_format(fmt))
return false;
/* AFRC does not support layered (GLES3 style) multisampling. Use
+3 -3
View File
@@ -335,12 +335,12 @@ panfrost_walk_dmabuf_modifiers(struct pipe_screen *screen,
for (unsigned i = 0; i < yuv_lowering.nres; i++) {
enum pipe_format plane_format = yuv_lowering.res_formats[i];
afbc &= pan_format_supports_afbc(dev->arch, plane_format);
afbc &= pan_afbc_supports_format(dev->arch, plane_format);
}
} else {
afbc &= pan_format_supports_afbc(dev->arch, format);
afbc &= pan_afbc_supports_format(dev->arch, format);
ytr &= pan_afbc_can_ytr(format);
afrc &= !is_yuv && pan_format_supports_afrc(format);
afrc &= !is_yuv && pan_afrc_supports_format(format);
}
PANFROST_EMULATED_MODIFIERS(emulated_mods);
+1 -1
View File
@@ -395,7 +395,7 @@ pan_afbc_format(unsigned arch, enum pipe_format format, unsigned plane_idx)
/* A format may be compressed as AFBC if it has an AFBC internal format */
static inline bool
pan_format_supports_afbc(unsigned arch, enum pipe_format format)
pan_afbc_supports_format(unsigned arch, enum pipe_format format)
{
unsigned plane_count = util_format_get_num_planes(format);
+4 -4
View File
@@ -163,7 +163,7 @@ pan_afrc_clump_get_nr_components(enum pipe_format format, bool scan)
}
static inline bool
pan_format_supports_afrc(enum pipe_format format)
pan_afrc_supports_format(enum pipe_format format)
{
struct pan_afrc_format_info finfo = pan_afrc_get_format_info(format);
@@ -173,7 +173,7 @@ pan_format_supports_afrc(enum pipe_format format)
static inline unsigned
pan_afrc_query_rates(enum pipe_format format, unsigned max, uint32_t *rates)
{
if (!pan_format_supports_afrc(format))
if (!pan_afrc_supports_format(format))
return 0;
unsigned clump_comps = pan_afrc_clump_get_nr_components(format, false);
@@ -216,7 +216,7 @@ static inline unsigned
pan_afrc_get_modifiers(enum pipe_format format, uint32_t rate, unsigned max,
uint64_t *modifiers)
{
if (!pan_format_supports_afrc(format))
if (!pan_afrc_supports_format(format))
return 0;
/* For now, the number of components in a clump is always the same no
@@ -272,7 +272,7 @@ pan_afrc_block_size_from_modifier(uint64_t modifier)
static inline uint32_t
pan_afrc_get_rate(enum pipe_format format, uint64_t modifier)
{
if (!drm_is_afrc(modifier) || !pan_format_supports_afrc(format))
if (!drm_is_afrc(modifier) || !pan_afrc_supports_format(format))
return PAN_AFRC_RATE_NONE;
bool scan = pan_afrc_is_scan(modifier);
+1 -1
View File
@@ -753,7 +753,7 @@ GENX(pan_texture_afbc_reswizzle)(struct pan_image_view *iview)
*/
assert(!util_format_is_depth_or_stencil(iview->format));
assert(!pan_format_is_yuv(iview->format));
assert(pan_format_supports_afbc(PAN_ARCH, iview->format));
assert(pan_afbc_supports_format(PAN_ARCH, iview->format));
uint32_t mali_format = GENX(pan_format_from_pipe_format)(iview->format)->hw;
+1 -1
View File
@@ -574,7 +574,7 @@ format_can_do_mod(unsigned arch, enum pipe_format format, unsigned plane_idx,
if (drm_is_afbc(modifier)) {
return pan_afbc_format(arch, format, plane_idx) != PAN_AFBC_MODE_INVALID;
} else if (drm_is_afrc(modifier)) {
return arch >= 10 && pan_format_supports_afrc(format);
return arch >= 10 && pan_afrc_supports_format(format);
} else {
assert(modifier == DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED ||
modifier == DRM_FORMAT_MOD_LINEAR);
+1 -1
View File
@@ -81,7 +81,7 @@ panvk_image_can_use_mod(struct panvk_image *image, uint64_t mod)
VK_IMAGE_USAGE_STORAGE_BIT) ||
image->vk.samples > 1 ||
!pan_query_afbc(&phys_dev->kmod.props) ||
!pan_format_supports_afbc(arch, pfmt) ||
!pan_afbc_supports_format(arch, pfmt) ||
image->vk.tiling == VK_IMAGE_TILING_LINEAR ||
image->vk.image_type == VK_IMAGE_TYPE_1D ||
(image->vk.image_type == VK_IMAGE_TYPE_3D && arch < 7) ||
+1 -1
View File
@@ -106,7 +106,7 @@ prepare_tex_descs(struct panvk_image_view *view)
#if PAN_ARCH == 7
/* v7 requires AFBC reswizzle. */
else if (!pan_format_is_yuv(view->pview.format) &&
pan_format_supports_afbc(PAN_ARCH, view->pview.format))
pan_afbc_supports_format(PAN_ARCH, view->pview.format))
GENX(pan_texture_afbc_reswizzle)(&pview);
#endif
+1 -1
View File
@@ -84,7 +84,7 @@ panvk_afbc_reswizzle_border_color(VkClearColorValue *border_color, VkFormat fmt)
enum pipe_format pfmt = vk_format_to_pipe_format(fmt);
if (pan_format_is_yuv(pfmt) || util_format_is_depth_or_stencil(pfmt) ||
!pan_format_supports_afbc(PAN_ARCH, pfmt))
!pan_afbc_supports_format(PAN_ARCH, pfmt))
return;
const struct util_format_description *fdesc = util_format_description(pfmt);