From: Jason Ekstrand Date: Thu, 22 Jun 2017 04:33:41 +0000 (-0700) Subject: i965/miptree: Remove some unneeded restrictions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=efc4c6b702a113a8c6e884b4185fe0202801f1ce;p=mesa.git i965/miptree: Remove some unneeded restrictions intel_miptree_supports_ccs_e should handle the gen >= 9 requirement and there's no reason why we can't do CCS_E on window system buffers so long as we resolve. 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 f05730181e3..fb823504f0d 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -243,6 +243,9 @@ static bool intel_miptree_supports_ccs_e(struct brw_context *brw, const struct intel_mipmap_tree *mt) { + if (brw->gen < 9) + return false; + /* For now compression is only enabled for integer formats even though * there exist supported floating point formats also. This is a heuristic * decision based on current public benchmarks. In none of the cases these @@ -338,7 +341,6 @@ intel_miptree_choose_aux_usage(struct brw_context *brw, } else if (intel_tiling_supports_ccs(brw, mt->surf.tiling) && intel_miptree_supports_ccs(brw, mt)) { if (!unlikely(INTEL_DEBUG & DEBUG_NO_RBC) && - brw->gen >= 9 && !mt->is_scanout && intel_miptree_supports_ccs_e(brw, mt)) { mt->aux_usage = ISL_AUX_USAGE_CCS_E; } else { @@ -722,10 +724,8 @@ miptree_create(struct brw_context *brw, mt->etc_format = etc_format; - if (layout_flags & MIPTREE_LAYOUT_FOR_SCANOUT) { + if (layout_flags & MIPTREE_LAYOUT_FOR_SCANOUT) mt->bo->cache_coherent = false; - mt->is_scanout = true; - } if (!(layout_flags & MIPTREE_LAYOUT_DISABLE_AUX)) intel_miptree_choose_aux_usage(brw, mt); diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index 756a1ee0bd3..4a5fed2091e 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -339,13 +339,6 @@ struct intel_mipmap_tree */ union isl_color_value fast_clear_color; - /** - * Tells if the underlying buffer is to be also consumed by entities other - * than the driver. This allows logic to turn off features such as lossless - * compression which is not currently understood by client applications. - */ - bool is_scanout; - /* These are also refcounted: */ GLuint refcount;