Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Crash with glCheckFramebufferStatusEXT on ATI Radeon 5450 Catalyst 12.6

  1. #1
    Intern Contributor
    Join Date
    Nov 2010

    Crash with glCheckFramebufferStatusEXT on ATI Radeon 5450 Catalyst 12.6


    I tried the following (C#) code, that basically allocates an FBO with a 4096x4096 depth texture at each iteration.

    On an ATI Radeon 5450 with Catalyst 12.6, under WinXP 32bit, I get an AccessViolationException in the glCheckFramebufferStatusEXT() call after the 6th iteration.

    On an ATI FirePro v3750 with Dell drivers (Driver Packaging Version 8.85.7) under Windows 7 64bit I can successfully get a GL_OUT_OF_MEMORY error and recover from this situation, without getting the AccessViolation.

    Why is it crashing on the ATI Radeon?
    Is it something to expect when using too much graphics memory, or is it a driver or operating system problem?


    Code :
            void TestFBO()
                customViewportLayout1.Grid.Visible = false;
                int width = 4096;
                int height = 4096;
                uint[] textureId = new uint[100];
                uint[] fbo = new uint[100];
                uint[] rbDepth = new uint[100];
                uint[] names = new uint[1];
                for (int i = 0; i < 100; i++)
                    glGenTextures(1, names);
                    textureId[i] = names[0];
                    glBindTexture(GL_TEXTURE_2D, textureId[i]);
                    glTexParameteri(GL_TEXTURE_2D, gl.TEXTURE_MIN_FILTER, GL_NEAREST);
                    glTexParameteri(GL_TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GL_NEAREST);
                    glTexParameteri(GL_TEXTURE_2D, gl.TEXTURE_WRAP_S, GL_CLAMP);
                    glTexParameteri(GL_TEXTURE_2D, gl.TEXTURE_WRAP_T, GL_CLAMP);
                    glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, (int) width, (int) height, 0,
                                  GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, null);
                    glBindTexture(GL_TEXTURE_2D, 0);                
                    fbo[i] = glGenFramebuffersEXT();
                    glBindFramebufferEXT(glFRAMEBUFFER_EXT, fbo[i]);
                    rbDepth[i] = glGenRenderbuffersEXT();
                    glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rbDepth[i]);
                    glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, width, height);
                    glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, rbDepth[i]);
                    glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, textureId[i], 0);
                    int _status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
                    int error = glGetError();
                    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); // on ATI Radeon CRASHES Here 5450 (at iteration 12)!!!
                    if (error == GL_OUT_OF_MEMORY)
                        for (int j = 0; j <= i; j++)
                            ViewportLayout.DelTexture(ref textureId[j]);
    Last edited by Devdept2; 07-18-2012 at 06:46 AM.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    Can't speak to why it crashes as I can't test any code on XP anymore (and don't want to). What I can say that not a single EXT version of the above functions is necessary with any recent GL driver. Just use the core functions (without EXT, ARB, NV, AMD and so on).

  3. #3
    Intern Contributor
    Join Date
    Nov 2010
    Using the core functions the crash happens the same.

Posting Permissions

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