i965: Release aux buffer when disabling ccs
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Sun, 4 Dec 2016 12:17:05 +0000 (14:17 +0200)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 5 Dec 2016 07:20:05 +0000 (09:20 +0200)
Otherwise subsequent render cycles keep on using compression
and/or fast clear.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index a9b350e25e84747ebb67adb4aa5753cbec7c7ba3..7cda0190b4a7e2eb7f72ad4ea055ddd7b1c75f06 100644 (file)
@@ -2326,6 +2326,9 @@ intel_miptree_make_shareable(struct brw_context *brw,
    if (mt->mcs_buf) {
       intel_miptree_all_slices_resolve_color(brw, mt, 0);
       mt->no_ccs = true;
+      drm_intel_bo_unreference(mt->mcs_buf->bo);
+      free(mt->mcs_buf);
+      mt->mcs_buf = NULL;
    }
 }