VBO eats RAM

Started by
7 comments, last by Promit 4 years, 2 months ago

Hi All

My app uses about 1.4 Gb of RAM, but only 0.4 Gb by app itself, rest is by OpenGL. If I turn VBO off, all is ok, I've 1 Gb more RAM but, of course, drawing speed fails dramatically.

Can you please explain this effect? Should not VBO buffers be saved on GPU side? What is this mystery allocateCWMemory?

OSX 10.14.3, Intel Iris card, OpenGL 2.0

Thank you

Advertisement

Tommato said:
Intel Iris card

Integrated GPUs rarely have dedicated VRAM. So your GPU is using a portion of your RAM for its needs, and thats where the allocations come frome.

In theory you could also have some leak/ issue in your application's code, but that's difficult to guess with this information ? 1.4gb sounds like quite a lot, but also that depends on the application

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

@Juliean

Juliean said:

Tommato said:
Intel Iris card

Integrated GPUs rarely have dedicated VRAM. So your GPU is using a portion of your RAM for its needs, and thats where the allocations come frome.

This is almost certainly what's happening. You don't have a GPU side on which to save anything.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Thx for your replies. So allocation in CPU RAM is normal for some kinds of cards? Never heard about it. Just curiosity: but why in this case VBO has a speedup effect?

Thank you

Tommato said:

Thx for your replies. So allocation in CPU RAM is normal for some kinds of cards? Never heard about it. Just curiosity: but why in this case VBO has a speedup effect?

Thank you

Well its normal for “cards“ which are pretty mich just on-board addons on the CPU. quite common for mobile chips, nowadays even in a lot of desktop CPUs.
dedicated GPUs on the other hand always have dedicated RAM.

as for why VBOs are still a speedup: My quess is the driver can still perform optimitations when creating those. Like allocating and commiting special pages in RAM, maybe even those the are physically closer to the GPU. but no expert on that topic, so take it with a grain of salt.

You should note that even with dedicated GPU memory, an OpenGL implementation is perfectly entitled to store a buffer object CPU-side based on usage hints and runtime heuristics; the spec doesn't make any guarantees about where a buffer object will be stored.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Tommato said:

Thx for your replies. So allocation in CPU RAM is normal for some kinds of cards? Never heard about it. Just curiosity: but why in this case VBO has a speedup effect?

Memory is not all the same, and there are rules. The integrated GPU typically has the ability to read directly from certain ranges of system memory without involving the CPU, and there are rules set on that memory to make sure it's safe to do so. The VBO is placed in those areas with those rules applied for significant speedups.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

This topic is closed to new replies.

Advertisement