aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorYuanhan Liu <[email protected]>2011-09-23 13:34:26 +0800
committerYuanhan Liu <[email protected]>2011-09-23 13:34:26 +0800
commit1a662e7c18cab98f1b122f6766faf338725de673 (patch)
tree324909360c66ce8fabdc324fa0df3e0d6e14fc58 /src/mesa
parentcd6b8421cac2df89dc6365ce368232e461caffcd (diff)
intel: fix the wrong code to detect null texture.
There is already comments show how to detect a null texture. Fix the code to match the comments. This would fix the oglc divzero(basic.texQOrWEqualsZero) and divzero(basic.texTrivialPrim) test case fail. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index b77c5d708f1..18427b5c8ea 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -136,7 +136,7 @@ intel_miptree_create(struct intel_context *intel,
/*
* pitch == 0 || height == 0 indicates the null texture
*/
- if (!mt || !mt->total_height) {
+ if (!mt || !mt->total_width || !mt->total_height) {
free(mt);
return NULL;
}