class Primary

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

If a system driver error occurs, or if the client sends a message that the client should have

known is invalid, the connection will be closed and a zx.Status sent via epitaph.

Public Methods

void ~Primary ()
void ImportObject (::fuchsia::gpu::magma::PrimaryImportObjectRequest PrimaryImportObjectRequest)

Imports an object for use in the system driver.

void ReleaseObject (uint64_t object_id, ::fuchsia::gpu::magma::ObjectType object_type)

Destroys the object with `object_id` within this connection.

void CreateContext (uint32_t context_id)

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 (uint32_t context_id, ::fuchsia::gpu::magma::Priority priority)

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

with hardware state.

void DestroyContext (uint32_t context_id)

Destroys context `context_id`.

void ExecuteCommand (uint32_t context_id, ::std::vector< ::fuchsia::gpu::magma::BufferRange> resources, ::std::vector< ::fuchsia::gpu::magma::CommandBuffer> command_buffers, ::std::vector<uint64_t> wait_semaphores, ::std::vector<uint64_t> signal_semaphores, ::fuchsia::gpu::magma::CommandBufferFlags flags)

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 (uint32_t context_id, ::std::vector< ::fuchsia::gpu::magma::InlineCommand> commands)

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 (FlushCallback callback)

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::PrimaryMapBufferRequest PrimaryMapBufferRequest)

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::PrimaryUnmapBufferRequest PrimaryUnmapBufferRequest)

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::BufferOp op, ::fuchsia::gpu::magma::BufferRange range)

Perform an operation on a range of the buffer.

void EnableFlowControl ()

Enables the events OnNotifyMessagesConsumed and OnNotifyMemoryImported.

void EnablePerformanceCounterAccess (::zx::event access_token)

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 (IsPerformanceCounterAccessAllowedCallback callback)

Returns true if any EnablePerformanceCounterAccess message has succeeded.

void EnablePerformanceCounters (::std::vector<uint64_t> counters)

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 (uint64_t pool_id, ::fidl::InterfaceRequest< ::fuchsia::gpu::magma::PerformanceCounterEvents> event_channel)

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 (uint64_t pool_id)

Releases a pool of performance counter buffers. Performance counter access must have been

enabled using EnablePerformanceCounterAccess before calling this method.

void AddPerformanceCounterBufferOffsetsToPool (uint64_t pool_id, ::std::vector< ::fuchsia::gpu::magma::BufferRange> offsets)

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 (uint64_t pool_id, uint64_t buffer_id)

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 (uint64_t pool_id, uint32_t trigger_id)

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 (::std::vector<uint64_t> counters)

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.