Mesa (master): i965/miptree: Check for miptree_create() failures
Topi Pohjolainen
tpohjola at kemper.freedesktop.org
Tue Jul 18 19:27:32 UTC 2017
Module: Mesa
Branch: master
Commit: 2309363868aaf5821b748042e34b5c827e6cfb00
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2309363868aaf5821b748042e34b5c827e6cfb00
Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date: Tue Jun 20 17:36:46 2017 +0300
i965/miptree: Check for miptree_create() failures
Rest of the function assumes it always succeeds.
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index f48d834324..da454add98 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -889,6 +889,8 @@ intel_miptree_create(struct brw_context *brw,
first_level, last_level,
width0, height0, depth0, num_samples,
layout_flags);
+ if (!mt)
+ return NULL;
/* If the BO is too large to fit in the aperture, we need to use the
* BLT engine to support it. Prior to Sandybridge, the BLT paths can't
More information about the mesa-commit
mailing list