i965/dri: Disallow image with INVALID modifier

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Ben Widawsky 2017-03-21 11:59:33 -07:00
parent b15038a289
commit 962b31da95

View file

@ -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.
*/