[Mesa-dev] [Bug 100609] glGetFramebufferAttachmentParameteriv() returns GL_INVALID_ENUM when getting attachment size from back buffer

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 7 09:34:05 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=100609

            Bug ID: 100609
           Summary: glGetFramebufferAttachmentParameteriv() returns
                    GL_INVALID_ENUM when getting attachment size from back
                    buffer
           Product: Mesa
           Version: 17.0
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: nfxjfg at gmail.com
        QA Contact: mesa-dev at lists.freedesktop.org

I'm doing this to determine the default framebuffer depth in "generic" GL code
that can't access GLX or EGL:

    glBindFramebuffer(GL_FRAMEBUFFER, 0);
    glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK_LEFT,
GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE, &depth_g);

This would be in OpenGL 3 (not sure which versions exactly, probably 3.0 and
3.3 at least).

Mesa causes a GL_INVALID_ENUM error, while nVidia binary drivers accept this
and return the expected value.

The GL 3 spec is not entirely clear on this, but there seems to be nothing that
disallows using glGetFramebufferAttachmentParameteriv() like this. Some other
GL implementations also seem to support it. So I would tend towards considering
this a Mesa bug, but of course I'm not sure.

I think this has been happening at least with Mesa 11, up to at least 17.0.2.

The above snippet is simplified from:
https://github.com/mpv-player/mpv/blob/master/video/out/opengl/utils.c#L1282
mpv itself might serve as use-case, although current releases use an older
version of this code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170407/9894dbb3/attachment-0001.html>


More information about the mesa-dev mailing list