Am working on a graphics application which requires me to create Textures at run-time. Here are some interesting scenarios that I encountered.
- If initially, I use Low Resolution textures (say 256x256), the texture Creation (and hence interactivity) is pretty fast
- The moment I switch to High resolution textures (say 2048x2048), the texture creation slows down. This is pretty much understandable
- 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
- Initially, on Low res texture creation the memory usage reaches around 650-700MB
- 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.
- Upon deletion of the High Res Textures it comes back to around 350-400 MB
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.