From: Jason Ekstrand Date: Thu, 25 May 2017 05:06:29 +0000 (-0700) Subject: i965/miptree: Move color resolve on map to intel_miptree_map X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4afe282a3596ba0d86249ab6a9e0eb64ef7995f5;p=mesa.git i965/miptree: Move color resolve on map to intel_miptree_map None of the other methods such as blit work with CCS either so we need to do the resolve for all maps. This change also makes us only resolve the one slice we're mapping and not the entire image. Reviewed-by: Topi Pohjolainen --- diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 27d4bc058f7..2532cbd0342 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -2400,11 +2400,6 @@ intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt, GLbitfield mode) { - /* CPU accesses to color buffers don't understand fast color clears, so - * resolve any pending fast color clears before we map. - */ - intel_miptree_all_slices_resolve_color(brw, mt, 0); - struct brw_bo *bo = mt->bo; if (brw_batch_references(&brw->batch, bo)) @@ -3007,6 +3002,7 @@ intel_miptree_map(struct brw_context *brw, return; } + intel_miptree_resolve_color(brw, mt, level, 1, slice, 1, 0); intel_miptree_slice_resolve_depth(brw, mt, level, slice); if (map->mode & GL_MAP_WRITE_BIT) { intel_miptree_slice_set_needs_hiz_resolve(mt, level, slice);