View Full Version : GPU memory check utility functions?
03-13-2011, 05:57 AM
I wonder if OpenGL supports any functions to test GPU memory status which we could use before allocating memory space for buffers?
If I see weird results while drawing using VBOs - how can I know if it's caused by not enough GPU memory?
P.S. I'm using ATI HD Mobility Radeon card
03-13-2011, 06:00 AM
03-13-2011, 06:05 AM
Thanks! That was fast :).. I will try to use this.
03-13-2011, 06:09 AM
You can also use glGetError to check for out of memory errors. In my current project I was allocating a lot of space for some massive offscreen render targets. And it was becoming unpredictable. Nvidia would give me an out of memory message, ATI would just die with style :p
03-13-2011, 10:57 AM
03-13-2011, 02:34 PM
I just gave up with it. Various graphics cards become unpredictable when u ask for too much memory. My nvidia 9800gt would often give out of memory messages, then it was like russian roulette if it worked or not. In the end I rewrote my renderer as a tile based engine ;p
03-17-2011, 09:16 AM
Does someone know if these 2 functions are connected?
sizeof( GLuint ),
GLint nCurAvailMemoryInKB = 0;
Do I need to call wglGetGPUInfoAMD first in order to get free memory info ,or simply glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI,&nCurAvai lMemoryInKB ) is enough?
I tried to call only the last one ,but returned value does'nt seem logical to me .
I can't call the first function since I don't know yet how to update my header files the way that wglGetGPUInfoAMD is recognized...I 'm in big delay so I don't have a time for it.
Thanks in advance
03-17-2011, 02:24 PM
It says wglGetGPUInfoAMD returns value in MB.
glGetIntegerv returns in KB.
Header files are at http://www.opengl.org/registry/
03-17-2011, 02:53 PM
Thanks, my mistake, it returns more less correct values , these functions are not connected, glGetIntegerv(..) is enough.
This ATI HD Mobility Radeon card is driving me nuts.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.