Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 8 of 8

Thread: FBO setup failure on ATI X1800

  1. #1
    Junior Member Regular Contributor
    Join Date
    Nov 2004
    Location
    San Diego, CA, USA
    Posts
    110

    FBO setup failure on ATI X1800

    My FBO code has been working on many configurations, but fails for one Windows customer with an ATI Radeon Mobility X1800. The status check returns GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT. The setup code looks like this:

    Code :
    // Create and bind a framebuffer object
    glGenFramebuffersEXT( 1, &frameBufferID );
    glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, frameBufferID );
     
    // Create color renderbuffer
    glGenRenderbuffersEXT( 1, &colorRenderBufferID );
    glBindRenderbufferEXT( GL_RENDERBUFFER_EXT,
    	colorRenderBufferID );
    glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_RGB,
    	inPaneWidth, inPaneHeight );
    glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT,
    	GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT,
    	colorRenderBufferID );
     
    // Create a depth/stencil buffer
    glGenRenderbuffersEXT( 1, &depthRenderBufferID );
    glBindRenderbufferEXT( GL_RENDERBUFFER_EXT,
    	depthRenderBufferID );
    glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT,
    	GL_DEPTH24_STENCIL8_EXT, inPaneWidth, inPaneHeight );
    glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT,
    	GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT,
    	depthRenderBufferID );
    glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT,
    	GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT,
    	depthRenderBufferID );
     
    GLenum	result = glCheckFramebufferStatusEXT( GL_FRAMEBUFFER_EXT );

    I tried checking glGetError after each step, and it's not detecting any error.

    The error GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT seems to suggest that neither the color buffer nor the depth/stencil buffer is getting set up correctly, but why? In another thread, someone said "Sometimes, I noticed glCheckFramebufferStatusEXT() reports incorrect(not relevant) FBO status on ATI cards when it failed to complete a FBO." So maybe GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT is bogus.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,792

    Re: FBO setup failure on ATI X1800

    My FBO code has been working on many configurations, but fails for one Windows customer with an ATI Radeon Mobility X1800. The status check returns GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT.
    Driver bug. If you ever get anything other than GL_FRAMEBUFFER_UNSUPPORTED, and you don't get it consistently across implementations, then it's a driver bug.

    You can try to use GL_DEPTH_STENCIL_ATTACHMENT_EXT instead of attaching the renderbuffer to both. According to the spec, this should make no difference, but since we're already in the land of ATI driver bugs, you may as well have a go.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Nov 2004
    Location
    San Diego, CA, USA
    Posts
    110

    Re: FBO setup failure on ATI X1800

    Quote Originally Posted by Alfonse Reinheart
    Driver bug. If you ever get anything other than GL_FRAMEBUFFER_UNSUPPORTED, and you don't get it consistently across implementations, then it's a driver bug.
    Thanks, good to know...

    Quote Originally Posted by Alfonse Reinheart
    You can try to use GL_DEPTH_STENCIL_ATTACHMENT_EXT instead of attaching the renderbuffer to both. According to the spec, this should make no difference, but since we're already in the land of ATI driver bugs, you may as well have a go.

    I can't find a GL_DEPTH_STENCIL_ATTACHMENT_EXT constant in either the FBO spec or the latest version of glext.h. Are you sure you're not thinking of something else?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,792

    Re: FBO setup failure on ATI X1800

    I can't find a GL_DEPTH_STENCIL_ATTACHMENT_EXT constant in either the FBO spec or the latest version of glext.h. Are you sure you're not thinking of something else?
    Sorry. That's part of the ARB_framebuffer_object spec. I don't know why EXT_packed_depth_stencil didn't include something like that.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Nov 2004
    Location
    San Diego, CA, USA
    Posts
    110

    Re: FBO setup failure on ATI X1800

    Oh, I see. I wasn't aware of the existence of ARB_framebuffer_object. (In my defense, I do more of my work on the Mac, where no drivers yet support ARB_framebuffer_object.) I'll give it a shot.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,792

    Re: FBO setup failure on ATI X1800

    where no drivers yet support ARB_framebuffer_object
    Really? I know Apple has this thing about ignoring GL versions past 2.1, but not even allowing drivers to expose ARB_framebuffer_object?

    It's a much better extension overall. Overall, it gets rid of the size limitation, so you can have render targets with various sizes.

  7. #7
    Member Regular Contributor
    Join Date
    Oct 2006
    Posts
    349

    Re: FBO setup failure on ATI X1800

    If possible, try upgrading your drivers. I *think* this was fixed around the Catalyst 9.3 time-frame (the last version to support the X1800).

    As a test, try disabling the stencil buffer by changing the storage format for the renderbuffer. This code should work then (confirming that this is indeed a driver bug).

  8. #8
    Junior Member Regular Contributor
    Join Date
    Nov 2004
    Location
    San Diego, CA, USA
    Posts
    110

    Re: FBO setup failure on ATI X1800

    The user claims that the driver is the latest (from May 2007).

    I'll see if I can make it fall back to depth but not stencil.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •