detecting GPU memory size

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

detecting GPU memory size

Post by hugox » Fri Sep 26, 2014 7:36 pm

Hi,

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:
http://ogre3d.org/forums/viewtopic.php?f=2&t=58282

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?

Thx!

regards!
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3698
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 120
Contact:

Re: detecting GPU memory size

Post by dark_sylinc » Sat Sep 27, 2014 4:23 pm

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.
0 x

Post Reply