freedreno/a5xx+a6xx: fix LRZ pitch alignment
authorRob Clark <robdclark@gmail.com>
Thu, 4 Oct 2018 19:52:06 +0000 (15:52 -0400)
committerRob Clark <robdclark@gmail.com>
Mon, 8 Oct 2018 23:05:14 +0000 (19:05 -0400)
Both RB_2D_DST_SIZE.PITCH (a6xx) and RB_MRT[n].PITCH (a5xx) need
alignment to 64.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_resource.c

index 88d420bdf3eff2e5b6396481cfa17beb020f6ce1..8fbc78193038db356650a5bd12d8a68641c43cbe 100644 (file)
@@ -848,7 +848,7 @@ fd_resource_create(struct pipe_screen *pscreen,
                 (fd_mesa_debug & FD_DBG_LRZ) && has_depth(format)) {
                const uint32_t flags = DRM_FREEDRENO_GEM_CACHE_WCOMBINE |
                                DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */
-               unsigned lrz_pitch  = align(DIV_ROUND_UP(tmpl->width0, 8), 32);
+               unsigned lrz_pitch  = align(DIV_ROUND_UP(tmpl->width0, 8), 64);
                unsigned lrz_height = DIV_ROUND_UP(tmpl->height0, 8);
                unsigned size = lrz_pitch * lrz_height * 2;