Mesa (master): mesa: fix using texture id 0 with glTextureStorage*()
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Thu Jun 22 08:46:19 UTC 2017
Module: Mesa
Branch: master
Commit: 51a7e0d14f1d1e61f407685d43e248d68340fbb4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=51a7e0d14f1d1e61f407685d43e248d68340fbb4
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Wed Jun 21 09:56:55 2017 +0200
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 at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
src/mesa/main/texstorage.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 070d62eb83..958c7b7a67 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.
More information about the mesa-commit
mailing list