summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-06-21 10:11:49 +0200
committerSamuel Pitoiset <[email protected]>2017-06-22 10:41:36 +0200
commita285caaf25e5d69bebd484fdf8019afe116cedde (patch)
treeb0d20cb18ceac902c26fb6cffdddb230a11fe9a4 /src/mesa/main
parent45eb87e5e51a2f52c385d3874f3c9578cd7e3c67 (diff)
mesa: fix using texture id 0 with glTextureSubImage*()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/teximage.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 346d505fcaa..69ad88237a0 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)) {