OpenGL ES 2.0 debugging

moonshadow picture moonshadow · Mar 25, 2011 · Viewed 13.9k times · Source

So, I have an OpenGL ES 2.0 app. It compiles and runs in the iPhone/iPad simulators, on a real iPhone/iPad, and under Windows using Imgtec's emulator libraries (i.e. PVRVframe).

In said app, I have one particular draw call that results in no pixels written to the target, even though all the state I can query looks sensible (viewport, depth test/stencil test/cull/blend off, framebuffer complete etc), and AFAICT I am submitting sensible vertex data.

What I'm after at this point is a Pix / GPAD - like tool that will let me step through the scene and review state I cannot directly query from OpenGL at the point of the draw call in question (e.g. actual vertex/index buffer content).

Neither PVRTrace nor the OSX instruments appear to capture enough state for debugging this kind of problem. In particular, they do not capture vertex/index buffer or texture data (OSX instruments doesn't capture shader source either).

gDEBugger, previously the answer to this sort of question on Stack Overflow, is now at version 5.8 - it's gone free, which is nice, but no longer supports OpenGL ES 2 (under Windows, no ES2-renderable config is available through EGL; under OSX, there is no way to attach the debugger to an app running either in the simulator or on the real device) - which is not as nice.

Am I missing something obvious? What are my options? How do others debug their scenes?

Answer

Kazuki Sakamoto picture Kazuki Sakamoto · Apr 5, 2011

There are several OpenGL ES 1.1/2.0 debugging tools from GPU vendors. Almost these tools require real device, but Imagination Technologies provides an emulation libraries and a tracing tool which you used. Did you use PVRTrace with PVRVFrame?

  • PowerVR (Imagination Technologies)
    • PVRVFrame is an emulation libraries for OpenGL ES 1.1/2.0 on OpenGL. And GL calls can be traced by PVRTrace with GUI.
    • PVRTrace can also connect with Linux ARMv7 devices.
  • Adreno (Qualcomm)
  • Tegra (NVIDIA)
    • PerfHUD ES has Frame Debugger as Adreno profiler. It require Tegra Development Kit.
  • Mali (ARM)

(I believe that gDEBugger 5.7 is the best tool for debugging OpenGL ES 1.1/2.0. But it is no longer available...)