mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
gallium: fix glTexImage(width=height=depth=0) case
Free old teximage/level data, then stop.
This commit is contained in:
parent
39cb5b9f73
commit
37607aeaf8
1 changed files with 5 additions and 0 deletions
|
|
@ -455,6 +455,11 @@ st_TexImage(GLcontext * ctx,
|
|||
_mesa_align_free(texImage->Data);
|
||||
}
|
||||
|
||||
if (width == 0 || height == 0 || depth == 0) {
|
||||
/* stop after freeing old image */
|
||||
return;
|
||||
}
|
||||
|
||||
/* If this is the only mipmap level in the texture, could call
|
||||
* bmBufferData with NULL data to free the old block and avoid
|
||||
* waiting on any outstanding fences.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue