Top Related Projects
A collection of tools, libraries, and tests for Vulkan shader compilation.
Quick Overview
GAPID (Graphics API Debugger) is an open-source tool developed by Google for capturing, inspecting, and replaying Android OpenGL ES and Vulkan applications. It provides developers with powerful debugging and analysis capabilities for graphics applications, helping to identify and resolve performance issues and rendering bugs.
Pros
- Comprehensive graphics debugging for Android OpenGL ES and Vulkan applications
- Detailed frame analysis and performance profiling capabilities
- Cross-platform support (Windows, macOS, and Linux)
- Intuitive user interface for easy navigation and inspection of captured data
Cons
- Steep learning curve for new users due to the complexity of graphics debugging
- Limited documentation and community support compared to some other debugging tools
- Occasional stability issues reported by some users
- Primarily focused on Android, with limited support for other platforms
Getting Started
To get started with GAPID:
- Download the latest release from the GAPID GitHub releases page.
- Install GAPID on your development machine.
- Connect your Android device or set up an emulator.
- Launch GAPID and select your target application.
- Capture a trace of your application's graphics calls.
- Analyze the captured data using GAPID's various tools and views.
For more detailed instructions, refer to the GAPID user guide in the repository.
Competitor Comparisons
Pros of SPIRV-Tools
- Focused specifically on SPIR-V tooling and optimization
- Widely adopted in the graphics industry
- Actively maintained by Khronos Group, the creators of SPIR-V
Cons of SPIRV-Tools
- Limited to SPIR-V-related tasks
- Requires more integration work for full graphics debugging
- Less user-friendly for non-experts in SPIR-V
Code Comparison
SPIRV-Tools (C++):
spv_result_t SPIRVToText(const uint32_t* binary,
const size_t binary_size,
std::string* text) {
spv_context context = spvContextCreate(SPV_ENV_UNIVERSAL_1_0);
spv_text spvText;
spv_result_t result = spvBinaryToText(context, binary, binary_size,
SPV_BINARY_TO_TEXT_OPTION_NONE,
&spvText, nullptr);
*text = spvText->str;
spvTextDestroy(spvText);
spvContextDestroy(context);
return result;
}
GAPID (Go):
func (c *Capture) GetCommands(ctx context.Context) ([]*api.Cmd, error) {
cmds := make([]*api.Cmd, 0, c.NumCommands)
for i := uint64(0); i < c.NumCommands; i++ {
cmd, err := c.Command(ctx, i)
if err != nil {
return nil, err
}
cmds = append(cmds, cmd)
}
return cmds, nil
}
Summary
SPIRV-Tools is a specialized toolkit for SPIR-V processing, while GAPID is a more comprehensive graphics API debugger. SPIRV-Tools offers deeper SPIR-V capabilities but has a narrower focus, whereas GAPID provides broader graphics debugging features at the cost of less specialized SPIR-V handling.
A collection of tools, libraries, and tests for Vulkan shader compilation.
Pros of shaderc
- Focused specifically on shader compilation, making it more lightweight and specialized
- Supports multiple shader languages (GLSL, HLSL) and can compile to SPIR-V
- Easier integration into existing graphics pipelines due to its targeted functionality
Cons of shaderc
- Limited to shader compilation, lacking the broader graphics debugging capabilities of GAPID
- Less comprehensive documentation and community support compared to GAPID
- Requires additional tools for full graphics analysis and debugging workflows
Code Comparison
GAPID (Go):
func (c *Client) Capture(ctx context.Context, device *path.Device, start task.Signal, stop task.Signal, options *service.CaptureOptions) (*path.Capture, error) {
// Capture implementation
}
shaderc (C++):
shaderc::CompileOptions options;
shaderc::Compiler compiler;
shaderc::SpvCompilationResult result = compiler.CompileGlslToSpv(
shader_source, shader_kind, input_file_name, options);
Summary
GAPID is a comprehensive graphics debugging tool, while shaderc focuses solely on shader compilation. shaderc offers more specialized functionality for shader processing, making it easier to integrate into existing graphics pipelines. However, GAPID provides a broader range of features for graphics analysis and debugging, which may be more suitable for complex graphics development projects.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
GAPID: Graphics API Debugger
Maintenance Mode
GAPID is not currently under active development. Issues filed against this repo might not be answered.
For Android GPU debugging and profiling, please use AGI which is based on GAPID.
Downloads
Download the latest version of GAPID here.
Unstable developer releases are here.
Documentation
User documentation can be found at gapid.dev
The developer documentation contains some hints for GAPID developers. See also the README files under some source directories.
About
GAPID is a collection of tools that allows you to inspect, tweak and replay calls from an application to a graphics driver.
GAPID can trace any Android debuggable application, or if you have root access to the device any application can be traced. GAPID can also trace any desktop Vulkan application.
Building
See Building GAPID.
Running the client
After building GAPID, you can run the client from <gapid-root>/bazel-bin/pkg/gapid
.
Command-Line Interface
GAPID exposes most of its functionality via a CLI gapit. You can find auto-generated documentation here.
Project Structure
GAPID consists of the following sub-components:
gapii
: Graphics API Interceptor
A layer that sits between the application / game and the GPU driver, recording all the calls and memory accesses.
gapis
: Graphics API Server
A process that analyses capture streams reporting incorrect API usage, processes the data for replay on various target devices, and provides an RPC interface to the client.
gapir
: Graphics API Replay daemon
A stack-based VM used to playback capture files, imitating the original applicationâs / game's calls to the GPU driver. Supports read-back of any buffer / framebuffer, and provides profiling functionality.
gapic
: Graphics API Client
The frontend user interface application. Provides visual inspection of the capture data, memory, resources, and frame-buffer content.
gapil
: Graphics API Language
A new domain specific language to describe a graphics API in its entirety. Combined with our template system to generate huge parts of the interceptor, server and replay systems.
Top Related Projects
A collection of tools, libraries, and tests for Vulkan shader compilation.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot