nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Problem with a large number of FBO+texture under Linux (http://www.nvnews.net/vbulletin/showthread.php?t=88178)

Wog 03-15-07 11:49 AM

Problem with a large number of FBO+texture under Linux
 
Bonjour,

I tried the following Opengl code under Ubuntu x86 (dual Xeon+7800GTS) and Ubuntu x86-64 (Core 2 Duo E6600+GeForce 7800GTX and AMD x2 4600+GeForce8800GTX)

Code:

#include <iostream>
#include "glee.h"
#include <GL/glut.h>

using namespace std;

int main ( int argc, char** argv )
{
  glutInit(&argc, argv);
  glutCreateWindow( "FBO" );

  for (int i=0;i<atoi(argv[1]);i++)
    {
      GLuint framebuffer, texture;
      GLenum status;
     
      glGenFramebuffersEXT(1, &framebuffer);
      cout << "Framebuffer id : " << framebuffer << endl;
     
      glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);
      cout << "  FBO Binding done" << endl;
     
      glGenTextures(1, &texture);
      cout << "  Texture id : " << texture << endl;
      glBindTexture(GL_TEXTURE_2D, texture);

      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, 100, 100, 0,
                  GL_RGB, GL_UNSIGNED_BYTE, NULL);
     
      glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
                                GL_TEXTURE_2D, texture, 0);     
      cout << "  Texture attachment done" << endl;
     
    }

  glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

  return 0;
}

And I can not initialize more than 155 frame buffer objects + textures under Linux with the latest nVidia driver. After that, I got this error:

Framebuffer id : 155
FBO Binding done
Texture id : 155
Texture attachment done
Framebuffer id : 156
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 143 (GLX)
Minor opcode of failed request: 27 ()
Serial number of failed request: 969
Current serial number in output stream: 970

The same code works without problem with
Ubuntu x86 - ATI graphics card (9600 mobility)
Windows XP 64bits GeForce 7800GTX
Windows XP GeForce 8800GTX
Windows Vista x86 ATI X1900GT
Windows Vista x86 GeForce 8800GTX
(I am using for each system the latest driver)

I am working on an application which needs to initialize a lot of FBO+texture. And this application can not works under Linux when I am using a nVidia graphics card.

Am I doing something wrong ?


All times are GMT -5. The time now is 10:36 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.