cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

cippyboy
Journeyman III

16384 x 16384 Depth texture fails

On 14.6 drivers, this fails with GL_OUT_OF_MEMORY

glTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, 16384, 16384, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL );

even though GL_MAX_TEXTURE_SIZE is being reported as 16384.

The equivalent thing in DirectX11 works though.

0 Likes
6 Replies
realhet
Miniboss

Hi,

I'm only guessing that there is a byte limit too. Your texture is 1GB, maybe it's too big for the current OpenGL implementation on the specific card.

If it would be a color texture, I'd try to use texture compression, but this is not the case.

A few years ago, I remember a 64MB buffer limit on OpenLC and the max size on each dimension was 8192. Maybe this limit on DX grows faster than on OGL...

0 Likes
kphillisjr
Adept II

I also agree that the texture size is too large. Is it possible to get some more information about the system you are using? Things like Video card model, total system memory, operating system, and cpu model are a good start.

0 Likes

It's an R9 280X, got 3GB of RAM and GPU-Z reports that my entire systems eats under 500MB of GPU memory, there's a lot of room until 3GB. Got 8GB of ram as well, so it's definetely not a physical thing, the DX part kind of proves there's nothing wrong with that.

It kind of boggles me that the driver does not share code between the GL and DX implementations for doing the exact same thing.

0 Likes
cippyboy
Journeyman III

Any update on this ?

0 Likes

I think the problem is most likely address space problems regarding 32-bit programs ( with windows ). That said there is a few things that can be tried.

  1. Try a smaller texture size ( 8192x8192 ) with the same build setup.
  2. Try the original size on a 64-bit build.
  3. Disable mipmap generation when generating the texture. ( Never trust defaults, sometimes the driver can be wrong, or another program messed with the setting ).
  4. Try another texture format.  ( GL_DEPTH_COMPONENT16_ARB, GL_DEPTH_COMPONENT24_ARB, and GL_DEPTH_COMPONENT32_ARB )... These may not be floating point, but they do hint at bugs surrounding the driver.
0 Likes

I'm now using the 14.7 drivers btw

I tried with GL_DEPTH_COMPONENT and GL_UNSIGNED_SHORT and I get the same GL_OUT_OF_MEMORY

I tried a 64bit build and it doesn't throw an error and it looks ok so it does work there. With DX11 It was still a 32 bit app though so I dunno why it would be a problem for a 32bit address space since I never map the texture and I use NULL for glTexImage2D. Isn't the driver in a 64 bit address space all the time for a 64 bit OS ?

0 Likes