summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2011-01-06 11:36:23 +0800
committerZou Nan hai <nanhai.zou@intel.com>2011-01-06 11:42:38 +0800
commitbbf7cc1f2a13c89e5923e2155a8f9e0326714019 (patch)
tree945fb9b0b821330d486bed9cd79d1c8c261873e1
parent4e8f123f14e4a5bbd47c8cf7ec0c02d4ee6efd2d (diff)
i965: skip too small size mipmap
this fixes doom3 crash.
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_validate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index ed5c5d896b9..df4802d2047 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -218,8 +218,10 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
for (i = intelObj->firstLevel; i <= intelObj->lastLevel; i++) {
struct intel_texture_image *intelImage =
intel_texture_image(intelObj->base.Image[face][i]);
-
- /* Need to import images in main memory or held in other trees.
+ /* skip too small size mipmap */
+ if (intelImage == NULL)
+ break;
+ /* Need to import images in main memory or held in other trees.
* If it's a render target, then its data isn't needed to be in
* the object tree (otherwise we'd be FBO incomplete), and we need
* to keep track of the image's MT as needing to be pulled in still,