panfrost: Ensure AFBC slices are aligned
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 22 Jul 2020 18:51:45 +0000 (14:51 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 12 Aug 2020 13:59:21 +0000 (09:59 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@keemail.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159>

src/gallium/drivers/panfrost/pan_resource.c

index 49ed6c0b4cf00fc297e7119600aba9ea078480da..a34656b5bdfa3a96516b4b043731ae068cd68b75 100644 (file)
@@ -309,7 +309,7 @@ panfrost_setup_slices(struct panfrost_resource *pres, size_t *bo_size)
         bool afbc = drm_is_afbc(pres->modifier);
         bool tiled = pres->modifier == DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED;
         bool linear = pres->modifier == DRM_FORMAT_MOD_LINEAR;
-        bool should_align = renderable || tiled;
+        bool should_align = renderable || tiled || afbc;
 
         /* We don't know how to specify a 2D stride for 3D textures */