fidl_fuchsia_gpu_magma

Struct PrimarySynchronousProxy

Source
pub struct PrimarySynchronousProxy { /* private fields */ }

Implementations§

Source§

impl PrimarySynchronousProxy

Source

pub fn new(channel: Channel) -> Self

Source

pub fn into_channel(self) -> Channel

Source

pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PrimaryEvent, Error>

Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.

Source

pub fn import_object2( &self, object: Handle, object_type: ObjectType, object_id: u64, ) -> Result<(), Error>

Source

pub fn import_object( &self, payload: PrimaryImportObjectRequest, ) -> Result<(), Error>

Imports an object for use in the system driver.

Source

pub fn release_object( &self, object_id: u64, object_type: ObjectType, ) -> Result<(), Error>

Destroys the object with object_id within this connection.

Source

pub fn create_context(&self, context_id: u32) -> Result<(), Error>

Creates context context_id for use in command execution. A context may be associated with hardware state.

Source

pub fn destroy_context(&self, context_id: u32) -> Result<(), Error>

Destroys context context_id.

Source

pub fn execute_command( &self, context_id: u32, resources: &[BufferRange], command_buffers: &[CommandBuffer], wait_semaphores: &[u64], signal_semaphores: &[u64], flags: CommandBufferFlags, ) -> Result<(), Error>

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.

Source

pub fn execute_immediate_commands( &self, context_id: u32, command_data: &[u8], semaphores: &[u64], ) -> Result<(), Error>

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.

Source

pub fn execute_inline_commands( &self, context_id: u32, commands: &[InlineCommand], ) -> Result<(), Error>

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.

Source

pub fn flush(&self, ___deadline: MonotonicInstant) -> Result<(), Error>

Incurs a round-trip to the system driver, used to ensure all previous messages have been observed, but not necessarily completed.

Source

pub fn map_buffer(&self, payload: &PrimaryMapBufferRequest) -> Result<(), Error>

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.

Source

pub fn unmap_buffer( &self, payload: &PrimaryUnmapBufferRequest, ) -> Result<(), Error>

Releases the mapping at address hw_va from the hardware for the given buffer_id. Buffers will also be implicitly unmapped when released.

Source

pub fn buffer_range_op2( &self, op: BufferOp, range: &BufferRange, ) -> Result<(), Error>

Perform an operation on a range of the buffer.

Source

pub fn enable_flow_control(&self) -> Result<(), Error>

Enables the events OnNotifyMessagesConsumed and OnNotifyMemoryImported.

Source

pub fn enable_performance_counter_access( &self, access_token: Event, ) -> Result<(), Error>

Tries to enable performance counter FIDL messages. To be successful, |access_token| must have been returned by PerformanceCounterAccess.GetPerformanceCountToken() from the matching device.

Source

pub fn is_performance_counter_access_allowed( &self, ___deadline: MonotonicInstant, ) -> Result<bool, Error>

Returns true if any EnablePerformanceCounterAccess message has succeeded.

Source

pub fn enable_performance_counters(&self, counters: &[u64]) -> Result<(), Error>

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.

Source

pub fn create_performance_counter_buffer_pool( &self, pool_id: u64, event_channel: ServerEnd<PerformanceCounterEventsMarker>, ) -> Result<(), Error>

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.

Source

pub fn release_performance_counter_buffer_pool( &self, pool_id: u64, ) -> Result<(), Error>

Releases a pool of performance counter buffers. Performance counter access must have been enabled using EnablePerformanceCounterAccess before calling this method.

Source

pub fn add_performance_counter_buffer_offsets_to_pool( &self, pool_id: u64, offsets: &[BufferRange], ) -> Result<(), Error>

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.

Source

pub fn remove_performance_counter_buffer_from_pool( &self, pool_id: u64, buffer_id: u64, ) -> Result<(), Error>

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.

Source

pub fn dump_performance_counters( &self, pool_id: u64, trigger_id: u32, ) -> Result<(), Error>

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.

Source

pub fn clear_performance_counters(&self, counters: &[u64]) -> Result<(), Error>

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.

Trait Implementations§

Source§

impl Debug for PrimarySynchronousProxy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SynchronousProxy for PrimarySynchronousProxy

Source§

type Proxy = PrimaryProxy

The async proxy for the same protocol.
Source§

type Protocol = PrimaryMarker

The protocol which this Proxy controls.
Source§

fn from_channel(inner: Channel) -> Self

Create a proxy over the given channel.
Source§

fn into_channel(self) -> Channel

Convert the proxy back into a channel.
Source§

fn as_channel(&self) -> &Channel

Get a reference to the proxy’s underlying channel. Read more
§

fn is_closed(&self) -> Result<bool, Status>

Returns true if the proxy has received the PEER_CLOSED signal. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more