From 962b31da958ce41aecd7ba3a05c92f9b4eec61f0 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Tue, 21 Mar 2017 11:59:33 -0700 Subject: [PATCH] i965/dri: Disallow image with INVALID modifier Signed-off-by: Ben Widawsky Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/i965/intel_screen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index af9c9a45f3c..b77933e100e 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -541,6 +541,9 @@ intel_create_image_common(__DRIscreen *dri_screen, uint64_t modifier = select_best_modifier(&screen->devinfo, modifiers, count); assert(modifier == DRM_FORMAT_MOD_INVALID); + if (modifier == DRM_FORMAT_MOD_INVALID && modifiers) + return NULL; + /* Historically, X-tiled was the default, and so lack of modifier means * X-tiled. */ -- 2.30.2