pub struct PipelineLayout { /* private fields */ }
Expand description
Describes the layout of descriptor sets and push constants that are made available to shaders.
Implementations
sourceimpl PipelineLayout
impl PipelineLayout
sourcepub fn new(
device: Arc<Device>,
create_info: PipelineLayoutCreateInfo
) -> Result<Arc<PipelineLayout>, PipelineLayoutCreationError>
pub fn new(
device: Arc<Device>,
create_info: PipelineLayoutCreateInfo
) -> Result<Arc<PipelineLayout>, PipelineLayoutCreationError>
Creates a new PipelineLayout
.
Panics
- Panics if an element of
create_info.push_constant_ranges
has an emptystages
value. - Panics if an element of
create_info.push_constant_ranges
has anoffset
orsize
that’s not divisible by 4. - Panics if an element of
create_info.push_constant_ranges
has ansize
of zero.
sourcepub fn set_layouts(&self) -> &[Arc<DescriptorSetLayout>]
pub fn set_layouts(&self) -> &[Arc<DescriptorSetLayout>]
Returns the descriptor set layouts this pipeline layout was created from.
sourcepub fn push_constant_ranges(&self) -> &[PushConstantRange]
pub fn push_constant_ranges(&self) -> &[PushConstantRange]
Returns a slice containing the push constant ranges this pipeline layout was created from.
The ranges are guaranteed to be sorted deterministically by offset, size, then stages. This means that two slices containing the same elements will always have the same order.
sourcepub fn is_compatible_with(&self, other: &PipelineLayout, num_sets: u32) -> bool
pub fn is_compatible_with(&self, other: &PipelineLayout, num_sets: u32) -> bool
Returns whether self
is compatible with other
for the given number of sets.
sourcepub fn ensure_compatible_with_shader<'a>(
&self,
descriptor_requirements: impl IntoIterator<Item = ((u32, u32), &'a DescriptorRequirements)>,
push_constant_range: Option<&PushConstantRange>
) -> Result<(), PipelineLayoutSupersetError>
pub fn ensure_compatible_with_shader<'a>(
&self,
descriptor_requirements: impl IntoIterator<Item = ((u32, u32), &'a DescriptorRequirements)>,
push_constant_range: Option<&PushConstantRange>
) -> Result<(), PipelineLayoutSupersetError>
Makes sure that self
is a superset of the provided descriptor set layouts and push
constant ranges. Returns an Err
if this is not the case.
Trait Implementations
sourceimpl Debug for PipelineLayout
impl Debug for PipelineLayout
sourceimpl DeviceOwned for PipelineLayout
impl DeviceOwned for PipelineLayout
sourceimpl Drop for PipelineLayout
impl Drop for PipelineLayout
sourceimpl Hash for PipelineLayout
impl Hash for PipelineLayout
sourceimpl PartialEq<PipelineLayout> for PipelineLayout
impl PartialEq<PipelineLayout> for PipelineLayout
sourceimpl VulkanObject for PipelineLayout
impl VulkanObject for PipelineLayout
type Object = PipelineLayout
type Object = PipelineLayout
The type of the object.
sourcefn internal_object(&self) -> Self::Object
fn internal_object(&self) -> Self::Object
Returns a reference to the object.
impl Eq for PipelineLayout
Auto Trait Implementations
impl RefUnwindSafe for PipelineLayout
impl Send for PipelineLayout
impl Sync for PipelineLayout
impl Unpin for PipelineLayout
impl UnwindSafe for PipelineLayout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more