EGL Resource Profiling Extension

This topic describes the EGL resource profiling extension, which provides a way to retrieve information about GPU resource utilization. UI middleware can use this extension to find out how much memory is being used by the objects created by EGL.

There are two Nokia EGL resource profiling extensions:

  • EGL_NOK_resource_profiling. This extension retrieves data about GPU resource usage level in a synchronous way. EGL client applications can call eglQueryProfilingDataNOK() after eglInitialize() to obtain the current resource profiling information.

  • EGL_NOK_resource_profiling2. This extension is based on the EGL_NOK_resource_profiling extension. EGL_NOK_resource_profiling2 additionally provides asynchronous notification of memory usage changes using resource profiling sync objects. This uses the EGL_KHR_reusable_sync extension.

eglQueryProfilingDataNOK

The eglQueryProfilingDataNOK() extension function retrieves the resource profiling statistics, such as the total amount of graphics memory or the amount of private memory used by a process.

To obtain an extension function, clients call eglGetProcAddress() and pass in the function name.

Process ID

The Symbian platform has an 8-byte (64-bit) process ID. EGLNativeProcessIdTypeNOK is defined as follows:

typedef TUint64 EGLNativeProcessIdTypeNOK;

When the returned profiling data contains the EGL_PROF_PROCESS_ID_NOK attribute, the next two 32-bit data elements encode the Symbian 64-bit procecss ID. EGL Client applications can reconstruct the process ID as follows:

EGLNativeProcessIdTypeNOK processId = ((EGLNativeProcessIdTypeNOK)(data[i]))
                                      +(((EGLNativeProcessIdTypeNOK)(data[i + 1]))<<32);