Jump to content

  • Log In with Google      Sign In   
  • Create Account

GL_TEXTURE_SPARSE_ARB on Nvidia


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 nattfoedd   Members   -  Reputation: 214

Like
0Likes
Like

Posted 22 March 2014 - 04:42 PM

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

glGetIntegerv(GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB, &maxSize) 

returns the expected 2048.

 

I don't get any number of indices from these..

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 smile.png

 

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


Edited by nattfoedd, 22 March 2014 - 04:42 PM.


Sponsor:

#2 Ciprian Stanciu   Members   -  Reputation: 213

Like
0Likes
Like

Posted 10 April 2014 - 11:23 PM

I can confirm that it doesn't work as well, tried texture 2d, texture 2D array, tried doing glTexStorage2D/3D before and after, I'm on 335.23 too and Windows 8.1 with a GTX 650.


Relative Games - My apps


#3 Ciprian Stanciu   Members   -  Reputation: 213

Like
1Likes
Like

Posted 11 April 2014 - 02:12 AM

After about a couple of hours of swearing I realized the code from the slides is just wrong !

Thanks to Christophe Riccio and his samples ( http://ogl-samples.g-truc.net/ ) the code on the slides should've been :

 

glGetInternalformativ( GL_TEXTURE_2D, GL_RGBA8, GL_VIRTUAL_PAGE_SIZE_X_ARB, 1, &page_sizes_x[0]);

 

The difference being that it's GL_RGBA8 and then GL_VIRTUAL_PAGE_SIZE_X_ARB and not the other way around !


Relative Games - My apps





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS