Jump to content
  • Advertisement
Sign in to follow this  
AhmedAli

Free GPU Memory after deleting texture

This topic is 2657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[size="4"]hi every body,
I'm using FBO in my application.. at some points My app rendering resize and i need to delete and recreate the FBO by the new dims and data .. it works fine but i noticed that the glDeleteTextures doesn't free the GPU memory that resulted in accumulated GPU memory leakage at run-time. this is my code to delete the FBO and its texture


glDeleteFramebuffersEXT( 1, TempFrameBuffer);
glDeleteTextures( 1, Tempimage);


can you find what i missed? are there any method to free the GPU memory after deleting texture?
thanks in advance for your help :)

Share this post


Link to post
Share on other sites
Advertisement
i noticed that the glDeleteTextures doesn't free the GPU memory that resulted in accumulated GPU memory leakage at run-time
What method did you use to determine this?

Share this post


Link to post
Share on other sites
[size="4"]i used GPUShark app (downloaded from www.geeks3d.com )to monitor the GPU resources at run-time .. it's really helpful but the graphics card driver should be updated to give accurate results

Share this post


Link to post
Share on other sites
Do you expect the memory will be deallocated at the same moment you call glDeleteTextures()? It is a wrong assumption.

Drivers allocate/deallocate memory at the most suitable moment. Try extensively to allocate/deallocate textures to see whether you will run out of memory.

Share this post


Link to post
Share on other sites

Do you expect the memory will be deallocated at the same moment you call glDeleteTextures()? It is a wrong assumption.

Drivers allocate/deallocate memory at the most suitable moment. Try extensively to allocate/deallocate textures to see whether you will run out of memory.


[size="4"]The GPU memory usage is increasing by a fixed value for every recreated texture and it is increasing continuously without decay .. by this rate it just about time to run out of memory but this-based on my calculations- will happen

Share this post


Link to post
Share on other sites
[size="4"] OK , but do you find it reasonable that there is noway to free the the allocated GPU memory which is possible and a very simple operation in the system RAM !!!

Share this post


Link to post
Share on other sites

[size="4"] OK , but do you find it reasonable that there is noway to free the the allocated GPU memory which is possible and a very simple operation in the system RAM !!!
...but the driver might be planning on re-using that allocated memory. If it's holding onto an allocation, so that it can re-use it at some point, or if it "frees" the allocation (so that it can be re-used at some point), what's the difference?

Share this post


Link to post
Share on other sites
[size="4"]Yesterday i tested my application it continued for about 2 hours and the GPU memory usage increased until it reached about 75% without decay .. Although i'm deleting the old textures every about 10seconds. Do you think that the system didn't reached that point at which the memory should be reused? Is that safe ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!