Cash management of video memory

I’m rendering an urban scene. A typical scene is about 40MB (textures+vertex buffers+index buffers) and I would like to optimize performance for 32MB video cards (GeForce 2 for example) with slow or no AGP.

It is known that a key for achieving performance is to have all the scene available on the video memory. But what if, like in my case, the scene size exceeds the video memory just a little?

An ideal caching mechanism would know which objects stays in the scene and replace only them, so in my case, for example, each frame will involve loading of 8MB from system memory to video memory. But if you consider a LIFO trivial cashing then each frame will require loading of the complete 40MB. (its surprising at first though but if you analyze it, that’s the result).

Any enlightenment on my problem?
Do you know what are the cashing mechanisms of video card drivers?
Do you have any experience with prioritizing objects on the video memory?


Hum, it’s spellt “cache”, not “cash”. I thought you were offering money to solve your problem, hem, deceived.

Anyhow, it all depends on the video card driver/manufacturer. Generally, i think the consensus is that LIFO/FIFO is pretty bad, so a LRU (least recently used) cache is used. I think the texture cache uses this. Google for more infos.