[Mesa-dev] OpenGL ES 3.0 spec bug? Framebuffer Object Queries

Samuel Iglesias Gonsálvez siglesias at igalia.com
Thu Jan 15 01:04:36 PST 2015


On Thursday, January 15, 2015 10:21:30 AM Tapani wrote:
> On 01/14/2015 05:59 PM, Samuel Iglesias Gonsálvez wrote:
> > Hello,
> > 
> > Mesa fails the following dEQP GLES 3 test:
> > 
> > dEQP-GLES3.functional.fbo.api.attachment_query_default_fbo
> > 
> > This test calls glGetFramebufferAttachmentParameteriv() to get
> > FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE information from COLOR_ATTACHMENT0.
> > with the default framebuffer bound to target.
> > 
> > Then, this call fails following the spec (section 6.1.13 "Framebuffer
> > Object> 
> > Queries" of OpenGL ES 3.0 spec):
> >     "If the default framebuffer is bound to target, then attachment must
> >     be
> >     BACK, identifying the color buffer; DEPTH, identifying the depth
> >     buffer; or
> >     STENCIL, identifying the stencil buffer."
> > 
> > However, the spec doesn't say what kind of error should be returned when
> > attachment is not BACK, DEPTH or STENCIL and the default framebuffer is
> > bound to target.
> > 
> > Mesa returns GL_INVALID_OPERATION but the test expects GL_INVALID_ENUM.
> > 
> > What do you think it is the correct one? Should we file a bug against the
> > spec?
> It says "Any combinations of framebuffer type and pname not described
> above will generate an INVALID_ENUM error." which I believe is meant for
> the whole section.

I don't think it applies to the whole section. I think it only applies to the 
framebuffer type and pname combinations that were not listed before, not to 
attachment.

> It is strange because in many other places of the
> spec errors are explicitly stated for each case and not like this.

Indeed  :-)

> GL_EXT_draw_buffers for ES2 describes explicitly this error case to use
> INVALID_ENUM, ES3 very likely uses the same.
> 

GL_EXT_draw_buffers [0], section "Errors" says the following

"   The INVALID_ENUM error is generated by GetFramebufferAttachmentParameteriv
    if the <attachment> parameter is not one of the values listed in Table 
4.x."

But it doesn't say anything if the default framebuffer is bound or any similar 
restriction. With a similar wording, OpenGL ES 3.0 says the following when a 
framebuffer object is bound to target:

"If a framebuffer object is bound to target, then attachment must be one of the
attachment points of the framebuffer listed in table 4.6."

But, as before, without stating the error. According to what 
GL_EXT_draw_buffers says in this regard,  I guess you are right and Mesa should 
return INVALID_ENUM.

I'm going to wait some days to send the patch just in case someone wants to 
add something.

Thanks!

Sam

[0] https://www.khronos.org/registry/gles/extensions/EXT/EXT_draw_buffers.txt

> > Sam
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150115/ed7ea72f/attachment.sig>


More information about the mesa-dev mailing list