mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 21:10:24 +01:00
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 7a73c6acb0)
This commit is contained in:
parent
db0dc5c008
commit
f6ea5b7bd7
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue