[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Color reads from FBs with no ColorAttachment0



That's the behavior I would most expect. (Probably why Firefox has this behavior! :P)

Here's a link to the testcase I threw together:
https://bug972164.bugzilla.mozilla.org/attachment.cgi?id=8375289

-Jeff

----- Original Message -----
From: "Zhenyao Mo" <zmo@chromium.org>
To: "Jeff Gilbert" <jgilbert@mozilla.com>
Sent: Wednesday, February 12, 2014 6:37:12 PM
Subject: Re: [Public WebGL] Color reads from FBs with no ColorAttachment0

OpenGL 4.3 $18.2

"An INVALID_OPERATION error is generated by ReadPixels if it attempts
to select a color buffer while READ_BUFFER is NONE, or if the GL is
using a framebuffer object (the value of READ_FRAMEBUFFER_BINDING is
non-zero)
and the read buffer selects an attachment that has no image attached."

In this spirit, I guess Firefox's behavior is desired.

On Wed, Feb 12, 2014 at 6:19 PM, Jeff Gilbert <jgilbert@mozilla.com> wrote:
>
> I can't find any language in GLES or GL about ReadPixels generating an error when there's no ColorAttachment0 (or ColorAttachmentI with ReadBuffer) to read from.
>
> Things that are mentioned:
> * INVALID_OP if ReadPixels `type` is float-y and the source is not, or vice versa.
> * INVALID_OP if ReadPixels `format` is DEPTH_COMPONENT, STENCIL_INDEX, or DEPTH_STENCIL and the source is missing any of the respective buffers.
> * INVALID_OP if the source is not FRAMEBUFFER_COMPLETE
>
> However, depth-only FBs can be FRAMEBUFFER_COMPLETE, which throws a wrench in things.
>
> The options:
> * zero-fills
> * [0,0,0,255]-fill (Chrome does this)
> * INVALID_OPERATION (Firefox does this)
>
> Thoughts? Maybe Mark or someone else knows more from the GL(ES) specs.
>
> -Jeff
>
> -----------------------------------------------------------
> You are currently subscribed to public_webgl@khronos.org.
> To unsubscribe, send an email to majordomo@khronos.org with
> the following command in the body of your email:
> unsubscribe public_webgl
> -----------------------------------------------------------
>

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------