panfrost: Handle AFBC Tiled
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
b63dad3ce5
commit
5fa274fee4
|
@ -42,9 +42,13 @@ mod_to_block_fmt(uint64_t mod)
|
|||
return MALI_BLOCK_FORMAT_TILED_U_INTERLEAVED;
|
||||
default:
|
||||
#if PAN_ARCH >= 5
|
||||
if (drm_is_afbc(mod))
|
||||
if (drm_is_afbc(mod) && !(mod & AFBC_FORMAT_MOD_TILED))
|
||||
return MALI_BLOCK_FORMAT_AFBC;
|
||||
#endif
|
||||
#if PAN_ARCH >= 7
|
||||
if (drm_is_afbc(mod) && (mod & AFBC_FORMAT_MOD_TILED))
|
||||
return MALI_BLOCK_FORMAT_AFBC_TILED;
|
||||
#endif
|
||||
|
||||
unreachable("Unsupported modifer");
|
||||
}
|
||||
|
|
|
@ -86,6 +86,10 @@ panfrost_compression_tag(const struct util_format_description *desc,
|
|||
#endif
|
||||
|
||||
#if PAN_ARCH >= 7
|
||||
/* Tiled headers */
|
||||
if (modifier & AFBC_FORMAT_MOD_TILED)
|
||||
flags |= MALI_AFBC_SURFACE_FLAG_TILED_HEADER;
|
||||
|
||||
/* Used to make sure AFBC headers don't point outside the AFBC
|
||||
* body. HW is using the AFBC surface stride to do this check,
|
||||
* which doesn't work for 3D textures because the surface
|
||||
|
|
Loading…
Reference in New Issue