Documentation ¶
Overview ¶
Package replay is used to issue replay requests to replay devices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Events struct { // OnReplay is called when a replay batch is sent to a device. OnReplay func(bind.Device, Intent, Config) }
Events holds a number of callback functions that can be used to monitor replay activity.
Functions ¶
Types ¶
type Config ¶
type Config interface{}
Config is a user-defined type used to describe the type of replay being requested. Replay requests made with configs that have equality (==) will likely be batched into the same replay pass. Configs can be used to force requests into different replay passes. For example, by issuing requests with different configs we can prevent a profiling Request from being issued in the same pass as a Request to render all draw calls in wireframe.
type Custom ¶
type Custom struct { T uint64 // The thread ID F func(ctx context.Context, s *api.State, b *builder.Builder) error }
Custom is a command issuing custom replay operations to the replay builder b upon Replay().
type Generator ¶
type Generator interface { // Replay is called when a replay pass is ready to be sent to the replay // device. Replay may filter or transform the list of atoms, satisfying all // the specified requests and config, before outputting the final atom stream // to out. Replay( ctx context.Context, intent Intent, cfg Config, requests []RequestAndResult, device *device.Instance, capture *capture.Capture, out transform.Writer) error }
Generator is the interface for types that support replay generation.
type Intent ¶
type Intent struct { Device *path.Device // The path to the device being used for replay. Capture *path.Capture // The path to the capture that is being replayed. }
Intent describes the source capture and replay target information used for issuing a replay request.
type Issue ¶
type Issue struct { Command api.CmdID // The command that reported the issue. Severity service.Severity // The severity of the issue. Error error // The issue's error. }
Issue represents a single replay issue reported by QueryIssues.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is used discover replay devices and to send replay requests to those discovered devices.
func GetManager ¶
GetManager retrieves the manager from a context previously annotated by PutManager.
func (*Manager) Replay ¶
func (m *Manager) Replay( ctx context.Context, intent Intent, cfg Config, req Request, generator Generator, hints *service.UsageHints) (val interface{}, err error)
Replay requests that req is to be performed on the device described by intent, using the capture described by intent. Replay requests made with configs that have equality (==) will likely be batched into the same replay pass.
type QueryFramebufferAttachment ¶
type QueryFramebufferAttachment interface { QueryFramebufferAttachment( ctx context.Context, intent Intent, mgr *Manager, after []uint64, width, height uint32, attachment api.FramebufferAttachment, framebufferIndex uint32, wireframeMode WireframeMode, hints *service.UsageHints) (*image.Data, error) }
QueryFramebufferAttachment is the interface implemented by types that can return the content of a framebuffer attachment at a particular point in a capture.
type QueryIssues ¶
type QueryIssues interface { QueryIssues( ctx context.Context, intent Intent, mgr *Manager, hints *service.UsageHints) ([]Issue, error) }
QueryIssues is the interface implemented by types that can verify the replay performs as expected and without errors. If the capture includes FramebufferObservation atoms, this also includes checking the replayed framebuffer matches (within reasonable error) the framebuffer observed at capture time.
type Request ¶
type Request interface{}
Request is a user-defined type that holds information relevant to a single replay request. An example Request would be one that informs ReplayTransforms to insert a postback of the currently bound render-target content at a specific atom.
type RequestAndResult ¶
RequestAndResult is a pair of Request and Result.
type Result ¶
type Result func(val interface{}, err error)
Result is the function called for the result of a request. One of val and err must be nil.
type Support ¶
type Support interface { // GetReplayPriority returns a uint32 representing the preference for // replaying this trace on the given device. // A lower number represents a higher priority, and Zero represents // an inability for the trace to be replayed on the given device. GetReplayPriority(context.Context, *device.Instance, *device.MemoryLayout) uint32 }
Support is the optional interface implemented by APIs that can describe replay support for particular devices and device types.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package asm contains high-level instructions to control the replay virtual machine.
|
Package asm contains high-level instructions to control the replay virtual machine. |
Package builder contains the Builder type to build replay payloads.
|
Package builder contains the Builder type to build replay payloads. |
Package devices contains functions for gathering devices that can replay a capture.
|
Package devices contains functions for gathering devices that can replay a capture. |
Package executor contains the Execute function for sending a replay to a device.
|
Package executor contains the Execute function for sending a replay to a device. |
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. |
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. |
Package value contains the value types used by the replay virtual machine.
|
Package value contains the value types used by the replay virtual machine. |