i965/miptree: Move color resolve on map to intel_miptree_map
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 May 2017 05:06:29 +0000 (22:06 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 8 Jun 2017 05:18:53 +0000 (22:18 -0700)
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 <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 27d4bc0..2532cbd 100644 (file)
@@ -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);