[Mesa-dev] [PATCH] mesa: Set query->EverBound in glQueryCounter().

Kenneth Graunke kenneth at whitecape.org
Fri Aug 23 10:40:07 PDT 2013


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.

Fixes Piglit's spec/ARB_timer_query/query-lifetime.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: mesa-stable at 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 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);
-- 
1.8.3.4



More information about the mesa-dev mailing list