main/queryobj: add GL_QUERY_TARGET support to GetQueryObjectiv()
authorMartin Peres <martin.peres@linux.intel.com>
Mon, 4 May 2015 13:59:54 +0000 (16:59 +0300)
committerMartin Peres <martin.peres@linux.intel.com>
Wed, 6 May 2015 12:26:12 +0000 (15:26 +0300)
This was missing from my patchset to support the query-related entry
points of Direct State Access.

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
src/mesa/main/queryobj.c

index fbccf3fe6f415ee65d2509af67e0999ad71a2647..5ff1b95323194a0ec73fe78dd686ce4d03fe7b61 100644 (file)
@@ -776,6 +776,9 @@ _mesa_GetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
             ctx->Driver.CheckQuery( ctx, q );
          *params = q->Ready;
          break;
+      case GL_QUERY_TARGET:
+         *params = q->Target;
+         break;
       default:
          _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryObjectivARB(pname)");
          return;
@@ -827,6 +830,9 @@ _mesa_GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
             ctx->Driver.CheckQuery( ctx, q );
          *params = q->Ready;
          break;
+      case GL_QUERY_TARGET:
+         *params = q->Target;
+         break;
       default:
          _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryObjectuivARB(pname)");
          return;
@@ -867,6 +873,9 @@ _mesa_GetQueryObjecti64v(GLuint id, GLenum pname, GLint64EXT *params)
             ctx->Driver.CheckQuery( ctx, q );
          *params = q->Ready;
          break;
+      case GL_QUERY_TARGET:
+         *params = q->Target;
+         break;
       default:
          _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryObjecti64vARB(pname)");
          return;
@@ -907,6 +916,9 @@ _mesa_GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params)
             ctx->Driver.CheckQuery( ctx, q );
          *params = q->Ready;
          break;
+      case GL_QUERY_TARGET:
+         *params = q->Target;
+         break;
       default:
          _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryObjectui64vARB(pname)");
          return;