# OpenGL ES 2.0 Context GPU Load

**URL:** <https://forums.imgtec.com/t/opengl-es-2-0-context-gpu-load/2060>\
**Category:** PowerVR Insider\
**Tags:** pvrtune, pvrtrace\
**Created:** [April 30, 2014, 12:01pm UTC](https://forums.imgtec.com/t/opengl-es-2-0-context-gpu-load/2060 "2014-04-30T12:01:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samiullah-khawaja](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@samiullah-khawaja](https://forums.imgtec.com/u/samiullah-khawaja)\
**Post date:** [April 30, 2014, 12:01pm UTC](https://forums.imgtec.com/t/opengl-es-2-0-context-gpu-load/2060/1 "2014-04-30T12:01:48Z")

</div>

Hi,  
  
  
  
I am trying to calculate the GPU time each OpenGL context takes. I am trying to do this for omap5 SGX GPU. For this I am looking into the omapdrm-pvr kernel module.  
  
  
  
I have done some exploration and it seems that the module sends a command queue to the GPU and tells the GPU to start working by giving it a kick command. When the GPU is done with the work it gives a MISR to the module telling that work is complete.  
  
  
  
Now I can calculate the KICK and MISR to calculate the overall GPU load but how can I calculate it for individual OpenGL Contexts.  
  
  
  
Is there any help I can get regarding this here as omap5 SGX driver follows the linux drm architecture.  
  
  
  
Thanks,

---

<div class="post-metadata">

**Author:** ![JoeDavis](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/joedavis/32/71_2.png) [@JoeDavis](https://forums.imgtec.com/u/JoeDavis)\
**Post date:** [May 2, 2014, 2:37pm UTC](https://forums.imgtec.com/t/opengl-es-2-0-context-gpu-load/2060/2 "2014-05-02T14:37:33Z")

</div>

Hi,  
  
  
  
The support we provide is at application level, so we will only be able to give you limited assistance with driver level work like this. It’s worth noting that OpenGL ES contexts do not map directly to GPU contexts. The driver serializes work before it is submitted, as the GPU has one rendering context per-PID.  
  
  
  
Unless you have a specific reason for writing your own tool, I would recommend using our [PVRTune profiler](https://www.imgcommunity.local/developers/powervr/tools/pvrtune/) instead of modifying the driver kernel. PVRTune gives timing data per-PID and it can also capture the time spent processing API calls per OpenGL ES context on the CPU (this requires installing and configuring our PVRTrace libraries. Our docuementation explains the process).  
  
  
  
Thanks,  
  
Joe
