From: Eric Anholt Date: Fri, 9 Sep 2011 00:17:31 +0000 (-0700) Subject: mesa: Throw an error when starting conditional render on an active query. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd17de21231fb41804299d16f837c07798984411;p=mesa.git 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 --- 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; }