Mesa (master): mesa: Set query->EverBound in glQueryCounter().
Kenneth Graunke
kwg at kemper.freedesktop.org
Mon Aug 26 03:38:02 UTC 2013
Module: Mesa
Branch: master
Commit: 7950315583244f03a58ac00d7b0516860475914c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7950315583244f03a58ac00d7b0516860475914c
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Aug 23 10:35:34 2013 -0700
mesa: Set query->EverBound in glQueryCounter().
glIsQuery is supposed to return false for names returned by glGenQueries
until their first use. BeginQuery is a use, but QueryCounter is also a
use.
>From the ARB_timer_query spec:
"A timer query object is created with the command
void QueryCounter(uint id, enum target);
[...] If <id> is an unused query object name, the
name is marked as used [...]"
Fixes Piglit's spec/ARB_timer_query/query-lifetime.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
Cc: mesa-stable at lists.freedesktop.org
---
src/mesa/main/queryobj.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index b74898c..60356b8 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -485,6 +485,7 @@ _mesa_QueryCounter(GLuint id, GLenum target)
q->Target = target;
q->Result = 0;
q->Ready = GL_FALSE;
+ q->EverBound = GL_TRUE;
if (ctx->Driver.QueryCounter) {
ctx->Driver.QueryCounter(ctx, q);
More information about the mesa-commit
mailing list