Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Texture Memory management


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
1 reply to this topic

#1 whizkid667   Members   -  Reputation: 126

Like
0Likes
Like

Posted 13 June 2013 - 11:37 AM

Am working on a graphics application which requires me to create Textures at run-time. Here are some interesting scenarios that I encountered.
1) If initially, I use Low Resolution textures (say 256x256), the texture Creation (and hence interactivity) is pretty fast
2) The moment I switch to High resolution textures (say 2048x2048), the texture creation slows down. This is pretty much understandable
3) I delete all the high res textures and start going back to the creation of Low res textures.
The funny part is that, even upon deletion of these High Res textures I never get the same speed (interactivity) back.
 
I monitored the GPU memory usage using GPU-Z. I have Nvidia GTX 460 (1GB VRAM) card
1) Initially, on Low res texture creation the memory usage reaches around 650-700MB
2) Upon converting to High Res Textures (the memory jumps to around 850-900MB (should have gone further up), and then keeps hovering around the mark.
3) Upon deletion of the High Res Textures it comes back to around 350-400 MB back
But it never acquires the same speed or performance again.
 
Is the sluggishness due to usage of any Shared memory (instead of the dedicated memory) by the Card?
If so, then why is it still using the Shared memory when all the textures have been released and only about 350MB is being used?
 
Have been predominantly using the OpenGL Rendering System.
Haven't tried on DirectX. Issue has been noted on Win7 and Win8 OS.
Haven't tested it out on MacOS.
 
Is there anyway to ensure that the Texture Usage is confined to the dedicated memory?
A crash due to non-availability of Video memory is preferable than sluggish interactivity.


Sponsor:

#2 MJP   Moderators   -  Reputation: 11569

Like
0Likes
Like

Posted 13 June 2013 - 04:27 PM

So if I understand you correctly, you're constantly creating new textures every frame? You may just be hitting a sub-optimal path of the memory allocator inside the driver, due to fragmentation and/or repeated allocations and de-allocations. Perhaps you could re-use textures instead of creating new ones?






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