[Mesa-stable] [Mesa-dev] [PATCH] mesa: fix check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()

Kenneth Graunke kenneth at whitecape.org
Wed Apr 16 23:09:57 PDT 2014


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 <kenneth at 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-stable at lists.freedesktop.org
> Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at 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;
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20140416/7ac1cdba/attachment.sig>


More information about the mesa-stable mailing list