aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-08-23 10:35:34 -0700
committerKenneth Graunke <[email protected]>2013-08-25 20:29:59 -0700
commit7950315583244f03a58ac00d7b0516860475914c (patch)
tree96785007314174fd1d3ffc8ecf8b48cad1908693
parentb5ddaf9975f96c46ea3dfb02c4130de5196b238c (diff)
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]> Cc: [email protected]
-rw-r--r--src/mesa/main/queryobj.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index b74898ceedd..60356b85d35 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);