Query total & available GPU memory

I’m looking for a GL extension supported by ImgTec to query the total and available (unallocated) amount of GPU memory. Does it exist? Bonus points if it lets you query how many bytes of GPU memory are tied up with managing “ghosts”!

What I’m looking for is along the lines of:

  • NVX_gpu_memory_info or
  • ATI_meminfo.

We could use this to determine:

  1. what use cases cause GPU memory consumption to increase,
  2. what the current consumption is [cross-system], and
  3. help pin down use cases where the PowerVR driver is ghosting textures.

BACKGROUND: Our system’s GPU memory is being exceeded, again. There are multiple independent programs running on this system utilizing the PowerVR GPU. These applications are written by separate companies which don’t share source code. We need a way to troubleshoot these kind of problems quickly when they arise. The requested extension would provide that. For instance: Disable program X – observe available GPU memory. Enable program X – observe available GPU memory. Try use case X, observe available GPU memory.

Even if there were only one application on the system utilizing the GPU (ours) and we instrumented that application to estimate current GPU memory consumed (in buffers, textures, etc.), that still doesn’t cut it. The GPU driver will be consuming more memory than our estimates. For instance, ghosting many megabytes of memory due to application code poorly optimized for tile-based deferred GPUs, substituting alternate internal texture or renderbuffer formats under-the-hood, creating parameter buffers and other driver-internal buffers for its own uses which consume additional GPU memory.

Thanks!

I agree this would be a useful addition.

Many of our platforms are UMA based which adds some complication to reporting a ‘true’ remaining memory figure. This doesn’t exclude offering some of the information you mention.

I will discuss with the relevant teams what could be provided. At this point we cannot give any assurance as to when or if this will be implemented.

Thank you for the feedback, we really appreciate it!

1 Like

Thank you, Paul!

Are there any news on this topic?

Hello,

No, we do not have any extension to track drivers memory allocation (and no plans to add more extensions to OpenGL ES) but this data is now accessible through PVRTune Complete (under NDA). Requires at least drivers v1.10.

Regards.

Carlos.

1 Like

Which Counter shows the allocated memory? I can find only counters regarding the memory bandwidth.

Hi Frank,

It is not that straightforward. You need to enable “Client API OpenGL ES” and “Client Memory Tracking”, and a per-PID counter called “GLES Device Memory Usage” should appear in the counter table.

For the API agnostic host memory tracking you need to enable “Host Info”. You should see a global counter called “Host Total Memory Usage” and a per-PID called “Host Graphics Memory Usage” in the counter table.

If you cannot see these options in PVRTune your version is too old or you are not using the Complete version. If you enable these options but the counters do not show up, the drivers on your platform are probably too old.

Regards.

Carlos.