[][src]Enum rafx_api::RafxDeviceContext

pub enum RafxDeviceContext {
    Vk(RafxDeviceContextVulkan),
}

A cloneable, thread-safe handle used to create graphics resources.

All device contexts, and resources created from them, must be dropped before the RafxApi object that they came from is dropped or destroyed.

Variants

Implementations

impl RafxDeviceContext[src]

pub fn device_info(&self) -> &RafxDeviceInfo[src]

Get metadata about the device

pub fn find_supported_format(
    &self,
    candidates: &[RafxFormat],
    resource_type: RafxResourceType
) -> Option<RafxFormat>
[src]

pub fn create_queue(&self, queue_type: RafxQueueType) -> RafxResult<RafxQueue>[src]

Create a queue

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

Create a fence

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

Create a semaphore

pub fn create_swapchain(
    &self,
    raw_window_handle: &dyn HasRawWindowHandle,
    swapchain_def: &RafxSwapchainDef
) -> RafxResult<RafxSwapchain>
[src]

Create a swapchain

pub fn wait_for_fences(&self, fences: &[&RafxFence]) -> RafxResult<()>[src]

Wait for the given fences to complete. If a fence is in an unsubmitted state, the fence is ignored.

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

Wait for the device (all qeueus) to be idle

pub fn create_sampler(
    &self,
    sampler_def: &RafxSamplerDef
) -> RafxResult<RafxSampler>
[src]

Create a sampler

pub fn create_texture(
    &self,
    texture_def: &RafxTextureDef
) -> RafxResult<RafxTexture>
[src]

Create a texture

pub fn create_render_target(
    &self,
    render_target_def: &RafxRenderTargetDef
) -> RafxResult<RafxRenderTarget>
[src]

Create a render target

pub fn create_buffer(
    &self,
    buffer_def: &RafxBufferDef
) -> RafxResult<RafxBuffer>
[src]

Create a buffer

pub fn create_shader(
    &self,
    stages: Vec<RafxShaderStageDef>
) -> RafxResult<RafxShader>
[src]

Create a shader

pub fn create_root_signature(
    &self,
    root_signature_def: &RafxRootSignatureDef<'_>
) -> RafxResult<RafxRootSignature>
[src]

Create a root signature

pub fn create_graphics_pipeline(
    &self,
    pipeline_def: &RafxGraphicsPipelineDef<'_>
) -> RafxResult<RafxPipeline>
[src]

Create a graphics pipeline

pub fn create_compute_pipeline(
    &self,
    pipeline_def: &RafxComputePipelineDef<'_>
) -> RafxResult<RafxPipeline>
[src]

Create a compute pipeline

pub fn create_descriptor_set_array(
    &self,
    descriptor_set_array_def: &RafxDescriptorSetArrayDef<'_>
) -> RafxResult<RafxDescriptorSetArray>
[src]

Create a descriptor set array

pub fn vk_device_context(&self) -> Option<&RafxDeviceContextVulkan>[src]

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

Trait Implementations

impl Clone for RafxDeviceContext[src]

impl Into<RafxDeviceContext> for RafxDeviceContextVulkan[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.