mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
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().
This commit is contained in:
parent
cfa1a0a609
commit
08d39251a7
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue