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 <yuanhan.liu@linux.intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user