From 7950315583244f03a58ac00d7b0516860475914c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 23 Aug 2013 10:35:34 -0700 Subject: [PATCH] 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 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 Reviewed-by: Ian Romanick Reviewed-by: Chad Versace Cc: mesa-stable@lists.freedesktop.org --- src/mesa/main/queryobj.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.30.2