[Mesa-dev] [PATCH 2/2] intel/isl: Only create a CCS buffer if the surface format supports it

Nanley Chery nanleychery at gmail.com
Tue Apr 18 23:31:42 UTC 2017


Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
 src/intel/isl/isl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index f89f351c15..09dafcbab6 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1573,8 +1573,11 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,
    if (ISL_DEV_GEN(dev) <= 8 && surf->dim != ISL_SURF_DIM_2D)
       return false;
 
-   if (isl_format_is_compressed(surf->format))
+   if (!isl_format_supports_ccs_d(dev->info, surf->format)) {
+      /* CCS_E supported formats are a subset of CCS_D supported formats. */
+      assert(!isl_format_supports_ccs_e(dev->info, surf->format));
       return false;
+   }
 
    /* TODO: More conditions where it can fail. */
 
-- 
2.12.2



More information about the mesa-dev mailing list