Trait vulkano::descriptor::pipeline_layout::PipelineLayoutDesc
source · pub unsafe trait PipelineLayoutDesc {
fn num_sets(&self) -> usize;
fn num_bindings_in_set(&self, set: usize) -> Option<usize>;
fn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc>;
fn num_push_constants_ranges(&self) -> usize;
fn push_constants_range(
&self,
num: usize
) -> Option<PipelineLayoutDescPcRange>;
fn provided_set_layout(
&self,
_set: usize
) -> Option<Arc<UnsafeDescriptorSetLayout>> { ... }
fn union<T>(self, other: T) -> PipelineLayoutDescUnion<Self, T>
where
Self: Sized,
{ ... }
fn check_against_limits(
&self,
device: &Device
) -> Result<(), PipelineLayoutLimitsError> { ... }
fn build(
self,
device: Arc<Device>
) -> Result<PipelineLayout<Self>, PipelineLayoutCreationError>
where
Self: Sized,
{ ... }
}
Expand description
Trait for objects that describe the layout of the descriptors and push constants of a pipeline.
Required Methods
sourcefn num_sets(&self) -> usize
fn num_sets(&self) -> usize
Returns the number of sets in the layout. Includes possibly empty sets.
In other words, this should be equal to the highest set number plus one.
sourcefn num_bindings_in_set(&self, set: usize) -> Option<usize>
fn num_bindings_in_set(&self, set: usize) -> Option<usize>
Returns the number of descriptors in the set. Includes possibly empty descriptors.
Returns None
if the set is out of range.
sourcefn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc>
fn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc>
Returns the descriptor for the given binding of the given set.
Returns None
if out of range or if the descriptor is empty.
sourcefn num_push_constants_ranges(&self) -> usize
fn num_push_constants_ranges(&self) -> usize
Returns the number of push constant ranges of the layout.
sourcefn push_constants_range(&self, num: usize) -> Option<PipelineLayoutDescPcRange>
fn push_constants_range(&self, num: usize) -> Option<PipelineLayoutDescPcRange>
Returns a description of the given push constants range.
Contrary to the descriptors, a push constants range can’t be empty.
Returns None
if out of range.
Each bit of stages
must only be present in a single push constants range of the
description.
Provided Methods
sourcefn provided_set_layout(
&self,
_set: usize
) -> Option<Arc<UnsafeDescriptorSetLayout>>
fn provided_set_layout(
&self,
_set: usize
) -> Option<Arc<UnsafeDescriptorSetLayout>>
If the PipelineLayoutDesc
implementation is able to provide an existing
UnsafeDescriptorSetLayout
for a given set, it can do so by returning it here.
sourcefn union<T>(self, other: T) -> PipelineLayoutDescUnion<Self, T>where
Self: Sized,
fn union<T>(self, other: T) -> PipelineLayoutDescUnion<Self, T>where
Self: Sized,
Builds the union of this layout and another.
sourcefn check_against_limits(
&self,
device: &Device
) -> Result<(), PipelineLayoutLimitsError>
fn check_against_limits(
&self,
device: &Device
) -> Result<(), PipelineLayoutLimitsError>
Checks whether this description fulfills the device limits requirements.
sourcefn build(
self,
device: Arc<Device>
) -> Result<PipelineLayout<Self>, PipelineLayoutCreationError>where
Self: Sized,
fn build(
self,
device: Arc<Device>
) -> Result<PipelineLayout<Self>, PipelineLayoutCreationError>where
Self: Sized,
Turns the layout description into a PipelineLayout
object that can be used by Vulkan.
Note: This is just a shortcut for
PipelineLayout::new
.