diff options
author | marha <marha@users.sourceforge.net> | 2014-07-01 09:29:23 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-07-01 09:29:23 +0200 |
commit | b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad (patch) | |
tree | 2cf97060ce44345489da6d1bcbbe568d2b2ea666 /mesalib/src/mesa/main/queryobj.c | |
parent | ac314766fd4f60b8ee0346b7586c1a5a6f533e11 (diff) | |
parent | cfc5bafcb2db8c6e05d7be6bb7315960be08c0d8 (diff) | |
download | vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.tar.gz vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.tar.bz2 vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig mesa pixman git update 1 July 2014
Diffstat (limited to 'mesalib/src/mesa/main/queryobj.c')
-rw-r--r-- | mesalib/src/mesa/main/queryobj.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c index b411eae50..a9d067bbf 100644 --- a/mesalib/src/mesa/main/queryobj.c +++ b/mesalib/src/mesa/main/queryobj.c @@ -144,11 +144,12 @@ _mesa_init_query_object_functions(struct dd_function_table *driver) /** - * Return pointer to the query object binding point for the given target. + * Return pointer to the query object binding point for the given target and + * index. * \return NULL if invalid target, else the address of binding point */ static struct gl_query_object ** -get_query_binding_point(struct gl_context *ctx, GLenum target) +get_query_binding_point(struct gl_context *ctx, GLenum target, GLuint index) { switch (target) { case GL_SAMPLES_PASSED_ARB: @@ -174,12 +175,12 @@ get_query_binding_point(struct gl_context *ctx, GLenum target) return NULL; case GL_PRIMITIVES_GENERATED: if (ctx->Extensions.EXT_transform_feedback) - return &ctx->Query.PrimitivesGenerated; + return &ctx->Query.PrimitivesGenerated[index]; else return NULL; case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: if (ctx->Extensions.EXT_transform_feedback) - return &ctx->Query.PrimitivesWritten; + return &ctx->Query.PrimitivesWritten[index]; else return NULL; default: @@ -240,7 +241,7 @@ _mesa_DeleteQueries(GLsizei n, const GLuint *ids) if (q) { if (q->Active) { struct gl_query_object **bindpt; - bindpt = get_query_binding_point(ctx, q->Target); + bindpt = get_query_binding_point(ctx, q->Target, q->Stream); assert(bindpt); /* Should be non-null for active q. */ if (bindpt) { *bindpt = NULL; @@ -313,7 +314,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id) FLUSH_VERTICES(ctx, 0); - bindpt = get_query_binding_point(ctx, target); + bindpt = get_query_binding_point(ctx, target, index); if (!bindpt) { _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQuery{Indexed}(target)"); return; @@ -367,6 +368,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id) q->Result = 0; q->Ready = GL_FALSE; q->EverBound = GL_TRUE; + q->Stream = index; /* XXX should probably refcount query objects */ *bindpt = q; @@ -390,7 +392,7 @@ _mesa_EndQueryIndexed(GLenum target, GLuint index) FLUSH_VERTICES(ctx, 0); - bindpt = get_query_binding_point(ctx, target); + bindpt = get_query_binding_point(ctx, target, index); if (!bindpt) { _mesa_error(ctx, GL_INVALID_ENUM, "glEndQuery{Indexed}(target)"); return; @@ -517,7 +519,7 @@ _mesa_GetQueryIndexediv(GLenum target, GLuint index, GLenum pname, } } else { - bindpt = get_query_binding_point(ctx, target); + bindpt = get_query_binding_point(ctx, target, index); if (!bindpt) { _mesa_error(ctx, GL_INVALID_ENUM, "glGetQuery{Indexed}iv(target)"); return; |