pub enum PrimaryRequest {
Show 22 variants
ImportObject2 {
object: Handle,
object_type: ObjectType,
object_id: u64,
control_handle: PrimaryControlHandle,
},
ImportObject {
payload: PrimaryImportObjectRequest,
control_handle: PrimaryControlHandle,
},
ReleaseObject {
object_id: u64,
object_type: ObjectType,
control_handle: PrimaryControlHandle,
},
CreateContext {
context_id: u32,
control_handle: PrimaryControlHandle,
},
DestroyContext {
context_id: u32,
control_handle: PrimaryControlHandle,
},
ExecuteCommand {
context_id: u32,
resources: Vec<BufferRange>,
command_buffers: Vec<CommandBuffer>,
wait_semaphores: Vec<u64>,
signal_semaphores: Vec<u64>,
flags: CommandBufferFlags,
control_handle: PrimaryControlHandle,
},
ExecuteImmediateCommands {
context_id: u32,
command_data: Vec<u8>,
semaphores: Vec<u64>,
control_handle: PrimaryControlHandle,
},
ExecuteInlineCommands {
context_id: u32,
commands: Vec<InlineCommand>,
control_handle: PrimaryControlHandle,
},
Flush {
responder: PrimaryFlushResponder,
},
MapBuffer {
payload: PrimaryMapBufferRequest,
control_handle: PrimaryControlHandle,
},
UnmapBuffer {
payload: PrimaryUnmapBufferRequest,
control_handle: PrimaryControlHandle,
},
BufferRangeOp2 {
op: BufferOp,
range: BufferRange,
control_handle: PrimaryControlHandle,
},
EnableFlowControl {
control_handle: PrimaryControlHandle,
},
EnablePerformanceCounterAccess {
access_token: Event,
control_handle: PrimaryControlHandle,
},
IsPerformanceCounterAccessAllowed {
responder: PrimaryIsPerformanceCounterAccessAllowedResponder,
},
EnablePerformanceCounters {
counters: Vec<u64>,
control_handle: PrimaryControlHandle,
},
CreatePerformanceCounterBufferPool {
pool_id: u64,
event_channel: ServerEnd<PerformanceCounterEventsMarker>,
control_handle: PrimaryControlHandle,
},
ReleasePerformanceCounterBufferPool {
pool_id: u64,
control_handle: PrimaryControlHandle,
},
AddPerformanceCounterBufferOffsetsToPool {
pool_id: u64,
offsets: Vec<BufferRange>,
control_handle: PrimaryControlHandle,
},
RemovePerformanceCounterBufferFromPool {
pool_id: u64,
buffer_id: u64,
control_handle: PrimaryControlHandle,
},
DumpPerformanceCounters {
pool_id: u64,
trigger_id: u32,
control_handle: PrimaryControlHandle,
},
ClearPerformanceCounters {
counters: Vec<u64>,
control_handle: PrimaryControlHandle,
},
}
Expand description
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.
Variants§
ImportObject2
ImportObject
Imports an object for use in the system driver.
ReleaseObject
Destroys the object with object_id
within this connection.
CreateContext
Creates context context_id
for use in command execution. A context may be associated
with hardware state.
DestroyContext
Destroys context context_id
.
ExecuteCommand
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.
Fields
resources: Vec<BufferRange>
command_buffers: Vec<CommandBuffer>
flags: CommandBufferFlags
control_handle: PrimaryControlHandle
ExecuteImmediateCommands
Submits a series of commands for execution on the hardware without using a command buffer.
semaphores
must refer to events that have been imported, and will be signaled after
the commands are completed.
Fields
control_handle: PrimaryControlHandle
ExecuteInlineCommands
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.
Flush
Incurs a round-trip to the system driver, used to ensure all previous messages have been observed, but not necessarily completed.
Fields
responder: PrimaryFlushResponder
MapBuffer
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.
UnmapBuffer
Releases the mapping at address hw_va
from the hardware for the given buffer_id
.
Buffers will also be implicitly unmapped when released.
BufferRangeOp2
Perform an operation on a range of the buffer.
EnableFlowControl
Enables the events OnNotifyMessagesConsumed and OnNotifyMemoryImported.
Fields
control_handle: PrimaryControlHandle
EnablePerformanceCounterAccess
Tries to enable performance counter FIDL messages. To be successful, |access_token| must have been returned by PerformanceCounterAccess.GetPerformanceCountToken() from the matching device.
IsPerformanceCounterAccessAllowed
Returns true if any EnablePerformanceCounterAccess message has succeeded.
Fields
EnablePerformanceCounters
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.
CreatePerformanceCounterBufferPool
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.
Fields
event_channel: ServerEnd<PerformanceCounterEventsMarker>
control_handle: PrimaryControlHandle
ReleasePerformanceCounterBufferPool
Releases a pool of performance counter buffers. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.
AddPerformanceCounterBufferOffsetsToPool
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.
RemovePerformanceCounterBufferFromPool
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.
DumpPerformanceCounters
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.
ClearPerformanceCounters
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.
Implementations§
Source§impl PrimaryRequest
impl PrimaryRequest
pub fn into_import_object2( self, ) -> Option<(Handle, ObjectType, u64, PrimaryControlHandle)>
pub fn into_import_object( self, ) -> Option<(PrimaryImportObjectRequest, PrimaryControlHandle)>
pub fn into_release_object( self, ) -> Option<(u64, ObjectType, PrimaryControlHandle)>
pub fn into_create_context(self) -> Option<(u32, PrimaryControlHandle)>
pub fn into_destroy_context(self) -> Option<(u32, PrimaryControlHandle)>
pub fn into_execute_command( self, ) -> Option<(u32, Vec<BufferRange>, Vec<CommandBuffer>, Vec<u64>, Vec<u64>, CommandBufferFlags, PrimaryControlHandle)>
pub fn into_execute_immediate_commands( self, ) -> Option<(u32, Vec<u8>, Vec<u64>, PrimaryControlHandle)>
pub fn into_execute_inline_commands( self, ) -> Option<(u32, Vec<InlineCommand>, PrimaryControlHandle)>
pub fn into_flush(self) -> Option<PrimaryFlushResponder>
pub fn into_map_buffer( self, ) -> Option<(PrimaryMapBufferRequest, PrimaryControlHandle)>
pub fn into_unmap_buffer( self, ) -> Option<(PrimaryUnmapBufferRequest, PrimaryControlHandle)>
pub fn into_buffer_range_op2( self, ) -> Option<(BufferOp, BufferRange, PrimaryControlHandle)>
pub fn into_enable_flow_control(self) -> Option<PrimaryControlHandle>
pub fn into_enable_performance_counter_access( self, ) -> Option<(Event, PrimaryControlHandle)>
pub fn into_is_performance_counter_access_allowed( self, ) -> Option<PrimaryIsPerformanceCounterAccessAllowedResponder>
pub fn into_enable_performance_counters( self, ) -> Option<(Vec<u64>, PrimaryControlHandle)>
pub fn into_create_performance_counter_buffer_pool( self, ) -> Option<(u64, ServerEnd<PerformanceCounterEventsMarker>, PrimaryControlHandle)>
pub fn into_release_performance_counter_buffer_pool( self, ) -> Option<(u64, PrimaryControlHandle)>
pub fn into_add_performance_counter_buffer_offsets_to_pool( self, ) -> Option<(u64, Vec<BufferRange>, PrimaryControlHandle)>
pub fn into_remove_performance_counter_buffer_from_pool( self, ) -> Option<(u64, u64, PrimaryControlHandle)>
pub fn into_dump_performance_counters( self, ) -> Option<(u64, u32, PrimaryControlHandle)>
pub fn into_clear_performance_counters( self, ) -> Option<(Vec<u64>, PrimaryControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL