GAPID supports capturing from both Android devices and Windows/Linux desktop machines. On Android devices, GAPID supports tracing all OpenGL ES and Vulkan calls made by either a pure Java, native or hybrid application. On Windows/Linux desktop machines, GAPID supports tracing Vulkan calls.
Dependencies and prerequisites
Android
- A device running Android Marshmallow 6.0 (or more recent).
- A debuggable application.
- Android SDK installed on the host machine.
- Android hardware device connected through USB.
- The device must have USB debugging enabled and the host machine must be authorized for debugging.
- We recommend to set the “Stay awake” developer option to prevent issues that arise when the device screen sleeps.
- Make sure to stop any program that may interact with the device over ADB, such as Android Studio, while using GAPID.
- The app must NOT report any warning or error when run with Vulkan validation layers.
Windows/Linux
- A Vulkan application compiled with x86-64. 32-bit applications are NOT currently supported.
- The app must NOT report any warning or error when run with Vulkan validation layers.
Taking a capture
Click the Capture Trace...
text in the welcome screen, or click the File
→ Capture Trace
toolbar item to open the trace dialog.
-
From the
Device
drop-down, select the device to trace. -
From the
API
drop-down, select the graphics API you want to trace. -
Using the
...
button, select the Android Activity or browse the application that you want to trace. -
Add any command-line
Arguments
that are necessary for your program. -
Select the
Working Directory
for your program, only valid for tracing on Windows/Linux machines. -
Set the
Environment Variables
for tracing your program, only valid for tracing on Windows/Linux machines. -
If you wish to automatically stop tracing after N frames, then use a non-zero number for
Stop After
. -
If you wish to start tracing as soon as the application is launched, enable the
Trace From Beginning
option. If this option is NOT set, then in the tracing dialog, you must pressStart
to start the capture. Tracing OpenGL ES calls at the middle of the execution of an Android Activity (not from the beginning of the application by disabling this option) is currently an experimental feature. -
Disable Buffering
disables the bufferring of the capture data on the tracing device which will slow down the tracing process. But in case of a crash, more the most recent data will be provided. -
If you would like to erase the package cache before taking the trace, enable the
Clear package cache
option. -
Hide Unknown Extensions
hides the Vulkan extensions not supported by GAPID to the application when tracing Vulkan calls. For GLES calls, it does not do anything. GAPID always hide unknown extensions when tracing OpenGL ES calls. -
If tracing an OpenGL ES application you likely want to keep the
Disable pre-compiled shaders
option enabled. This option fakes no driver support for pre-compiled shaders for OpenGL ES, usually forcing the application to useglShaderSource()
. GAPID is currently unable to replay captures that uses pre-compiled shaders when tracing for OpenGL ES. This option is invalid when tracing Vulkan Calls. -
Select an output directory
-
Select an output file name.
Click OK
to begin the trace.