panfrost: add pan_force_afbc_packing driconf

This is useful for forcing AFBC-P to be used in applications where it's
know to work well. This can significantly reduce memory consumption and
bandwidth, leading more applications working in the first place, and
also better performance.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27916>
This commit is contained in:
Erik Faye-Lund 2024-01-18 13:10:14 +01:00 committed by Marge Bot
parent 2bcdc4939c
commit d7def3ccdf
2 changed files with 6 additions and 0 deletions

View file

@ -1 +1,4 @@
/* panfrost specific driconf options */
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_OPT_B(pan_force_afbc_packing, false, "Use AFBC-P for textures")
DRI_CONF_SECTION_END

View file

@ -857,6 +857,9 @@ panfrost_create_screen(int fd, const struct pipe_screen_config *config,
}
screen->force_afbc_packing = dev->debug & PAN_DBG_FORCE_PACK;
if (!screen->force_afbc_packing)
screen->force_afbc_packing = driQueryOptionb(config->options,
"pan_force_afbc_packing");
dev->ro = ro;