Is it possible to use GPUPerfAPI for retrieving the graphics memory utilization at run time? I am trying to use OpenGL's glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, param) but new AMD drivers do not seem to support.
What else can be done for querying Graphics memory utilization on AMD GPUs runtime?
Did you find a sollution for querying the GPU memory usage? I will add it to Open Hardware Monitor. But I can't find any information about iT.
I have posted the AMD GPU memoru usage issue quite a few places, but unfortunately nobody have replied yet. But it looks like confirmed that ATI technologies do not support OpenGL's glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, param) as their Driver model has changed. The above OpenGl APIs work fine in XP & old drivers. Anyway I am aware that the memory retrieved shall not be very accurate but at least it should give some help as to the memory usage, so that we can load The GPU accordingly. I checked GPUPerfAPi,AGS library etc from AMD but to no success. Even IDirect3DDevice9::GetAvailableTextureMem() gives a constant value (maybe that is expected).
Thus, U need to look at few unconventional routines to query runtime memory usage:
Try searching about D3DKMTQueryStatistics which is available under windows 7 onwards. Its rather undocumented, but I have the impression that some Apps like GPU-Z, ProcessExplorer, Skrim Performance Monitor use it to show memory usage on AMD.
Also there is a open source code called radeontop-master but it is for Linux. It can be good if somebody converts for Windows.
Please post your analysis if any.
Also please comment if this was an useful reply.
Gpu-Z and ProcessExplorerer does use something to query the GPU memory.
For GPu-z I have found a service that can read the shared memory.
But you need to start PGU-Z for it.
I will let you know if i found some way to query the GPU memory.
As i told in my earlier post D3DKMTQueryStatistics is the way (as of now) to get memory utilization on a GPU (Both NVIDIA/ATI). As a matter of fact it gives exactly the same memory utilization as GPU-Z.
Some suggestion on how to proceed:
Google gfxWindowsPlatform.cpp (its a cpp file in Mozilla source code). There is a method as: CollectReports(nsIMemoryReporterCallback* aCb, nsISupports* aClosure, bool aAnonymize) which has code for GPU usage at runtime using D3DKMTQueryStatistics.
You can use that code in your own sample App to verify.
Piyushm1 tnx a lot. I will try to input it in Open Hardware Monitor this weekend.
The link for querying the gpu memory is:
If someone has a working test example with it can always share it with us.
This makes it faster to implement it . I will also share my example if I got one.