|06-11-03, 10:48 PM||#1|
Join Date: Jun 2003
Texture memory, nvidia, and opengl
So I'm working in a embedded like env. I have a nVidia Geforce 4 card
with 128 MB of ram and a linux system with 128 MB of ram. Due to the
"embeded like" env, the linux system does not have a swap file system.
Which would be fine except the nVidia Open GL driver seems to keep 2
copies of each texture I load in memory. One copy in system memory
and one copy in card memory. Meaning I malloc some memory to read in
the texture file from disk, hand it to open gl, then free the memory I
malloc'ed to hold the texture. It seems as if the driver keeps one
copy of the texture in system memory and keeps one in the card memory.
I am working with OpenGL 1.3 drivers on linux from nVidia's web site.
I would like to know if anyone else has seen this problem? And is
there a way to stop this from happening.
To be completely fair, I'm about 70% confidient that this is my
problem, so my description above may be incorrect. But nVidia does
not open source their open GL drivers so without dumping assembler and
reverse engineer the driver, I think my decription above is accurate.
Any help or insite would be greatly appreciated.
|06-12-03, 07:33 AM||#2|
Join Date: Jun 2003
I think all openGL drivers would show the same behaviour. In a normal setup, the texture memory on the card is only a cache for most-used textures. As you load textures and draw them, they are cached in texture memory for speed. If the set of textures being used is larger than texture memory, then some textures will have to be swapped in and out of texture memory from main memory.
If you don't keep a copy of every texture in system memory, then when the drivers swap a texture out of texture memory it has to be copied back across the AGP bus, which is *slow*. So the drivers maintain two copies, allowing the texture to be 'swapped' out of texture RAM by just overwriting it and keeping a pointer to the current valid, fastest, copy.
You could possibly use the VAR extension to just use texture memory to store textures, although I've never tried this.
|Thread||Thread Starter||Forum||Replies||Last Post|
|(Linux) NVIDIA R302.11 OpenGL Extensions List||News||Latest Tech And Game Headlines||0||06-12-12 08:30 AM|
|OpenGL apps crashing in NVIDIA driver when switching desktop||dinosaur||NVIDIA Linux||0||06-01-12 08:09 PM|
|Measuring card memory usage||peter_ga||NVIDIA Linux||0||05-24-12 09:07 PM|
|Nvidia 2960 OpenGL too dark?||godxzilla||NVIDIA Linux||3||09-08-02 10:55 PM|
|Multiple OpenGL applications and NVidia||gbrauer||NVIDIA Linux||7||09-01-02 05:47 PM|