Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL ES 2.0 debugging [closed]

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?

like image 452
moonshadow Avatar asked Mar 25 '11 12:03

moonshadow


2 Answers

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)
    • Adreno Profiler can trace GL calls with Adreno devices, such as Android with Snapdragon. Nexus One and many devices.
    • It can render GL calls that are executed on the target device.
    • WEBINAR: OPTIMIZE YOUR APP WITH ADRENO PROFILER
  • Tegra (NVIDIA)
    • PerfHUD ES has Frame Debugger as Adreno profiler. It require Tegra Development Kit.
  • Mali (ARM)
    • Mali GPU Performance Analysis Tool. It require Mali device. AFAIK, there are no Mali devices in the consumer market at the moment.

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

like image 191
Kazuki Sakamoto Avatar answered Nov 20 '22 02:11

Kazuki Sakamoto


It's possible in Xcode since version 4.2, c.f. https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_2.html#//apple_ref/doc/uid/00200-SW5

like image 4
Alexis Pribula Avatar answered Nov 20 '22 03:11

Alexis Pribula