diff options
author | Zou Nan hai <[email protected]> | 2011-01-06 11:36:23 +0800 |
---|---|---|
committer | Zou Nan hai <[email protected]> | 2011-01-06 11:36:23 +0800 |
commit | a728646fb55245477d35e2761c3e0d15099b4cd4 (patch) | |
tree | f6bd89d671f19d97aeb3606943166c5474b7ff60 /src | |
parent | d60145d06d999c5c76000499e6fa9351e11d17fa (diff) |
i965: skip too small size mipmap
this fixes doom3 crash.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_validate.c | 6 |
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 f1c6239d3d4..31c0a83ae34 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c @@ -156,8 +156,10 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) for (i = tObj->BaseLevel; i <= intelObj->_MaxLevel; 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, |