summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2013-12-12 14:34:27 -0800
committerCarl Worth <cworth@cworth.org>2014-01-02 15:57:40 -0800
commitf6ea5b7bd764b5dfb6513445dd26a76b07ea48e6 (patch)
tree6e85446924cc83e52aa3b98230d9ca39bac6cc43 /src/mesa
parentdb0dc5c008f3f4a475de1c6471f99f45f7c5b7d6 (diff)
mesa: Fix error code generation in glBeginConditionalRender()
This patch changes the error condition to satisfy below statement from OpenGL 4.3 core specification: "An INVALID_OPERATION error is generated if id is the name of a query object with a target other SAMPLES_PASSED, ANY_SAMPLES_PASSED, or ANY_SAMPLES_PASSED_CONSERVATIVE, or if id is the name of a query currently in progress." Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 7a73c6acb0a4f5f049795f73a54a08a6dbe166ed)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/condrender.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 3d9b0eca1ab..2632f7a1a37 100644
--- a/src/mesa/main/condrender.c
+++ b/src/mesa/main/condrender.c
@@ -72,7 +72,9 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
}
ASSERT(q->Id == queryId);
- if (q->Target != GL_SAMPLES_PASSED || q->Active) {
+ if ((q->Target != GL_SAMPLES_PASSED &&
+ q->Target != GL_ANY_SAMPLES_PASSED &&
+ q->Target != GL_ANY_SAMPLES_PASSED_CONSERVATIVE) || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()");
return;
}