i965: Set initial msaa fast clear status explicitly
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 8 Jul 2016 07:26:30 +0000 (10:26 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Wed, 23 Nov 2016 09:06:53 +0000 (11:06 +0200)
instead of in intel_miptree_init_mcs(). For lossless compression
the status is immediately overwritten in
intel_miptree_alloc_non_msrt_mcs() while the status for
non-compressed non-msaa miptrees is explicitly set in
do_blorp_clear().

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index e7f71c09730caf39a1f2a4b13eb0b446bda2f87d..f61b9bad124d49817190cda6f1c1bed0adb7dfcb 100644 (file)
@@ -1508,7 +1508,6 @@ intel_miptree_init_mcs(struct brw_context *brw,
    void *data = mt->mcs_buf->bo->virtual;
    memset(data, init_value, mt->mcs_buf->size);
    drm_intel_bo_unmap(mt->mcs_buf->bo);
-   mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_CLEAR;
 }
 
 static struct intel_miptree_aux_buffer *
@@ -1610,6 +1609,7 @@ intel_miptree_alloc_mcs(struct brw_context *brw,
       return false;
 
    intel_miptree_init_mcs(brw, mt, 0xFF);
+   mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_CLEAR;
 
    return true;
 }