The planar_format image property was always set even for
non-planar formats. This was breaking CCS support as
intel_from_planar is now making sure we can't have both
a modifier and an planar format.

Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com>
Reviewed-by: Daniel Stone <dani...@collabora.com>
---
 src/mesa/drivers/dri/i965/intel_screen.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
b/src/mesa/drivers/dri/i965/intel_screen.c
index 10064c3236..b87ccab0a8 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -913,7 +913,8 @@ intel_create_image_from_names(__DRIscreen *dri_screen,
    if (image == NULL)
       return NULL;
 
-    image->planar_format = f;
+    if (f->nplanes > 1)
+        image->planar_format = f;
     for (i = 0; i < f->nplanes; i++) {
         index = f->planes[i].buffer_index;
         image->offsets[index] = offsets[index];
@@ -961,7 +962,8 @@ intel_create_image_from_fds_common(__DRIscreen *dri_screen,
    image->height = height;
    image->pitch = strides[0];
 
-   image->planar_format = f;
+   if (f->nplanes > 1)
+      image->planar_format = f;
 
    image->bo = brw_bo_gem_create_from_prime(screen->bufmgr, fds[0]);
    if (image->bo == NULL) {
-- 
2.13.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to