summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-08 17:17:31 -0700
committerEric Anholt <[email protected]>2011-09-19 11:51:53 -0700
commitfd17de21231fb41804299d16f837c07798984411 (patch)
tree391bce9dd2b9652d0ad7183ac087ecbf1b9a3d92 /src
parent7371224c069357319b3f2ee9e9b017fc284897cb (diff)
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 <target> to <id>. If BeginQuery is called with an <id> of zero, if the active query object name for <target> is non-zero, if <id> is the active query object name for any query type, or if <id> 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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/condrender.c2
1 files changed, 1 insertions, 1 deletions
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;
}