summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-03-17 16:50:20 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2008-03-17 16:50:20 +0800
commit7ed1fd5d8438e55fe24091844cdfccb0881306bc (patch)
treec1b801caa42d6e27777eaa9bc7dc2685f515ff86 /src/mesa/drivers/dri
parent0819b25dfba326c3d32b3b0af5d77e53d1973890 (diff)
intel: Remove an assertion from intel_miptree_create. TexImage
call with zero width/height/depth matches GL spec.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 163183487a..f42475e7d8 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -110,10 +110,12 @@ intel_miptree_create(struct intel_context *intel,
mt = intel_miptree_create_internal(intel, target, internal_format,
first_level, last_level, width0,
height0, depth0, cpp, compress_byte);
- if (!mt)
+ /*
+ * pitch == 0 indicates the null texture
+ */
+ if (!mt || mt->pitch)
return NULL;
- assert (mt->pitch);
mt->region = intel_region_alloc(intel,
mt->cpp, mt->pitch, mt->total_height);