gapid

module
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2019 License: Apache-2.0

README

GAPID: Graphics API Debugger

GoDoc Gitter Linux Linux Build Status MacOS MacOS Build Status Windows Windows Build Status

Downloads

Download the latest version of GAPID 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.

Screenshot 1 Screenshot 2
Screenshot 3 Screenshot 4

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.

Directories

Path Synopsis
cmd
apic
Package format registers and implements the "format" apic command.
Package format registers and implements the "format" apic command.
embed
The embed command is used to embed text files into Go executables as strings.
The embed command is used to embed text files into Go executables as strings.
enum_lookup
The enum_lookup command parses its parameters as decimal and/or hex ints and then prints out all the API enums with that value.
The enum_lookup command parses its parameters as decimal and/or hex ints and then prints out all the API enums with that value.
gapid
The gapid command launches the GAPID UI.
The gapid command launches the GAPID UI.
gofuse
gofuse is a utility program to help go tools work with bazel generated files.
gofuse is a utility program to help go tools work with bazel generated files.
linearize_trace
The linearize_trace command takes a trace that has an initial state, and converts it to a trace that is prefixed with all of the commands needed to reset the state in that trace.
The linearize_trace command takes a trace that has an initial state, and converts it to a trace that is prefixed with all of the commands needed to reset the state in that trace.
lingo
The syntax command is used to rewrite recursive descent parser syntax declaration files.
The syntax command is used to rewrite recursive descent parser syntax declaration files.
llvm-build
Command llvm-build generates bazel build rules for the LLVM dependency.
Command llvm-build generates bazel build rules for the LLVM dependency.
make-debuggable
Command make-debuggable takes an apk and makes it debuggable, saving it to a different path.
Command make-debuggable takes an apk and makes it debuggable, saving it to a different path.
regres
Regress is a tool to display build and runtime statistics over a range of changelists.
Regress is a tool to display build and runtime statistics over a range of changelists.
shadertool
The shadertool command modifies shader source code.
The shadertool command modifies shader source code.
smoketests
The smoketests command runs a series of smoke tests.
The smoketests command runs a series of smoke tests.
core
app
Package app provides an opinionated common infrastructure to application structure.
Package app provides an opinionated common infrastructure to application structure.
app/analytics/param
Package param holds Google Analytics parameter names.
Package param holds Google Analytics parameter names.
app/auth
Package auth provides simple token based, stream authorization functions.
Package auth provides simple token based, stream authorization functions.
app/benchmark
Package benchmark provides benchmarking facilities to the standard application system.
Package benchmark provides benchmarking facilities to the standard application system.
app/crash
Package crash provides functions for reporting application crashes (uncaught panics).
Package crash provides functions for reporting application crashes (uncaught panics).
app/flags
Package flag provides extended support for flag parsing.
Package flag provides extended support for flag parsing.
app/layout
Package layout is used to find parts of the application package to load or run.
Package layout is used to find parts of the application package to load or run.
app/linker
Package linker provides functions for findings addresses of app functions by name.
Package linker provides functions for findings addresses of app functions by name.
app/status
Package status provides methods for reporting application status.
Package status provides methods for reporting application status.
codegen
Package codegen provides an interface for code generation using LLVM.
Package codegen provides an interface for code generation using LLVM.
codegen/call
Package call provides methods for invoking C function pointers.
Package call provides methods for invoking C function pointers.
context/keys
Package keys holds code for managing the set of common keys in a context.
Package keys holds code for managing the set of common keys in a context.
data/compare
Package compare has utilities for comparing values.
Package compare has utilities for comparing values.
data/deep
Package deep provides reflection based methods for copying and cloning structs.
Package deep provides reflection based methods for copying and cloning structs.
data/dictionary
Package dictionary provides utilities for operating on map-like types.
Package dictionary provides utilities for operating on map-like types.
data/endian
Package endian implements binary.Reader and binary.Writer for reading / writing simple primivite types from a binary source.
Package endian implements binary.Reader and binary.Writer for reading / writing simple primivite types from a binary source.
data/generic
Package generic provides methods to test whether a type conforms to a generic interface.
Package generic provides methods to test whether a type conforms to a generic interface.
data/id
Package id provides types and functions for generation of identifiers.
Package id provides types and functions for generation of identifiers.
data/pack
Package pack provides methods to deal with self describing files of proto data.
Package pack provides methods to deal with self describing files of proto data.
data/pod
Package pod provides types and functions for dealing with simple structured objects.
Package pod provides types and functions for dealing with simple structured objects.
data/protoconv
Package protoconv provides a mechanism to register functions to convert objects to and from proto messages.
Package protoconv provides a mechanism to register functions to convert objects to and from proto messages.
data/protoutil
Package protoutil adds some helpers that makes using protobuf structures a little easier.
Package protoutil adds some helpers that makes using protobuf structures a little easier.
data/protoutil/testprotos
Package testprotos provides some proto messages that can be used for tests.
Package testprotos provides some proto messages that can be used for tests.
data/slice
Package slice provides utilities for mutating generic slices.
Package slice provides utilities for mutating generic slices.
event
Package event is a library to support event producers and handlers.
Package event is a library to support event producers and handlers.
event/task
Package task contains types that can be used to create cancelable tasks.
Package task contains types that can be used to create cancelable tasks.
fault
Package fault holds common error handling types, code and values.
Package fault holds common error handling types, code and values.
fault/stacktrace
Package stacktrace has functionality for capturing and printing stack traces.
Package stacktrace has functionality for capturing and printing stack traces.
fault/stacktrace/crunch
Package crunch provides functions to compress and decompress stacktraces.
Package crunch provides functions to compress and decompress stacktraces.
git
Package git provides handling for the git source control system.
Package git provides handling for the git source control system.
image
Package image provides functions for converting between various image formats.
Package image provides functions for converting between various image formats.
image/astc
Package astc implements ASTC texture decompression.
Package astc implements ASTC texture decompression.
java/jdbg
Package jdbg provides a simpler interface to the jdwp package, offering simple type resolving and method invoking functions.
Package jdbg provides a simpler interface to the jdwp package, offering simple type resolving and method invoking functions.
java/jdwp
Package jdwp implements types to communicate using the the Java Debug Wire Protocol.
Package jdwp implements types to communicate using the the Java Debug Wire Protocol.
langsvr
Package langsvr provides a simple interface to implement a language server.
Package langsvr provides a simple interface to implement a language server.
langsvr/protocol
Package protocol implements the language server protocol.
Package protocol implements the language server protocol.
log
math/f16
Package f16 is a basic math library for 16 bit floating point numbers.
Package f16 is a basic math library for 16 bit floating point numbers.
math/f32
Package f32 is a basic math library for float32.
Package f32 is a basic math library for float32.
math/f64
Package f64 is a basic math library for float64.
Package f64 is a basic math library for float64.
math/interval
Package interval implements algorithms that operate on lists of intervals.
Package interval implements algorithms that operate on lists of intervals.
math/sint
Package sint is a basic math library for int.
Package sint is a basic math library for int.
math/u32
Package u32 is a basic math library for uint32.
Package u32 is a basic math library for uint32.
math/u64
Package u64 is a basic math library for uint64.
Package u64 is a basic math library for uint64.
memory/arena
Package arena implements a memory arena.
Package arena implements a memory arena.
net
net/grpcutil
Package grpcutil adds some helpers that make writing grpc servers and clients a little easier.
Package grpcutil adds some helpers that make writing grpc servers and clients a little easier.
os/android
Package android contains support for dealing with android devices.
Package android contains support for dealing with android devices.
os/android/adb
Package adb provides an interface to the Android Debug Bridge.
Package adb provides an interface to the Android Debug Bridge.
os/android/apk
Package apk provides methods to get information (e.g.
Package apk provides methods to get information (e.g.
os/android/binaryxml
Package binaryxml is a package for dealing with the binary format of the android manifest.
Package binaryxml is a package for dealing with the binary format of the android manifest.
os/android/manifest
Package manifest supports reading and changing the android manifest xml file.
Package manifest supports reading and changing the android manifest xml file.
os/device
Package device contains code for describing both the software and hardware of computing devices.
Package device contains code for describing both the software and hardware of computing devices.
os/device/bind
Package bind contains code for binding to and controlling devices.
Package bind contains code for binding to and controlling devices.
os/device/ggp
Package ggp contains code for binding to and controlling Stadia gamelets.
Package ggp contains code for binding to and controlling Stadia gamelets.
os/file
Package file is a package for dealing with strongly typed paths and files in an OS agnostic manner.
Package file is a package for dealing with strongly typed paths and files in an OS agnostic manner.
os/flock
Package flock has helper code for managing inter-processes locks through temporary files.
Package flock has helper code for managing inter-processes locks through temporary files.
os/process
Package process has helper code for managing server processes and connections to them.
Package process has helper code for managing server processes and connections to them.
os/shell
Package shell provides facilities for executing commands on various targets.
Package shell provides facilities for executing commands on various targets.
os/shell/stub
Package stub has implementations of the shell package intended for use in tests where launching an external process is undesirable.
Package stub has implementations of the shell package intended for use in tests where launching an external process is undesirable.
stream
Package stream contains types that fully describe streams of data.
Package stream contains types that fully describe streams of data.
stream/fmts
Package fmts contains a number of standard stream formats.
Package fmts contains a number of standard stream formats.
text
Package text provides common text handling capabilities.
Package text provides common text handling capabilities.
text/cases
Package cases contains functions for Maping strings between various cases (snake, pascal, etc).
Package cases contains functions for Maping strings between various cases (snake, pascal, etc).
text/parse
Package parse provides support functionality for writing scannerless parsers.
Package parse provides support functionality for writing scannerless parsers.
text/reflow
Package reflow supports rewriting the whitespace in a stream of runes.
Package reflow supports rewriting the whitespace in a stream of runes.
video
Package video contains go-wrappers around the 'avconv' and 'ffmpeg' executables for generating videos from images.
Package video contains go-wrappers around the 'avconv' and 'ffmpeg' executables for generating videos from images.
vulkan/loader
Package loader contains utilities for setting up the Vulkan loader.
Package loader contains utilities for setting up the Vulkan loader.
Package gapidapk holds functions relating to the GAPID Android APK.
Package gapidapk holds functions relating to the GAPID Android APK.
pkginfo
Package pkginfo contains support for dealing with package manager information.
Package pkginfo contains support for dealing with package manager information.
gapii
client
Package client provides functions for launching and communicating with the gapii tracer.
Package client provides functions for launching and communicating with the gapii tracer.
Package gapil holds the main interface to the api language libraries.
Package gapil holds the main interface to the api language libraries.
analysis
Package analysis performs static program data flow analysis of an API file.
Package analysis performs static program data flow analysis of an API file.
ast
Package ast holds the set of types used in the abstract syntax tree representation of the api language.
Package ast holds the set of types used in the abstract syntax tree representation of the api language.
bapi
Package bapi exposes functions for serializing and deserializing resolved APIs.
Package bapi exposes functions for serializing and deserializing resolved APIs.
compiler
Package compiler implements the core gapil language compiler.
Package compiler implements the core gapil language compiler.
compiler/mangling
Package mangling exposes a minimal collection of types used to build mangled strings using any of the sub-packages.
Package mangling exposes a minimal collection of types used to build mangled strings using any of the sub-packages.
compiler/mangling/c
Package c implements a basic symbol mangling for that is compatible with C.
Package c implements a basic symbol mangling for that is compatible with C.
compiler/mangling/ia64
Package ia64 implements a subset of the symbol mangling for the itanium ABI (standard for GCC).
Package ia64 implements a subset of the symbol mangling for the itanium ABI (standard for GCC).
compiler/plugins/cloner
Package cloner is a plugin for the gapil compiler to generate deep clone functions for reference types, maps and commands.
Package cloner is a plugin for the gapil compiler to generate deep clone functions for reference types, maps and commands.
compiler/plugins/encoder
Package encoder is a plugin for the gapil compiler to generate command and state encode functions.
Package encoder is a plugin for the gapil compiler to generate command and state encode functions.
compiler/plugins/encoder/test/encoder_pb
Package encoder_pb describes the serialization format for the serialzation test api.
Package encoder_pb describes the serialization format for the serialzation test api.
compiler/plugins/replay
Package replay is a plugin for the gapil compiler to generate replay streams for commands.
Package replay is a plugin for the gapil compiler to generate replay streams for commands.
compiler/testutils
Package testutils implements reusable helpers for writing compiler tests.
Package testutils implements reusable helpers for writing compiler tests.
constset
Package constset provides structures for storing large numbers of value-string pairs efficently.
Package constset provides structures for storing large numbers of value-string pairs efficently.
executor
Package executor provides an interface for executing compiled API programs.
Package executor provides an interface for executing compiled API programs.
format
Package format registers and implements the "format" apic command.
Package format registers and implements the "format" apic command.
langsvr
The langsvr command implements a language server for the graphics API language.
The langsvr command implements a language server for the graphics API language.
parser
Package parser implements a parser for converting the api language into abstract syntax trees.
Package parser implements a parser for converting the api language into abstract syntax trees.
resolver
Package resolver implements a semantic resolving for the api language.
Package resolver implements a semantic resolving for the api language.
semantic
Package semantic holds the set of types used in the abstract semantic graph representation of the api language.
Package semantic holds the set of types used in the abstract semantic graph representation of the api language.
semantic/printer
Package printer provides a human-readable printer for the semantic tree nodes.
Package printer provides a human-readable printer for the semantic tree nodes.
serialization
Package serialization contains constants and utility methods used to serialize .gfxtrace files.
Package serialization contains constants and utility methods used to serialize .gfxtrace files.
validate
Package validate registers and implements the "validate" apic command.
Package validate registers and implements the "validate" apic command.
Package gapir provides the gapir API.
Package gapir provides the gapir API.
client
Package client provides helper methods and types for communicating with the GAPIR service.
Package client provides helper methods and types for communicating with the GAPIR service.
gapis
api
Package api exposes the shared behavior of all graphics api's.
Package api exposes the shared behavior of all graphics api's.
api/all
Package all is used to import all known api APIs for their side effects.
Package all is used to import all known api APIs for their side effects.
api/gles
Package gles implementes the API interface for the OpenGL ES graphics library.
Package gles implementes the API interface for the OpenGL ES graphics library.
api/gles/gles_pb
Package gles_pb describes the serialization format for the gles api.
Package gles_pb describes the serialization format for the gles api.
api/gvr
Package gvr implementes the API interface for the Google VR library.
Package gvr implementes the API interface for the Google VR library.
api/gvr/gvr_pb
Package gvr_pb describes the serialization format for the gvr api.
Package gvr_pb describes the serialization format for the gvr api.
api/sync
Package sync provides interfaces for managing externally synchronized APIs.
Package sync provides interfaces for managing externally synchronized APIs.
api/test
Package test is the integration test suite for the api compiler and templates.
Package test is the integration test suite for the api compiler and templates.
api/test/test_pb
Package test_pb describes the serialization format for the test api.
Package test_pb describes the serialization format for the test api.
api/transform
Package transform provides transforms on commands.
Package transform provides transforms on commands.
api/vulkan
Package vulkan implementes the API interface for the Vulkan graphics library.
Package vulkan implementes the API interface for the Vulkan graphics library.
api/vulkan/vulkan_pb
Package vulkan_pb describes the serialization format for the vulkan api.
Package vulkan_pb describes the serialization format for the vulkan api.
capture
Package capture contains all the core GAPIS functionality for dealing with loaded captures.
Package capture contains all the core GAPIS functionality for dealing with loaded captures.
client
Package client provides helper methods and types for communicating with the GAPIS service.
Package client provides helper methods and types for communicating with the GAPIS service.
config
Package config contains a list of build configuration flags.
Package config contains a list of build configuration flags.
database
Package database implements the persistence layer for the gpu debugger tools.
Package database implements the persistence layer for the gpu debugger tools.
extensions
Package extensions provides extension functionality to GAPIS.
Package extensions provides extension functionality to GAPIS.
extensions/unity
Package unity provides GAPIS extensions that handle Unity engine features.
Package unity provides GAPIS extensions that handle Unity engine features.
memory
Package memory contains types used for representing and simulating memory observed in the capture.
Package memory contains types used for representing and simulating memory observed in the capture.
memory/memory_pb
Package memory_pb describes the serialization format for the memory package.
Package memory_pb describes the serialization format for the memory package.
messages
Package messages holds the set of translated gapis user visible strings.
Package messages holds the set of translated gapis user visible strings.
perfetto
Package perfetto provides functionality to take and examine Perfetto traces.
Package perfetto provides functionality to take and examine Perfetto traces.
perfetto/android
Package android contains the android specific Perfetto tracing code.
Package android contains the android specific Perfetto tracing code.
perfetto/desktop
Package desktop contains the desktop specific Perfetto tracing code.
Package desktop contains the desktop specific Perfetto tracing code.
replay
Package replay is used to issue replay requests to replay devices.
Package replay is used to issue replay requests to replay devices.
replay/asm
Package asm contains high-level instructions to control the replay virtual machine.
Package asm contains high-level instructions to control the replay virtual machine.
replay/builder
Package builder contains the Builder type to build replay payloads.
Package builder contains the Builder type to build replay payloads.
replay/devices
Package devices contains functions for gathering devices that can replay a capture.
Package devices contains functions for gathering devices that can replay a capture.
replay/opcode
Package opcode holds all the opcodes that are to be interpreted by the replay virtual machine.
Package opcode holds all the opcodes that are to be interpreted by the replay virtual machine.
replay/protocol
Package protocol contains the constants and types used to communicate with the replay system and its virtual-machine interpreter.
Package protocol contains the constants and types used to communicate with the replay system and its virtual-machine interpreter.
replay/value
Package value contains the value types used by the replay virtual machine.
Package value contains the value types used by the replay virtual machine.
resolve
Package resolve exposes functions for performing complex data queries.
Package resolve exposes functions for performing complex data queries.
resolve/cmdgrouper
Package cmdgrouper provides types for grouping together commands.
Package cmdgrouper provides types for grouping together commands.
server
Package server implements the rpc gpu debugger service, queriable by the clients, along with some helpers exposed via an http listener.
Package server implements the rpc gpu debugger service, queriable by the clients, along with some helpers exposed via an http listener.
service
Package service is the definition of the RPC GPU debugger service exposed by the server.
Package service is the definition of the RPC GPU debugger service exposed by the server.
service/path
Package path contains types that represent data references.
Package path contains types that represent data references.
shadertools
Package shadertools wraps around external C code for manipulating shaders.
Package shadertools wraps around external C code for manipulating shaders.
stringtable/minidown
Package minidown is a minimal-feature subset of the markdown language.
Package minidown is a minimal-feature subset of the markdown language.
stringtable/minidown/node
Package node holds the syntax tree nodes for a parse minidown document.
Package node holds the syntax tree nodes for a parse minidown document.
stringtable/minidown/parser
Package parser implements the minidown parser.
Package parser implements the minidown parser.
stringtable/minidown/scanner
Package scanner implements the minidown token scanner.
Package scanner implements the minidown token scanner.
stringtable/minidown/token
Package token holds the tokens generated my the minidown scanner.
Package token holds the tokens generated my the minidown scanner.
test
integration/gles/replay
Package replay contains the OpenGL ES integration tests with the replay system.
Package replay contains the OpenGL ES integration tests with the replay system.
integration/gles/snippets
Package snippets exposes functions for building simple GLES command streams.
Package snippets exposes functions for building simple GLES command streams.
integration/replay
Package replay contains the integration tests with the replay system.
Package replay contains the integration tests with the replay system.
integration/service
Package service provides GAPIS service integration tests.
Package service provides GAPIS service integration tests.
robot/build
Package build holds build package and artifact managment for robot.
Package build holds build package and artifact managment for robot.
robot/job
Package job holds code for managing task execution in robot.
Package job holds code for managing task execution in robot.
robot/job/worker
Package worker is a set of helpers for implementing common features of robot workers (see package job for more information about what a worker is).
Package worker is a set of helpers for implementing common features of robot workers (see package job for more information about what a worker is).
robot/lingo/generator
Package generator provides the functionality used by the lingo command to add generated parser functionality based on syntactically correct go code.
Package generator provides the functionality used by the lingo command to add generated parser functionality based on syntactically correct go code.
robot/master
Package master holds the code for a master in the robot system.
Package master holds the code for a master in the robot system.
robot/monitor
Package monitor is a helper for keeping a local in memory representation of the key data from some of the robot services.
Package monitor is a helper for keeping a local in memory representation of the key data from some of the robot services.
robot/record
Package record provides funcitonality for sequential storage of types in a variety of serialization formats.
Package record provides funcitonality for sequential storage of types in a variety of serialization formats.
robot/replay
Package replay holds the functionality used to do device replay and comparison video generation for robot.
Package replay holds the functionality used to do device replay and comparison video generation for robot.
robot/report
Package report holds the functionality for running trace reports and verifying correctness of a trace in the robot system.
Package report holds the functionality for running trace reports and verifying correctness of a trace in the robot system.
robot/scheduler
Package scheduler holds the main task scheculing for the robot system.
Package scheduler holds the main task scheculing for the robot system.
robot/search
Package search holds the structures needed to support a generalised query structure suitable for rpc's to a search service.
Package search holds the structures needed to support a generalised query structure suitable for rpc's to a search service.
robot/search/eval
Package eval supplies logic for automatically applying a search query to a set of records.
Package eval supplies logic for automatically applying a search query to a set of records.
robot/search/query
Package query contains helpful code for building structured search queries.
Package query contains helpful code for building structured search queries.
robot/search/script
Package script provides a fairly terse programming language for expressing search queries as strings.
Package script provides a fairly terse programming language for expressing search queries as strings.
robot/stash
Package stash provides the defenition of a service that stores immutable blobs of data keyed by id, and the client helpers for dealing with that service.
Package stash provides the defenition of a service that stores immutable blobs of data keyed by id, and the client helpers for dealing with that service.
robot/stash/grpc
Package grpc provides the client and server support for communicating with a remote stash using grpc.
Package grpc provides the client and server support for communicating with a remote stash using grpc.
robot/stash/local
Package local provides implementations of a stash.Service for local storage.
Package local provides implementations of a stash.Service for local storage.
robot/subject
Package subject holds the code for handling tracable applications in the robot system.
Package subject holds the code for handling tracable applications in the robot system.
robot/trace
Package trace holds the code for taking a capture in the robot system.
Package trace holds the code for taking a capture in the robot system.
robot/web
Package web holds the code for serving the robot web interface.
Package web holds the code for serving the robot web interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL