freedreno: Blit all array levels when uncompressing UBWC.
authorEric Anholt <eric@anholt.net>
Thu, 12 Dec 2019 22:20:49 +0000 (14:20 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 4 Feb 2020 23:18:00 +0000 (23:18 +0000)
Fixes regressions in GLES CTS's format_reintepret once we enable UBWC
with mipmaps.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059>

src/gallium/drivers/freedreno/freedreno_resource.c

index b92663c90a3e4f80b4a6a61857833c7c2049556c..748664384eb98c84f644bc4a5455490cff3e54e7 100644 (file)
@@ -265,7 +265,10 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
                set_box(box.height, u_minify(prsc->height0, l));
                set_box(box.depth,  u_minify(prsc->depth0, l));
 
-               do_blit(ctx, &blit, fallback);
+               for (int i = 0; i < prsc->array_size; i++) {
+                       set_box(box.z, i);
+                       do_blit(ctx, &blit, fallback);
+               }
        }
 
        /* deal w/ current level specially, since we might need to split