panfrost: Add helper checking tiled AFBC support
Tiled AFBC support was introduced with v7. Add a helper encoding this fact. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16697>
This commit is contained in:
parent
5fa274fee4
commit
3fbfd356af
|
@ -146,3 +146,13 @@ panfrost_afbc_can_ytr(enum pipe_format format)
|
|||
/* The fourth channel if it exists doesn't matter */
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -171,6 +171,9 @@ panfrost_afbc_format(const struct panfrost_device *dev, enum pipe_format format)
|
|||
bool
|
||||
panfrost_afbc_can_ytr(enum pipe_format format);
|
||||
|
||||
bool
|
||||
panfrost_afbc_can_tile(const struct panfrost_device *dev);
|
||||
|
||||
/*
|
||||
* Represents the block size of a single plane. For AFBC, this represents the
|
||||
* superblock size. For u-interleaving, this represents the tile size.
|
||||
|
|
Loading…
Reference in New Issue