Mesa (master): i965: Handle miptree creation failure in intel_alloc_texture_storage()
Ville Syrjala
vsyrjala at kemper.freedesktop.org
Thu Jun 26 12:47:13 UTC 2014
Module: Mesa
Branch: master
Commit: 78a89d6fa0c0fa35d7d14e50c2f4987ec411afd8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=78a89d6fa0c0fa35d7d14e50c2f4987ec411afd8
Author: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Date: Mon May 12 15:25:59 2014 +0300
i965: Handle miptree creation failure in intel_alloc_texture_storage()
Check intel_miptree_create() return value before using it as
a pointer.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/dri/i965/intel_tex.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c
index f18ca45..556b787 100644
--- a/src/mesa/drivers/dri/i965/intel_tex.c
+++ b/src/mesa/drivers/dri/i965/intel_tex.c
@@ -147,6 +147,9 @@ intel_alloc_texture_storage(struct gl_context *ctx,
num_samples,
INTEL_MIPTREE_TILING_ANY);
+ if (intel_texobj->mt == NULL) {
+ return false;
+ }
}
for (face = 0; face < numFaces; face++) {
More information about the mesa-commit
mailing list