From: Ben Widawsky Date: Tue, 21 Mar 2017 18:59:33 +0000 (-0700) Subject: i965/dri: Disallow image with INVALID modifier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=962b31da958ce41aecd7ba3a05c92f9b4eec61f0;p=mesa.git i965/dri: Disallow image with INVALID modifier Signed-off-by: Ben Widawsky Reviewed-by: Jason Ekstrand --- 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. */