summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2017-03-21 11:59:33 -0700
committerBen Widawsky <ben@bwidawsk.net>2017-03-21 14:48:03 -0700
commit962b31da958ce41aecd7ba3a05c92f9b4eec61f0 (patch)
tree355eb9127e31f7f4f34eabe2fddda32906429c08 /src
parentb15038a28991c73b4bd26c30cf1f0aba20d42d53 (diff)
i965/dri: Disallow image with INVALID modifier
Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c3
1 files changed, 3 insertions, 0 deletions
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.
*/