template <>

class WireServer

Defined at line 5423 of file fidling/gen/sdk/fidl/fuchsia.gpu.magma/fuchsia.gpu.magma/cpp/fidl/fuchsia.gpu.magma/cpp/wire_messaging.h

Pure-virtual interface to be implemented by a server.

This interface uses typed channels (i.e. |::fidl::ClientEnd

<

::fuchsia_gpu_magma::Primary>|

and |::fidl::ServerEnd

<

::fuchsia_gpu_magma::Primary>|).

Public Methods

void ImportObject (::fuchsia_gpu_magma::wire::PrimaryImportObjectRequest * request, ImportObjectCompleter::Sync & completer)

Imports an object for use in the system driver.

void ReleaseObject (::fuchsia_gpu_magma::wire::PrimaryReleaseObjectRequest * request, ReleaseObjectCompleter::Sync & completer)

Destroys the object with `object_id` within this connection.

void CreateContext (::fuchsia_gpu_magma::wire::PrimaryCreateContextRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryCreateContext2Request * request, CreateContext2Completer::Sync & completer)

Creates context `context_id` for use in command execution. A context may be associated

with hardware state.

void DestroyContext (::fuchsia_gpu_magma::wire::PrimaryDestroyContextRequest * request, DestroyContextCompleter::Sync & completer)

Destroys context `context_id`.

void ExecuteCommand (::fuchsia_gpu_magma::wire::PrimaryExecuteCommandRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryExecuteInlineCommandsRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryMapBufferRequest * 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 UnmapBuffer (::fuchsia_gpu_magma::wire::PrimaryUnmapBufferRequest * 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.

void BufferRangeOp2 (::fuchsia_gpu_magma::wire::PrimaryBufferRangeOp2Request * 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 (::fuchsia_gpu_magma::wire::PrimaryEnablePerformanceCounterAccessRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryEnablePerformanceCountersRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryCreatePerformanceCounterBufferPoolRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryReleasePerformanceCounterBufferPoolRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryAddPerformanceCounterBufferOffsetsToPoolRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryRemovePerformanceCounterBufferFromPoolRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryDumpPerformanceCountersRequest * 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 (::fuchsia_gpu_magma::wire::PrimaryClearPerformanceCountersRequest * 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 WireServer ()

Defined at line 5426 of file fidling/gen/sdk/fidl/fuchsia.gpu.magma/fuchsia.gpu.magma/cpp/fidl/fuchsia.gpu.magma/cpp/wire_messaging.h

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 ~WireServer ()

Defined at line 5427 of file fidling/gen/sdk/fidl/fuchsia.gpu.magma/fuchsia.gpu.magma/cpp/fidl/fuchsia.gpu.magma/cpp/wire_messaging.h