panfrost: Add env variable for max AFBC packing ratio
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
Thu, 21 Sep 2023 15:19:23 +0000 (11:19 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 25 Oct 2023 14:25:31 +0000 (14:25 +0000)
commit5a928f7563af8ed18617210b95208ea63c157e2f
tree7aca63482adb3688b199c50f36097d240216f067
parent888d7c8ee6ad59aed2b86ba6f32542976b671dd0
panfrost: Add env variable for max AFBC packing ratio

Add `PAN_MAX_AFBC_PACKING_RATIO` variable. If the ratio (size of the
packed resource) / (size of the sparse resource) * 100 is above that
value, we don't care about packing it.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
src/gallium/drivers/panfrost/pan_resource.c
src/gallium/drivers/panfrost/pan_screen.c
src/gallium/drivers/panfrost/pan_screen.h