panfrost: Don't pass a panfrost_device to panfrost_afbc_can_tile()
Pass the arch directly. While at it, make the helper a static inline function defined in pan_texture.h. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
This commit is contained in:

committed by
Marge Bot

parent
a758e95077
commit
fbcc85108b
@@ -380,7 +380,7 @@ static bool
|
||||
panfrost_should_tile_afbc(const struct panfrost_device *dev,
|
||||
const struct panfrost_resource *pres)
|
||||
{
|
||||
return panfrost_afbc_can_tile(dev) && pres->base.width0 >= 128 &&
|
||||
return panfrost_afbc_can_tile(dev->arch) && pres->base.width0 >= 128 &&
|
||||
pres->base.height0 >= 128 && !(dev->debug & PAN_DBG_FORCE_PACK);
|
||||
}
|
||||
|
||||
|
@@ -619,7 +619,7 @@ panfrost_walk_dmabuf_modifiers(struct pipe_screen *screen,
|
||||
bool afbc =
|
||||
dev->has_afbc && panfrost_format_supports_afbc(dev->arch, format);
|
||||
bool ytr = panfrost_afbc_can_ytr(format);
|
||||
bool tiled_afbc = panfrost_afbc_can_tile(dev);
|
||||
bool tiled_afbc = panfrost_afbc_can_tile(dev->arch);
|
||||
|
||||
unsigned count = 0;
|
||||
|
||||
|
@@ -191,13 +191,3 @@ panfrost_afbc_can_pack(enum pipe_format format)
|
||||
|
||||
return desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the device supports AFBC with tiled headers (and hence also solid
|
||||
* colour blocks).
|
||||
*/
|
||||
bool
|
||||
panfrost_afbc_can_tile(const struct panfrost_device *dev)
|
||||
{
|
||||
return (dev->arch >= 7);
|
||||
}
|
||||
|
@@ -240,7 +240,14 @@ bool panfrost_afbc_can_ytr(enum pipe_format format);
|
||||
|
||||
bool panfrost_afbc_can_pack(enum pipe_format format);
|
||||
|
||||
bool panfrost_afbc_can_tile(const struct panfrost_device *dev);
|
||||
/*
|
||||
* Check if a gen supports AFBC with tiled headers (and hence also solid
|
||||
* colour blocks).
|
||||
*/
|
||||
static inline bool panfrost_afbc_can_tile(unsigned arch)
|
||||
{
|
||||
return arch >= 7;
|
||||
}
|
||||
|
||||
/*
|
||||
* Represents the block size of a single plane. For AFBC, this represents the
|
||||
|
Reference in New Issue
Block a user