[Mesa-dev] [PATCH 1/8] i965/dri: Disallow image with INVALID modifier
Ben Widawsky
ben at bwidawsk.net
Tue Mar 21 20:42:45 UTC 2017
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
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 af9c9a45f3..b77933e100 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.12.0
More information about the mesa-dev
mailing list