[Mesa-stable] [PATCH] mesa: Fix error code generation in glBeginConditionalRender()

Brian Paul brianp at vmware.com
Thu Dec 12 17:11:06 PST 2013


On 12/12/2013 04:18 PM, Anuj Phogat wrote:
> 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."
>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>   src/mesa/main/condrender.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
> index 3d9b0ec..2632f7a 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;
>      }
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-stable mailing list