[Mesa-dev] [PATCH 09/30] i965/miptree: Move color resolve on map to intel_miptree_map

Jason Ekstrand jason at jlekstrand.net
Fri May 26 23:30:13 UTC 2017


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.
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 093f157..2c9bb97 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2399,11 +2399,6 @@ intel_update_r8stencil(struct brw_context *brw,
 static void *
 intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)
 {
-   /* 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))
@@ -3023,6 +3018,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);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list