No subject
Thu Sep 8 22:13:13 PDT 2011
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-zero.
---
src/mesa/main/condrender.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 352e2e2..c8195a5 100644
--- a/src/mesa/main/condrender.c
+++ b/src/mesa/main/condrender.c
@@ -44,7 +44,8 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
struct gl_query_object *q;
GET_CURRENT_CONTEXT(ctx);
- if (!ctx->Extensions.NV_conditional_render || ctx->Query.CondRenderQuery) {
+ if (!ctx->Extensions.NV_conditional_render || ctx->Query.CondRenderQuery ||
+ queryId == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()");
return;
}
--
1.7.5.4
More information about the mesa-dev
mailing list