On 04/02/2014 11:30 PM, Samuel Iglesias Gonsalvez wrote:
> According to the spec:

For future reference, it's really helpful to say which spec you're
quoting.  Otherwise it's not clear whether you mean the
ARB_framebuffer_object extension spec, or the GL 3.0, 3.1, 3.2 specs.
Occasionally, those specs contradict each other (especially about error
values like this).

In this case, both the ARB_framebuffer_object spec and the GL 4.4 core
spec agree on INVALID_OPERATION, so I believe your patch is correct.

Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>

And...pushed.  Thank you for the patch!

>       <renderbuffertarget> must be RENDERBUFFER and <renderbuffer>
>       should be set to the name of the renderbuffer object to be
>       attached to the framebuffer.  <renderbuffer> must be either
>       zero or the name of an existing renderbuffer object of type
>       <renderbuffertarget>, otherwise an INVALID_OPERATION error is
>       generated.
> 
> This patch changes the previous returned GL_INVALID_VALUE to
> GL_INVALID_OPERATION.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76894
> 
> Cc: mesa-sta...@lists.freedesktop.org
> Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com>
> Signed-off-by: Samuel Iglesias Gonsalvez <sigles...@igalia.com>
> ---
>  src/mesa/main/fbobject.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 6c4f1b5..7669a0c 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -2676,8 +2676,7 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum 
> attachment,
>        return;
>        }
>        else if (rb == &DummyRenderbuffer) {
> -         /* This is what NVIDIA does */
> -      _mesa_error(ctx, GL_INVALID_VALUE,
> +      _mesa_error(ctx, GL_INVALID_OPERATION,
>                    "glFramebufferRenderbufferEXT(renderbuffer %u)",
>                       renderbuffer);
>        return;
> 


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to