Effective GPU memory size

Started by
1 comment, last by Fiddler 14 years, 7 months ago
Okay, this has had me a bit concerned for some time, so I thought I'd ask. How much video memory do I really have available for my data (Textures/RTs, Geometry, Shaders)? Say I have 256MB on my graphics card. Do I have full reign of that, or does the driver use part of that for it's own purposes? If so, does that include the front & back buffers, or do they go into the amount available to me? Any help would be appreciated. EDIT: I forgot to mention, this is also assuming XP drivers. [Edited by - n00body on September 9, 2009 10:36:30 AM]

[Hardware:] Falcon Northwest Tiki, Windows 7, Nvidia Geforce GTX 970

[Websites:] Development Blog | LinkedIn
[Unity3D :] Alloy Physical Shader Framework

Advertisement
Quote:
Any help would be appreciated.


I wouldn't count too much on avaiable video memory. The driver, which has access to video memory and system memory, will dynamically swap texture/data between video and system memory. It is just a matter of performace. You could have 700 mb of textures uploaed and only a graphics card with 256mb available and almost any performance hit at all, if you only access a limited selection of textures concurrently. On the other hand, if you try to access all textures in a single frame swapping will most likely decrease performance.

Best to use some scaling mechanism for memory consumption. I.e. provide different textures in different resolutions or downsample textures dynamically while loading.


--
Ashaman

You can calculate your expected working set heuristically as the sum of your texture size, FBOs and vertex buffers. Take into account that multisampled buffers take more memory and add an amount for driver overhead and housekeeping (e.g. 32MB).

Don't worry about the exact numbers, the drivers are reasonably efficient in swapping data as necessary. You only need a rough idea of the amount of data you can access without a significant performance penalty in a single frame. For example, if your scene uses 400MB of textures per frame, 256MB cards will probably perform much worse than 512MB cards.

You can use this as a rough guideline to create different profiles for different cards (low/medium/high quality), but allow your user to override this decision if necessary. Again, exact numbers are not necessary, unless you are building a "hard" simulation (think military-class flight simulators). Chances are, different game levels will have different requirements (think snow levels in Crysis), so you'll need to profile and solve those specific issues as they come up.

[OpenTK: C# OpenGL 4.4, OpenGL ES 3.0 and OpenAL 1.1. Now with Linux/KMS support!]

This topic is closed to new replies.

Advertisement