Enum rafx_api::RafxPipeline
source · pub enum RafxPipeline {
Empty(RafxPipelineEmpty),
}
Expand description
Represents a complete GPU configuration for executing work.
There are two kinds of pipelines: Graphics and Compute
A pipeline includes fixed-function state (i.e. configuration) and programmable state (i.e. shaders). Pipelines are expensive objects to create. Ideally, they should be created when the application initializes or on a separate thread.
Pipelines are bound by command buffers. Fewer pipeline changes is better, and it is often worth batching draw calls that use the same pipeline to happen together so that the pipeline does not need to be changed as frequently.
Pipelines must not be dropped if they are in use by the GPU.
Variants§
Empty(RafxPipelineEmpty)
Implementations§
source§impl RafxPipeline
impl RafxPipeline
sourcepub fn pipeline_type(&self) -> RafxPipelineType
pub fn pipeline_type(&self) -> RafxPipelineType
Returns the type of pipeline that this is
sourcepub fn root_signature(&self) -> &RafxRootSignature
pub fn root_signature(&self) -> &RafxRootSignature
Returns the root signature used to create the pipeline
sourcepub fn set_debug_name(&self, _name: impl AsRef<str>)
pub fn set_debug_name(&self, _name: impl AsRef<str>)
Sets a name for this pipeline. This is useful for debugging, graphics debuggers/profilers such as nsight graphics or renderdoc will display this pipeline with the given name in the list of resources.
WARNING: Metal doesn’t support specifying debug names after pipeline creation, so it’s better to provide a debug_name in RafxGraphicsPipelineDef/RafxComputePipelineDef
pub fn empty_pipeline(&self) -> Option<&RafxPipelineEmpty>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for RafxPipeline
impl Send for RafxPipeline
impl Sync for RafxPipeline
impl Unpin for RafxPipeline
impl UnwindSafe for RafxPipeline
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.