mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 20:00:11 +01:00
panfrost: Allow swizzled AFBC on v9+
On v6 and earlier, the hardware supports arbitrary format swizzles for AFBC, so there's no restriction on AFBC. On v8 and newer, the format swizzle gets applied to the *decompressed* interchange format, so we can effectively support BGRA of AFBC images without any special handling. (Confirmed working on v9. Obviously I can't test on v8 but the expression is cleaner if we assume optimistically it's like v9. Without hardware, we get to make that assumption :-p) That just leaves v7 as the only architecture where format swizzles are restricted for compression but there are no plane descriptor. Don't apply the restriction to the newer parts. This gets us AFBC of window surfaces on v9+. As the limiting case, fullscreen glmark2-es2-wayland -btexture (1080p) in sway on Mali-G57 from 1300fps to 2353fps. 45% reduction in frame time is nothing to sneeze at. Achoo. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20311>
This commit is contained in:
parent
cb5e417c01
commit
f159ff530e
1 changed files with 2 additions and 2 deletions
|
|
@ -139,8 +139,8 @@ panfrost_afbc_format(unsigned arch, enum pipe_format format)
|
|||
*/
|
||||
format = util_format_linear(format);
|
||||
|
||||
/* Don't allow swizzled formats on v7+ */
|
||||
if (arch >= 7 && format != unswizzled_format(format))
|
||||
/* Don't allow swizzled formats on v7 */
|
||||
if (arch == 7 && format != unswizzled_format(format))
|
||||
return PAN_AFBC_MODE_INVALID;
|
||||
|
||||
/* Otherwise swizzling doesn't affect AFBC */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue