diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-16 13:07:12 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-16 13:07:15 -0600 |
commit | 08d39251a79a964e4a3ac0d7d8a397c2b66a0808 (patch) | |
tree | f0cf07718046db0098b8ef3e29e7640d1998553d /src | |
parent | cfa1a0a609daefffc6f8c4087ed0bc34c2665ef4 (diff) | |
download | external_mesa3d-08d39251a79a964e4a3ac0d7d8a397c2b66a0808.zip external_mesa3d-08d39251a79a964e4a3ac0d7d8a397c2b66a0808.tar.gz external_mesa3d-08d39251a79a964e4a3ac0d7d8a397c2b66a0808.tar.bz2 |
st/mesa: fix some incorrect branching/clean-up code in TexImage functions
We need to be sure to call the _mesa_unmap_teximage_pbo() function if we
called _mesa_validate_pbo_teximage().
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 31196fe..cfa33d4 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -764,9 +764,9 @@ st_TexImage(GLcontext * ctx, } } +done: _mesa_unmap_teximage_pbo(ctx, unpack); -done: if (stImage->pt && texImage->Data) { st_texture_image_unmap(ctx->st, stImage); texImage->Data = NULL; @@ -1107,7 +1107,7 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level, if (!texImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage"); - return; + goto done; } src = (const GLubyte *) pixels; @@ -1138,9 +1138,9 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level, } } +done: _mesa_unmap_teximage_pbo(ctx, packing); -done: if (stImage->pt) { st_texture_image_unmap(ctx->st, stImage); texImage->Data = NULL; |