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

Thread: GL_TEXTURE_SPARSE_ARB on Nvidia

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2012
    Posts
    9

    GL_TEXTURE_SPARSE_ARB on Nvidia

    Hi everyone,

    currently I'm working on a project that uses a 3D texture as voxel storage. Everything's working fine so far, but I'd love to optimze my memory usage and since I'm working with GL4.4 anyway I thought I'd give the GL_TEXTURE_SPARSE_ARB extension a try. The extension has been promoted by Cass Everitt (p.34) and Graham Sellers (p.43) multiple times lately, so I hoped I could get it to work too.

    Unfortunately I get no result when querying for the virtual page sizes as described in the presentations.

    While
    Code :
    glGetIntegerv(GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB, &maxSize)
    returns the expected 2048.

    I don't get any number of indices from these..
    Code :
    glGetInternalformativ(GL_TEXTURE_3D, GL_NUM_VIRTUAL_PAGE_SIZES_ARB, GL_RGBA8, sizeof(GLint), &numSizes);
    glGetInternalformativ(GL_TEXTURE_3D, GL_VIRTUAL_PAGE_SIZE_X_ARB, GL_RGBA8, numSizes*sizeof(GLint), pageSizesX);

    I also tried GL_TEXTURE_2D instead, as used in the slides - the result is no different.

    Cass Everitt writes

    Note: numIndexes can be 0, so have a plan
    Iterate, select suitable pageSizeIndex
    so, question is...what to do? This sounds like the extension could still work on my HW and drivers, but I'd need to guess the proper virtual page size index I'd want to use.

    Has anybody worked with this yet and knows the page sizes (for Nvidia)? I hope it's just a driver issue on windows...

    Thanks in advance on any input on this issue

    PS: GPU is a GTX780, driver is the latest 335.23, OS win8.1

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    I use GL_TEXTURE_2D_ARRAY not GL_TEXTURE_3D

  3. #3
    Intern Contributor
    Join Date
    May 2013
    Posts
    69
    Looks like a simple parameter mix-up to me:
    glGetInternalformativ(GLenum target​, GLenum internalformat​, GLenum pname​, GLsizei bufSize​, GLint *params​);
    ->
    glGetInternalformativ(GL_TEXTURE_3D, GL_RGBA8, GL_NUM_VIRTUAL_PAGE_SIZES_ARB, sizeof(GLint), &numSizes);

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2012
    Posts
    9
    Oh damn, that's kind of embarrassing That's what I get from copying slides without thinking...

    Thanks a lot Osbios!

    Kind of unhandy that I can't have the same page size for z (16) as I have for x and y (32) though. But well I'm happy enough it's working at all now^^

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
  •