From fd17de21231fb41804299d16f837c07798984411 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 8 Sep 2011 17:17:31 -0700 Subject: [PATCH] mesa: Throw an error when starting conditional render on an active query. From the NV_conditional_render spec: BeginQuery sets the active query object name for the query type given by to . If BeginQuery is called with an of zero, if the active query object name for is non-zero, if is the active query object name for any query type, or if is the active query object for condtional rendering (Section 2.X), the error INVALID OPERATION is generated. Fixes piglit nv_conditional_render-begin-while-active. Reviewed-by: Brian Paul --- src/mesa/main/condrender.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c index c8195a520cf..57f3715211d 100644 --- a/src/mesa/main/condrender.c +++ b/src/mesa/main/condrender.c @@ -73,7 +73,7 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode) } ASSERT(q->Id == queryId); - if (q->Target != GL_SAMPLES_PASSED) { + if (q->Target != GL_SAMPLES_PASSED || q->Active) { _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()"); return; } -- 2.11.0