detecting GPU memory size

Get answers to all your basic programming questions. No Ogre questions, please!
Post Reply
Posts: 6
Joined: Wed Dec 04, 2013 5:30 pm

detecting GPU memory size

Post by hugox »


I'm also looking for a simple way to detect memory size of GPU in windows(DirectX) and linux(OpenGL) case!
I've found this tutorial for DirectX:

And i Know how to get the same with opengl function, but I was thinking that maybe there is something better already include in Ogre SDK?



User avatar
OGRE Team Member
OGRE Team Member
Posts: 4355
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 884

Re: detecting GPU memory size

Post by dark_sylinc »

Often, there is no reliable way to determine GPU memory size on multiple platforms, which is why it's not included in Ogre.

On Intel cards, there is no real answer, because it uses "dynamic" vram, which reserves normal RAM for the GPU dynamically depending on system needs (there is an always-reserved minimum, usually of 8MB)
On dedicated GPUs (i.e. GeForce, Radeon), although they have dedicated GDDR memory (and hence this is what one normally wants to retrieve) drivers sometimes return the total available ram the GPU can use (which is usually all of addressable normal RAM + GDDR) and not just the dedicated silicon.
On UMA SoC (i.e. mobile, PS4, XBone); the GPU ram is the system ram, but there might be arbitrary OS restrictions.
Furthermore, GPUs are now starting to support virtual memory, which makes the scene even more heterogenous.

Post Reply