Comments on: How to Know the Graphics Memory Size and Usage In OpenGL https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/ Graphics Cards and GPUs News, Graphics Programming, Home of FurMark Fri, 24 Nov 2017 15:15:39 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: poiuyTerry https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-18297 Fri, 25 Feb 2011 00:27:12 +0000 http://www.geeks3d.com/?p=7152#comment-18297 Here is the complete list of accepted parameters:

GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX
0x9049
GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
The final two are particularly useful.
The report on the total number of memory ‘evictions’ (swap outs) that have occurred since the last call.

From NVidia specs:
GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX
– dedicated video memory, total size (in kb) of the GPU memory

GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX
– total available memory, total size (in Kb) of the memory
available for allocations

GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX
– current available dedicated video memory (in kb), currently unused GPU memory

GPU_MEMORY_INFO_EVICTION_COUNT_NVX
– count of total evictions seen by system

GPU_MEMORY_INFO_EVICTED_MEMORY_NVX
– size of total video memory evicted (in kb)

PT

]]>
By: Real-Time Rendering · Tools, tools, tools https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-17060 Wed, 05 Jan 2011 02:49:21 +0000 http://www.geeks3d.com/?p=7152#comment-17060 […] really a tool per se, but still cool to see: here’s a way to find out how much free GPU memory is left for your OpenGL application. Anyone know any way to do this sort of thing with DirectX and […]

]]>
By: [OpenGL] GLEW 1.5.7 Released - 3D Tech News, Pixel Hacking, Data Visualization and 3D Programming - Geeks3D.com https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-15414 Fri, 05 Nov 2010 07:45:21 +0000 http://www.geeks3d.com/?p=7152#comment-15414 […] new update of GLEW is available. GLEW 1.5.7 adds the GL_NVX_gpu_memory_info extension and fixes some compiler bugs as well as a bug with […]

]]>
By: Cata https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-13395 Tue, 10 Aug 2010 12:06:34 +0000 http://www.geeks3d.com/?p=7152#comment-13395 How i make this issue with FX5200 card and pyopengl ?
Thank’s

]]>
By: Mars_999 https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-13016 Fri, 16 Jul 2010 05:49:11 +0000 http://www.geeks3d.com/?p=7152#comment-13016 I am having a crash when I call wglGetGPUInfoAMD()… I take out that call and I have no issues?

AFAIK I don’t need a GL3+ RC I am using GL2 RC.

Thanks

GLuint gpuIDs[16] = {0};
GLuint maxGpus = wglGetGPUIDsAMD(16, gpuIDs);
GLint freeMem[4] = {0};
glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, &freeMem[0]);
availableMemory = freeMem[0] / 1024;
if(wglGetGPUInfoAMD(gpuIDs[0], WGL_GPU_RAM_AMD, GL_UNSIGNED_INT, sizeof(GLuint), &totalMemory) != 1)
totalMemory = 0;
if(wglGetGPUInfoAMD(gpuIDs[0], WGL_GPU_CLOCK_AMD, GL_UNSIGNED_INT, sizeof(GLuint), &clockSpeed) != 1)
clockSpeed = 0;

]]>
By: fjfjfgjfgj https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12682 Wed, 16 Jun 2010 12:50:23 +0000 http://www.geeks3d.com/?p=7152#comment-12682 About: Seperate for memory that an application has resources only used by itself and resources shared for other things. It would be very useful to have that distinction.

]]>
By: Lightness1024 https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12492 Fri, 04 Jun 2010 15:30:57 +0000 http://www.geeks3d.com/?p=7152#comment-12492 This information was prefiously already available with the tool “memstatus”. I tested it on various cards (even gtx with 197 drivers) and it worked only on quadro up to now, though.

]]>
By: fjfjfgjfgj https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12452 Wed, 02 Jun 2010 14:30:09 +0000 http://www.geeks3d.com/?p=7152#comment-12452 AAAAAAArrrrrrghhhh.
It is working in powers of two with the WRONG PREFIX!!!

Thanks jammer, this was indeed necessary to know.
They should move to MiB and KiB notations.

And about memory for an application.
Seperate for memory that an application has resources only used by itself and resources shared for other things.

]]>
By: DrBalthar https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12414 Tue, 01 Jun 2010 12:50:37 +0000 http://www.geeks3d.com/?p=7152#comment-12414 Thanks these are quite some useful tips!

]]>
By: Dan https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12403 Mon, 31 May 2010 20:14:04 +0000 http://www.geeks3d.com/?p=7152#comment-12403 Would it be possible to add peak memory usage while program running in tray and playing opengl game? Like in MemStatus tool -_-

]]>
By: JeGX https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12399 Mon, 31 May 2010 17:54:56 +0000 http://www.geeks3d.com/?p=7152#comment-12399 Thanks jammer 😉

]]>
By: jammer https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12396 Mon, 31 May 2010 17:02:56 +0000 http://www.geeks3d.com/?p=7152#comment-12396 Use of GL_ATI_meminfo is very simple 🙂

int free_mem;
//returns in kB, so if you want MB,divide by 1024
glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI,free_mem);
//now subtract this free memory from total memory and get used memory 🙂
used_mem = total_mem – free_mem;

I’ve noticed that it doesn’t matter whether you give to this function GL_TEXTURE_FREE_MEMORY_ATI or GL_VBO_FREE_MEMORY_ATI, it returns the same numbers

]]>
By: fjfjfgjfgj https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12392 Mon, 31 May 2010 15:07:18 +0000 http://www.geeks3d.com/?p=7152#comment-12392 Also for the memory sizes.

Is that in MB as in 1000000B or 1024^2B?
Same for kB: 1000 or 1024?

I’m hoping it’s 1000 and 1000000 we have KiB and MiB for the powers of two.

]]>
By: fjfjfgjfgj https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12390 Mon, 31 May 2010 15:04:26 +0000 http://www.geeks3d.com/?p=7152#comment-12390 It would be handy to know the memory a specific application is using. Hopefully this becomes part of OpenGL.
Standardizing this kind of diagnostical help is a great oppertunity to make life easier for optimization. I’m loving it.

]]>
By: filip007 https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12389 Mon, 31 May 2010 14:53:31 +0000 http://www.geeks3d.com/?p=7152#comment-12389 It’s about time to add some mem info to any bench how hard is that…

]]>
By: JeGX https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12388 Mon, 31 May 2010 14:03:23 +0000 http://www.geeks3d.com/?p=7152#comment-12388 😀

I must say that right now I’m a bit too lazy… I’ll try to update the post with an ATI_meminfo code snippet.

]]>
By: Robin Stjerndorff https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12380 Mon, 31 May 2010 12:57:49 +0000 http://www.geeks3d.com/?p=7152#comment-12380 Would be great with an example of GL_ATI_meminfo as well

]]>
By: [GPU Tool] RADEON-Z 0.1.0: OpenGL Information Utility for ATI Radeon Cards - 3D Tech News, Pixel Hacking, Data Visualization and 3D Programming - Geeks3D.com https://www.geeks3d.com/20100531/programming-tips-how-to-know-the-graphics-memory-size-and-usage-in-opengl/#comment-12377 Mon, 31 May 2010 12:38:34 +0000 http://www.geeks3d.com/?p=7152#comment-12377 […] What? A new GPU tool? Nope my friends, don’t panic, I’m not going to release another GPU tool. The only purpose of RADEON-Z is to illustrate how get the memory size in OpenGL. So if you’re interested by this topic, you can read the tutorial about memory information in OpenGL: [PROGRAMMING TIPS] How to Know the Graphics Memory Size and Usage In OpenGL. […]

]]>