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 5 of 5

Thread: glFinish stall when using a lot of texture memory (caused by driver freeing up mem?)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2007
    Location
    Brighton, UK
    Posts
    161

    glFinish stall when using a lot of texture memory (caused by driver freeing up mem?)

    Here's a quick problem description:

    I am developing an application which uses a lot of GPU memory for texture data.
    I have a set of texture arrays (say 20 ) that I update each frame with data located in a single big fat PBO ( say around 1.5GB for some cases, could be 6GB for other cases).
    I'm binding these textures to a moderately complex shader for rendering.
    The texture data are typically RGTC2 and S3TC_DXT1.
    I'm using Nvidia 970

    Now here's the problem:

    If I use a dataset larger than some size (e.g. 1.5GB), then occasionally I get a stall in the glFinish() part of SDL_GL_SwapWindow (I've verified that by adding glFinish outside of the SwapWindow call, and the CPU stall happens there)

    If I disable PBO->texture updates, the stall still happens
    If I disable setting the RGTC2 texture as a uniform in the shader the stall goes away
    If I disable setting the S3TC_DXT1 texture as a uniform in the shader , the stall still happens
    It does not matter how much I use the texture in the shader -- a single fetch suffices to cause a stall

    And the funny bit:
    I've added out of curiosity some memory reporting code that I found for NVidia, using GL_GPU_MEM_INFO_CURRENT_AVAILABLE_MEM_NVX
    Immediately after the stall, the reported available GPU memory is 300MB more (using one of the datasets), so the stall looks like it's caused by the driver freeing up memory

    Does anybody have any idea about why and how that could happen, or even better, how to prevent such a stall?

    Thanks.
    Last edited by babis; 11-08-2016 at 09:36 AM.

Tags for this Thread

Posting Permissions

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