panfrost: Allow 3D AFBC on Bifrost v7

This feature doesn't seem to work properly on Midgard, and is flagged
as unsupported on Bifrost v6.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>
This commit is contained in:
Boris Brezillon 2020-12-18 14:40:31 +01:00
parent 4ffe73547d
commit 20f7a73a2c

View file

@ -532,12 +532,20 @@ panfrost_should_afbc(struct panfrost_device *dev, const struct panfrost_resource
if (pres->base.nr_samples > 1)
return false;
/* TODO: Is AFBC of 3D textures possible? */
switch (pres->base.target) {
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_2D_ARRAY:
case PIPE_TEXTURE_RECT:
break;
case PIPE_TEXTURE_3D:
/* 3D AFBC is only supported on Bifrost v7+. It's supposed to
* be supported on Midgard but it doesn't seem to work */
if (dev->arch < 7)
return false;
break;
default:
return false;
}