[Mesa-dev] [PATCH 2/2] mesa/objectlabel: don't return info on genned but never bound textures.

Dave Airlie airlied at gmail.com
Mon May 9 06:22:22 UTC 2016


From: Dave Airlie <airlied at redhat.com>

This fixes some cases in the CTS KHR debug tests where it uses
glIsTexture to find an invalid ID and then call GetObjectLabel.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/main/objectlabel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c
index e4f42d0..025480b 100644
--- a/src/mesa/main/objectlabel.c
+++ b/src/mesa/main/objectlabel.c
@@ -194,7 +194,8 @@ get_label_pointer(struct gl_context *ctx, GLenum identifier, GLuint name,
       {
          struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, name);
          if (texObj)
-            labelPtr = &texObj->Label;
+            if (texObj->Target)
+               labelPtr = &texObj->Label;
       }
       break;
    case GL_RENDERBUFFER:
-- 
2.5.5



More information about the mesa-dev mailing list