Prevent System Memory Copy of Textures

Started by
2 comments, last by _the_phantom_ 17 years, 5 months ago
Hi, I'm developing for a system that has 256MB video memory and 256 MB system RAM. Is there a way to prevent the OpenGL implementation from keeping copies of all textures in system memory? I need system ram for other things. The hardware is an nvidia 5200FX. I tried using PBOs to upload miplevel 0 and let glTexImage2D read from VRAM but this didn't decrease memory consumption in any way. My next try would be FBOs but may be theres is some other way to prevent this redundancy? Thanks for answering Markus
Advertisement
there is only one way: reprogram your cpu.
well, you wont be able to do that...

everything that is transfered to/from the cpu has to go to the system ram. there are some people that discovered some really awesome algorithms that do caching, that means they improve the speed to access data that is used/needed very often.

normally, the os will decide what data to cache and which parts to keep in ram.
and not the ogl api.

and: most oses rely on the cpu to handle the ram: the cpu simulates always 4gb of ram. this means, every computer system has 4gb of ram. and the os makes use of the 4 gigabytes. when you have less physical ram installed, the hdd is used automatically, and appears to be "smaller" for all low-level functions.

since you really do not want to do caching yourself and tweak the os, just use your ram for "other things", dynamic loading of the needed parts of the ram is done by the os (and finally the hardware). it is more effective than anything you could come up with.
This is an embedded system without swap space.

Furthermore the OpenGL implementation (not API) actually will decide what to do with textures and it decides to place a copy of them in system ram (Which is generally a good decision but not in my case). The question is if there is a way to prevent this.
Not without reprogramming the drivers.
The copy of the texture is kept in system ram incase the driver needs to swap textures which are resident in VRAM.

This topic is closed to new replies.

Advertisement