Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12757

multisample framebuffer construction fails when GL_MAX_SAMPLES_EXT is 0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.1
    • 4.7.0
    • GUI: OpenGL
    • None
    • Linux x64
      OpenGL vendor string: Mesa Project
      OpenGL renderer string: Software Rasterizer
      OpenGL version string: 2.1 MEsa 7.7.1
    • 24742e54332a71db0bc5ae7b1632924ae592aea7

    Description

      On my system I'm getting the error

      [qglframebufferobject.cpp line 464] GL Error: 1281
      QGLFramebufferObject: Framebuffer incomplete attachment.
      

      when running examples/opengl/framebufferobject. The error code is for INVALID_VALUE.

      Debugging showed that the call to glRenderbufferStorageMultisampleEXT around line 453 triggers the error. It seems maxSamples is 0 and requesting multisampling with samples = 1 fails. This seems to fix it:

      --- a/src/opengl/qglframebufferobject.cpp
      +++ b/src/opengl/qglframebufferobject.cpp
      @@ -449,7 +449,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
       
               glGenRenderbuffers(1, &color_buffer);
               glBindRenderbuffer(GL_RENDERBUFFER_EXT, color_buffer);
      -        if (glRenderbufferStorageMultisampleEXT) {
      +        if (glRenderbufferStorageMultisampleEXT && maxSamples > 0) {
                   glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, samples,
                       internal_format, size.width(), size.height());
               } else {
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ckamm Christian Kamm
            ckamm Christian Kamm
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes