etnaviv: fix in-place resolve tile count
[mesa.git] / src / gallium / drivers / etnaviv / etnaviv_rs.c
index 3d9d6a0b357d7036df52d422d3cd499147a59938..bd40cebb5375cdfa50aefeae757b7eb896f97850 100644 (file)
@@ -143,12 +143,13 @@ etna_compile_rs_state(struct etna_context *ctx, struct compiled_rs_state *cs,
          rs->source_offset == rs->dest_offset &&
          rs->source_format == rs->dest_format &&
          rs->source_tiling == rs->dest_tiling &&
+         (rs->source_tiling & ETNA_LAYOUT_BIT_SUPER) &&
          rs->source_stride == rs->dest_stride &&
          !rs->downsample_x && !rs->downsample_y &&
          !rs->swap_rb && !rs->flip &&
          !rs->clear_mode && rs->source_padded_width) {
       /* Total number of tiles (same as for autodisable) */
-      cs->RS_KICKER_INPLACE = rs->source_padded_width * rs->source_padded_height / 16;
+      cs->RS_KICKER_INPLACE = rs->tile_count;
    }
    cs->source_ts_valid = rs->source_ts_valid;
 }
@@ -724,7 +725,8 @@ etna_try_rs_blit(struct pipe_context *pctx,
       .dither = {0xffffffff, 0xffffffff}, // XXX dither when going from 24 to 16 bit?
       .clear_mode = VIVS_RS_CLEAR_CONTROL_MODE_DISABLED,
       .width = width,
-      .height = height
+      .height = height,
+      .tile_count = src_lev->layer_stride / 64
    });
 
    etna_submit_rs_state(ctx, &copy_to_screen);