mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
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:
parent
cd6b8421ca
commit
1a662e7c18
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue