Module: Mesa Branch: main Commit: f545a2b9480ec849f0714973360ca0829441449a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f545a2b9480ec849f0714973360ca0829441449a
Author: Asahi Lina <[email protected]> Date: Wed May 10 17:30:33 2023 +0900 asahi: Use ail_can_compress() in agx_compression_allowed() This moves the compression size threshold logic into ail, where it belongs. Signed-off-by: Asahi Lina <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22971> --- src/gallium/drivers/asahi/agx_pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index f4755da7148..25ae1bb7c1c 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -424,8 +424,8 @@ agx_compression_allowed(const struct agx_resource *pres) assert(!util_format_is_compressed(pres->base.format) && "block-compressed formats are not renderable"); - /* Small textures cannot (should not?) be compressed */ - if (pres->base.width0 < 16 || pres->base.height0 < 16) { + if (!ail_can_compress(pres->base.width0, pres->base.height0, + MAX2(pres->base.nr_samples, 1))) { rsrc_debug(pres, "No compression: too small\n"); return false; }
