panfrost: Use panfrost_afbc_superblock_width
..instead of panfrost_block_dim. This is clearer, and gets rid of block dim users. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15991>
This commit is contained in:
committed by
Marge Bot
parent
36449bdcdc
commit
d25bb73bb6
@@ -451,7 +451,7 @@ pan_prepare_rt(const struct pan_fb_info *fb, unsigned idx,
|
||||
cfg->afbc.row_stride = slice->afbc.row_stride /
|
||||
AFBC_HEADER_BYTES_PER_TILE;
|
||||
cfg->afbc.afbc_wide_block_enable =
|
||||
panfrost_block_dim(rt->image->layout.modifier, true, 0) > 16;
|
||||
panfrost_afbc_superblock_width(rt->image->layout.modifier) > 16;
|
||||
#else
|
||||
cfg->afbc.chunk_size = 9;
|
||||
cfg->afbc.sparse = true;
|
||||
@@ -584,7 +584,7 @@ pan_force_clean_write_rt(const struct pan_image_view *rt, unsigned tile_size)
|
||||
if (!drm_is_afbc(rt->image->layout.modifier))
|
||||
return false;
|
||||
|
||||
unsigned superblock = panfrost_block_dim(rt->image->layout.modifier, true, 0);
|
||||
unsigned superblock = panfrost_afbc_superblock_width(rt->image->layout.modifier);
|
||||
|
||||
assert(superblock >= 16);
|
||||
assert(tile_size <= 16*16);
|
||||
|
||||
@@ -95,8 +95,7 @@ panfrost_afbc_superblock_height(uint64_t modifier)
|
||||
* extract the dimensions of a block-based format and use that to calculate the
|
||||
* line stride as such.
|
||||
*/
|
||||
|
||||
unsigned
|
||||
static inline unsigned
|
||||
panfrost_block_dim(uint64_t modifier, bool width, unsigned plane)
|
||||
{
|
||||
if (!drm_is_afbc(modifier)) {
|
||||
|
||||
@@ -82,7 +82,7 @@ panfrost_compression_tag(const struct util_format_description *desc,
|
||||
flags |= MALI_AFBC_SURFACE_FLAG_PREFETCH;
|
||||
|
||||
/* Wide blocks (> 16x16) */
|
||||
if (panfrost_block_dim(modifier, true, 0) > 16)
|
||||
if (panfrost_afbc_superblock_width(modifier) > 16)
|
||||
flags |= MALI_AFBC_SURFACE_FLAG_WIDE_BLOCK;
|
||||
|
||||
/* Used to make sure AFBC headers don't point outside the AFBC
|
||||
|
||||
@@ -177,9 +177,6 @@ unsigned panfrost_afbc_superblock_width(uint64_t modifier);
|
||||
|
||||
unsigned panfrost_afbc_superblock_height(uint64_t modifier);
|
||||
|
||||
unsigned
|
||||
panfrost_block_dim(uint64_t modifier, bool width, unsigned plane);
|
||||
|
||||
#ifdef PAN_ARCH
|
||||
unsigned
|
||||
GENX(panfrost_estimate_texture_payload_size)(const struct pan_image_view *iview);
|
||||
|
||||
Reference in New Issue
Block a user