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

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.

Returns the number of descriptors in the set. Includes possibly empty descriptors.

Returns None if the set is out of range.

Returns the descriptor for the given binding of the given set.

Returns None if out of range or if the descriptor is empty.

Returns the number of push constant ranges of the layout.

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

If the PipelineLayoutDesc implementation is able to provide an existing UnsafeDescriptorSetLayout for a given set, it can do so by returning it here.

Builds the union of this layout and another.

Checks whether this description fulfills the device limits requirements.

Turns the layout description into a PipelineLayout object that can be used by Vulkan.

Note: This is just a shortcut for PipelineLayout::new.

Implementors