template <>
class Server
Defined at line 1646 of file fidling/gen/sdk/fidl/fuchsia.gpu.magma/fuchsia.gpu.magma/cpp/fidl/fuchsia.gpu.magma/cpp/natural_messaging.h
Public Methods
void ImportObject (ImportObjectRequest & request, ImportObjectCompleter::Sync & completer)
Imports an object for use in the system driver.
void ReleaseObject (ReleaseObjectRequest & request, ReleaseObjectCompleter::Sync & completer)
Destroys the object with `object_id` within this connection.
void CreateContext (CreateContextRequest & request, CreateContextCompleter::Sync & completer)
Creates context `context_id` for use in command execution. A context may be associated
with hardware state.
DEPRECATED: Please use CreateContext2.
TODO(https://fxbug.dev/413030654): Fully deprecate this API.
void CreateContext2 (CreateContext2Request & request, CreateContext2Completer::Sync & completer)
Creates context `context_id` for use in command execution. A context may be associated
with hardware state.
void DestroyContext (DestroyContextRequest & request, DestroyContextCompleter::Sync & completer)
Destroys context `context_id`.
void ExecuteCommand (ExecuteCommandRequest & request, ExecuteCommandCompleter::Sync & completer)
Submits command buffers for execution on the hardware, with associated `resources`.
`resources` must refer to buffers that have been imported.
`wait_semaphores` and `signal_semaphores` must refer to events that have been imported.
`wait_semaphores` must all be signaled before execution begins, then are reset.
`signal_semaphores` will be signaled after the command buffer is completed.
void ExecuteInlineCommands (ExecuteInlineCommandsRequest & request, ExecuteInlineCommandsCompleter::Sync & completer)
Submits a series of commands for execution on the hardware without using a command buffer.
The number of commands sent should be calculated so that the total message size is less than
MAX_INLINE_COMMANDS_DATA_SIZE.
void Flush (FlushCompleter::Sync & completer)
Incurs a round-trip to the system driver, used to ensure all previous messages have been
observed, but not necessarily completed.
void MapBuffer (MapBufferRequest & request, MapBufferCompleter::Sync & completer)
Maps a page range onto the hardware in the connection's address space at address `hw_va`.
`flags` is a set of flags from MapFlags that specify how the hardware can access the buffer.
void BufferRangeOp2 (BufferRangeOp2Request & request, BufferRangeOp2Completer::Sync & completer)
Perform an operation on a range of the buffer.
void EnableFlowControl (EnableFlowControlCompleter::Sync & completer)
Enables the events OnNotifyMessagesConsumed and OnNotifyMemoryImported.
void EnablePerformanceCounterAccess (EnablePerformanceCounterAccessRequest & request, EnablePerformanceCounterAccessCompleter::Sync & completer)
Tries to enable performance counter FIDL messages. To be successful, |access_token| must
have been returned by PerformanceCounterAccess.GetPerformanceCountToken() from the matching
device.
void IsPerformanceCounterAccessAllowed (IsPerformanceCounterAccessAllowedCompleter::Sync & completer)
Returns true if any EnablePerformanceCounterAccess message has succeeded.
void EnablePerformanceCounters (EnablePerformanceCountersRequest & request, EnablePerformanceCountersCompleter::Sync & completer)
Enables a set of performance counters. Disables enabled performance counters that are not
in the new set. Performance counters will also be automatically disabled on connection
close. Performance counter access must have been enabled using
EnablePerformanceCounterAccess before calling this method.
void CreatePerformanceCounterBufferPool (CreatePerformanceCounterBufferPoolRequest & request, CreatePerformanceCounterBufferPoolCompleter::Sync & completer)
Creates a pool of buffers that performance counters can be dumped into. Performance counter
access must have been enabled using EnablePerformanceCounterAccess before calling this
method.
void ReleasePerformanceCounterBufferPool (ReleasePerformanceCounterBufferPoolRequest & request, ReleasePerformanceCounterBufferPoolCompleter::Sync & completer)
Releases a pool of performance counter buffers. Performance counter access must have been
enabled using EnablePerformanceCounterAccess before calling this method.
void AddPerformanceCounterBufferOffsetsToPool (AddPerformanceCounterBufferOffsetsToPoolRequest & request, AddPerformanceCounterBufferOffsetsToPoolCompleter::Sync & completer)
Adds a set of offsets into buffers to the pool. |offsets[n].buffer_id| is the id of a
buffer that was previously imported using ImportBuffer(). The same buffer may be added to
multiple pools. The pool will hold on to a reference to the buffer even after ReleaseBuffer
is called. When dumped into this entry, counters will be written starting at
|offsets[n].buffer_offset| bytes into the buffer, and up to |offsets[n].buffer_offset| +
|offsets[n].buffer_size|. |offsets[n].buffer_size| must be large enough to fit all enabled
counters. Performance counter access must have been enabled using
EnablePerformanceCounterAccess before calling this method.
void RemovePerformanceCounterBufferFromPool (RemovePerformanceCounterBufferFromPoolRequest & request, RemovePerformanceCounterBufferFromPoolCompleter::Sync & completer)
Removes every offset of a buffer from the pool. Once this method is finished being handled
on the server, no more dumps will be processed into this buffer. In-flight dumps into this
buffer may be lost. Performance counter access must have been enabled using
EnablePerformanceCounterAccess before calling this method.
void DumpPerformanceCounters (DumpPerformanceCountersRequest & request, DumpPerformanceCountersCompleter::Sync & completer)
Triggers dumping of the performance counters into a buffer pool. May fail silently if there
are no buffers in the pool. |trigger_id| is an arbitrary ID assigned by the client that can
be returned in OnPerformanceCounterReadCompleted. Performance counter access must have been
enabled using EnablePerformanceCounterAccess before calling this method.
void ClearPerformanceCounters (ClearPerformanceCountersRequest & request, ClearPerformanceCountersCompleter::Sync & completer)
Sets the values of all listed performance counters to 0. May not be supported by some
hardware. Performance counter access must have been enabled using
EnablePerformanceCounterAccess before calling this method.
void Server ()
Defined at line 1649 of file fidling/gen/sdk/fidl/fuchsia.gpu.magma/fuchsia.gpu.magma/cpp/fidl/fuchsia.gpu.magma/cpp/natural_messaging.h
void UnmapBuffer (UnmapBufferRequest & request, UnmapBufferCompleter::Sync & completer)
Releases the mapping at address `hw_va` from the hardware for the given `buffer_id`.
Buffers will also be implicitly unmapped when released.
Handler bind_handler (async_dispatcher_t * dispatcher)
|bind_handler| returns a handler that binds incoming connections to this
server implementation.
The returned handler borrows the server instance.
The server must outlive the provided |dispatcher|. Only after
the dispatcher is shutdown will it be safe to destroy the servers.
The server should not be moved.
void ~Server ()
Defined at line 1650 of file fidling/gen/sdk/fidl/fuchsia.gpu.magma/fuchsia.gpu.magma/cpp/fidl/fuchsia.gpu.magma/cpp/natural_messaging.h