[Mesa-dev] [PATCH 1/3] i965/mipmap_tree: Don't allocate CCS when emulating ETC support

Nanley Chery nanleychery at gmail.com
Mon Mar 5 22:07:53 UTC 2018


---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index c6213b21629..8586968fd6f 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -205,11 +205,11 @@ intel_miptree_supports_ccs(struct brw_context *brw,
    if (devinfo->gen < 8 && (mip_mapped || arrayed))
       return false;
 
-   /* There's no point in using an MCS buffer if the surface isn't in a
-    * renderable format.
-    */
-   if (!brw->mesa_format_supports_render[mt->format])
+   /* There's no need for an MCS buffer if the surface isn't renderable. */
+   if (!brw->mesa_format_supports_render[mt->format] ||
+       (mt->etc_format != MESA_FORMAT_NONE)) {
       return false;
+   }
 
    return true;
 }
-- 
2.16.1



More information about the mesa-dev mailing list