etnaviv: reduce rs alignment requirement for two pixel pipes GPU
[mesa.git] / src / gallium / drivers / etnaviv / etnaviv_transfer.c
index d875803bde26e90fd07abc68c6fb375253c1f6f0..78face1ee90bddec7e9be2f08d5db55fec50aad8 100644 (file)
@@ -265,21 +265,19 @@ etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc,
          unsigned w_align, h_align;
 
          if (rsc->layout & ETNA_LAYOUT_BIT_SUPER) {
-            w_align = h_align = 64;
+            w_align = 64;
+            h_align = 64 * ctx->screen->specs.pixel_pipes;
          } else {
             w_align = ETNA_RS_WIDTH_MASK + 1;
             h_align = ETNA_RS_HEIGHT_MASK + 1;
          }
-         h_align *= ctx->screen->specs.pixel_pipes;
 
          ptrans->box.width += ptrans->box.x & (w_align - 1);
          ptrans->box.x = ptrans->box.x & ~(w_align - 1);
          ptrans->box.width = align(ptrans->box.width, (ETNA_RS_WIDTH_MASK + 1));
          ptrans->box.height += ptrans->box.y & (h_align - 1);
          ptrans->box.y = ptrans->box.y & ~(h_align - 1);
-         ptrans->box.height = align(ptrans->box.height,
-                                    (ETNA_RS_HEIGHT_MASK + 1) *
-                                     ctx->screen->specs.pixel_pipes);
+         ptrans->box.height = align(ptrans->box.height, ETNA_RS_HEIGHT_MASK + 1);
       }
 
       if (!(usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE))