intel: Remove an assertion from intel_miptree_create. TexImage
authorXiang, Haihao <haihao.xiang@intel.com>
Mon, 17 Mar 2008 08:50:20 +0000 (16:50 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 17 Mar 2008 08:50:20 +0000 (16:50 +0800)
call with zero width/height/depth matches GL spec.

src/mesa/drivers/dri/intel/intel_mipmap_tree.c

index 163183487a84ec826e66cc8b6d489d439289d18b..f42475e7d86fdb5e40a92cdd6b82f531240db835 100644 (file)
@@ -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);