Enum rafx_api::RafxQueue[][src]

pub enum RafxQueue {
    Empty(RafxQueueEmpty),
}

A queue allows work to be submitted to the GPU

Work that has been submitted to the same queue has some ordering guarantees.

Resources may only be accessed from one queue type at a time. If a resource is to be used by a different queue, a memory barrier on both the “sending” and “receiving” queue is required.

The default configuration is to return the same underlying queue every time create_queue() is called. A mutex protects against multiple threads submitting work to the queue at the same time.

Most applications can just create and use graphics queues freely, relying on the API returning the same underlying queue every time.

Variants

Empty(RafxQueueEmpty)

Implementations

impl RafxQueue[src]

pub fn device_context(&self) -> RafxDeviceContext[src]

pub fn queue_id(&self) -> u32[src]

Returns an opaque ID associated with this queue. It may be used to hash which queue a command pool is associated with

pub fn queue_type(&self) -> RafxQueueType[src]

Get the type of queue that this is

pub fn create_command_pool(
    &self,
    command_pool_def: &RafxCommandPoolDef
) -> RafxResult<RafxCommandPool>
[src]

Create a command pool for use with this queue

pub fn submit(
    &self,
    command_buffers: &[&RafxCommandBuffer],
    wait_semaphores: &[&RafxSemaphore],
    signal_semaphores: &[&RafxSemaphore],
    signal_fence: Option<&RafxFence>
) -> RafxResult<()>
[src]

Submit command buffers for processing by the GPU.

Execution will not begin until all wait_semaphores are signaled.

After execution, the given signal_semaphores and signal_fence are signaled as completed.

pub fn present(
    &self,
    swapchain: &RafxSwapchain,
    wait_semaphores: &[&RafxSemaphore],
    image_index: u32
) -> RafxResult<RafxPresentSuccessResult>
[src]

Presents an image in the swapchain.

Execution will not begin until all wait_semaphores are signaled.

pub fn wait_for_queue_idle(&self) -> RafxResult<()>[src]

Wait until all work submitted to this queue is completed

pub fn empty_queue(&self) -> Option<&RafxQueueEmpty>[src]

Get the underlying metal API object. This provides access to any internally created metal objects.

Trait Implementations

impl Clone for RafxQueue[src]

impl Debug for RafxQueue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Downcast + Send + Sync
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.