summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-06-21 09:56:55 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-06-22 10:41:19 +0200
commit51a7e0d14f1d1e61f407685d43e248d68340fbb4 (patch)
treec590b7860e4e658ddbdc5ec0c1f1ea778acb5bca
parent1f38363e687b154a43819034a95e5a6c4ff65707 (diff)
mesa: fix using texture id 0 with glTextureStorage*()
This fixes an assertion in debug build, and probably a crash in release build. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r--src/mesa/main/texstorage.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 070d62eb834..958c7b7a679 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -539,13 +539,9 @@ texturestorage(GLuint dims, GLuint texture, GLsizei levels,
return;
}
- /* Get the texture object by Name. */
- texObj = _mesa_lookup_texture(ctx, texture);
- if (!texObj) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(texture = %d)", caller, texture);
+ texObj = _mesa_lookup_texture_err(ctx, texture, caller);
+ if (!texObj)
return;
- }
/* Check target. This is done here so that _mesa_texture_storage
* can receive unsized formats.