From: Kenneth Graunke Date: Fri, 23 Aug 2013 17:35:34 +0000 (-0700) Subject: mesa: Set query->EverBound in glQueryCounter(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7950315583244f03a58ac00d7b0516860475914c;p=mesa.git 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 --- 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);