Enum rafx_api::RafxDeviceContext [−][src]
pub enum RafxDeviceContext { Empty(RafxDeviceContextEmpty), }
Expand description
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
Get metadata about the device
pub fn find_supported_format(
&self,
candidates: &[RafxFormat],
resource_type: RafxResourceType
) -> Option<RafxFormat>
pub fn find_supported_sample_count(
&self,
candidates: &[RafxSampleCount]
) -> Option<RafxSampleCount>
Create a queue
Create a fence
Create a semaphore
pub fn create_swapchain(
&self,
raw_window_handle: &dyn HasRawWindowHandle,
swapchain_def: &RafxSwapchainDef
) -> RafxResult<RafxSwapchain>
pub fn create_swapchain(
&self,
raw_window_handle: &dyn HasRawWindowHandle,
swapchain_def: &RafxSwapchainDef
) -> RafxResult<RafxSwapchain>
Create a swapchain
Wait for the given fences to complete. If a fence is in an unsubmitted state, the fence is ignored.
Create a sampler
Create a texture
Create a buffer
pub fn create_shader_module(
&self,
shader_module_def: RafxShaderModuleDef<'_>
) -> RafxResult<RafxShaderModule>
Create a shader
pub fn create_root_signature(
&self,
root_signature_def: &RafxRootSignatureDef<'_>
) -> RafxResult<RafxRootSignature>
pub fn create_root_signature(
&self,
root_signature_def: &RafxRootSignatureDef<'_>
) -> RafxResult<RafxRootSignature>
Create a root signature
pub fn create_graphics_pipeline(
&self,
pipeline_def: &RafxGraphicsPipelineDef<'_>
) -> RafxResult<RafxPipeline>
pub fn create_graphics_pipeline(
&self,
pipeline_def: &RafxGraphicsPipelineDef<'_>
) -> RafxResult<RafxPipeline>
Create a graphics pipeline
pub fn create_compute_pipeline(
&self,
pipeline_def: &RafxComputePipelineDef<'_>
) -> RafxResult<RafxPipeline>
pub fn create_compute_pipeline(
&self,
pipeline_def: &RafxComputePipelineDef<'_>
) -> RafxResult<RafxPipeline>
Create a compute pipeline
pub fn create_descriptor_set_array(
&self,
descriptor_set_array_def: &RafxDescriptorSetArrayDef<'_>
) -> RafxResult<RafxDescriptorSetArray>
pub fn create_descriptor_set_array(
&self,
descriptor_set_array_def: &RafxDescriptorSetArrayDef<'_>
) -> RafxResult<RafxDescriptorSetArray>
Create a descriptor set array
Get the underlying metal API object. This provides access to any internally created metal objects.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RafxDeviceContext
impl Send for RafxDeviceContext
impl Sync for RafxDeviceContext
impl Unpin for RafxDeviceContext
impl UnwindSafe for RafxDeviceContext
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more