2 Replies Latest reply on Mar 10, 2014 12:06 AM by myrddin

    glBlitFramebuffer performance warnings

    gaspode2

      Hi,
      I get the following performance warnings from my glDebugMessageCallback function:

       

      glBlitFramebuffer was called with GL_COLOR_BUFFER_BIT set while there was no valid color attachment on the read framebuffer
      glBlitFramebuffer was called with GL_COLOR_BUFFER_BIT set while there was no valid color attachment on the draw framebuffer
      glBlitFramebuffer was called with either GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT set while there was no valid depth/stencil attachment on the read framebuffer
      glBlitFramebuffer was called with either GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT set while there was no valid depth/stencil attachment on the draw framebuffer

       

      when I am trying to blit a texture attachment into the default framebuffer:

       

          glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fbo);
          glReadBuffer(GL_COLOR_ATTACHMENT3);

       

          glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
          glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, GL_COLOR_BUFFER_BIT, GL_NEAREST);

       

      The final result looks OK but I don't know what I am doing wrong here.

      Can I do something to fix these warnings?

      Is this someting related to OpenGL driver or my lack of knowledge?

       

      I have:

      OpenGL vendor string: ATI Technologies Inc.

      OpenGL renderer string: AMD Radeon HD 6800 Series 

      OpenGL version string: 1.4 (2.1 (4.3.12614 Compatibility Profile Context 13.25.18))

       

      Regards

        • Re: glBlitFramebuffer performance warnings
          frazanardi

          I get those bogus messages as well after updating to a recent AMD driver release (6.14.10.12682).

          • Re: glBlitFramebuffer performance warnings
            myrddin

            I think I ran into this same issue.

             

            I have an FBO with one render buffer attached to GL_COLOR_ATTACHMENT0 and one render buffer attached to GL_DEPTH_ATTACHMENT. The format for the color render buffer is GL_RGBA8. I had to use GL_DEPTH24_STENCIL8, not GL_DEPTH_COMPONENT24, for the depth render buffer. This one change made it so that the blit no longer threw an Invalid Operation error. The weird thing is that my window's config attributes don't request a stencil buffer size.

             

            I'm not sure if this is an ATI driver bug or what, maybe a moderator could shed some light on this.