Mesa (master): mesa: fix using texture id 0 with glTextureSubImage*()
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Thu Jun 22 08:46:19 UTC 2017
Module: Mesa
Branch: master
Commit: a285caaf25e5d69bebd484fdf8019afe116cedde
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a285caaf25e5d69bebd484fdf8019afe116cedde
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Wed Jun 21 10:11:49 2017 +0200
mesa: fix using texture id 0 with glTextureSubImage*()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
src/mesa/main/teximage.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 346d505fca..69ad88237a 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3336,12 +3336,9 @@ texturesubimage(struct gl_context *ctx, GLuint dims,
_mesa_enum_to_string(type), pixels);
/* Get the texture object by Name. */
- texObj = _mesa_lookup_texture(ctx, texture);
- if (!texObj) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureSubImage%uD(texture)",
- dims);
+ texObj = _mesa_lookup_texture_err(ctx, texture, callerName);
+ if (!texObj)
return;
- }
/* check target (proxies not allowed) */
if (!legal_texsubimage_target(ctx, dims, texObj->Target, true)) {
More information about the mesa-commit
mailing list