Mesa (master): mesa: fix using texture id 0 with gl*TextureParameter*()

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Thu Jun 22 08:46:19 UTC 2017


Module: Mesa
Branch: master
Commit: 45eb87e5e51a2f52c385d3874f3c9578cd7e3c67
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=45eb87e5e51a2f52c385d3874f3c9578cd7e3c67

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Jun 21 10:04:49 2017 +0200

mesa: fix using texture id 0 with gl*TextureParameter*()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/mesa/main/texparam.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 6c0a5c46d6..3c110de839 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -157,11 +157,9 @@ get_texobj_by_name(struct gl_context *ctx, GLuint texture, const char *name)
 {
    struct gl_texture_object *texObj;
 
-   texObj = _mesa_lookup_texture(ctx, texture);
-   if (!texObj) {
-      _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture)", name);
+   texObj = _mesa_lookup_texture_err(ctx, texture, name);
+   if (!texObj)
       return NULL;
-   }
 
    switch (texObj->Target) {
    case GL_TEXTURE_1D:




More information about the mesa-commit mailing list