diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-16 11:59:24 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-09-16 13:38:10 -0600 |
commit | 37607aeaf8b0fd35213635ba1c3743b6e059d48f (patch) | |
tree | e78ec8678cd02c24a82214dc3ee3e3633d29c0c2 /src/mesa | |
parent | 39cb5b9f73318a069e2d8553243ae17955a85695 (diff) |
gallium: fix glTexImage(width=height=depth=0) case
Free old teximage/level data, then stop.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index a3e8fc992d..2ba3766939 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -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. |