[Mesa-dev] [PATCH 02/16] i965: Check if nplanes == 1 in intel_from_planar()

Jason Ekstrand jason at jlekstrand.net
Fri Feb 9 23:43:18 UTC 2018


From: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>

This was breaking CCS support as because we would take the planar path
whenever planar_format is set which is always.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/mesa/drivers/dri/i965/intel_screen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 61d3331..92d9e28 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1318,7 +1318,8 @@ intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate)
 
     if (parent == NULL) {
        return NULL;
-    } else if (parent->planar_format == NULL) {
+    } else if (parent->planar_format == NULL ||
+               parent->planar_format->nplanes == 1) {
        const bool is_aux =
           isl_drm_modifier_has_aux(parent->modifier) && plane == 1;
        if (!is_aux)
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list