View Full Version : Vertex buffer memory usage on nvidia cards.

10-07-2004, 12:31 PM
I get the impression that it's not very memory efficient to use vertex buffers compared to regular vertex arrays. Every time I insert data it seems to allocate at least 8 kB of memory no matter what the size of my input arrays. Has anyone else experienced this?

I have a GF4 Ti 4600 and 65 drivers but it seemed to be the same on Quadro4 and Quadro NVS cards as well.

10-07-2004, 08:52 PM
The memory for the VBs is probably aligned, and also duplicated twice, much like texture objects.

10-07-2004, 11:21 PM
Not that if your data are static, you may delete your app's local memory vertex data once the VBO has been created and feeded.

10-07-2004, 11:44 PM
Unless you want to do per-triangle collision detection, of course.

10-08-2004, 03:43 PM
Per-triangle collision detection usually needs only 12 bytes per vertex, whereas a modern graphics vertex can get as fat as 64 bytes...

10-08-2004, 05:01 PM
I would be interested to hear more about
"Per-triangle collision detection usually needs only 12 bytes per vertex", can you provide more details?

10-08-2004, 10:10 PM
I would be interested to hear more about
"Per-triangle collision detection usually needs only 12 bytes per vertex", can you provide more details?If you're doing collision detection with meshes, you don't care about texture coordinates, colors, normals (well, technically, you might care about them. Or, a face normal at least, but you can compute that), or any other data besides the vertex position. And that position takes up only 12 bytes: 3 floats.

10-13-2004, 02:28 AM
I have sumbmitted the data as static and freeing the memory allocated by me will hardly make any difference.

Maybe I will make a more in depth look but these are the figures the taskmanager reports when running with vertex buffers and without:

~59 MB with vertex buffers
~35 MB without vertex buffers

I think around 27 MB of the 35 and 59 respectively is allocated for other things but the 59 also includes the actual submitted arrays. So to me that seems like huge waste of memory. Every time I submit an array, size around 1k, the taskmanager reports an 8k increase.

10-13-2004, 07:50 PM
The task manager numbers are bogus, as they include virtual memory that's somewhat allocated, but not committed. You really only care about your working set size of pages (your "RSS"). Don't worry about the task manager -- worry about specific performance on a specific machine. Say, a 128 MB machine with 32 MB shared framebuffer, running Intel Extreme Graphics on a PC133 memory bus -- now, that's a worst case to get scared of!