pub struct PipelineDescriptorSetLayoutCreateInfo {
    pub flags: PipelineLayoutCreateFlags,
    pub set_layouts: Vec<DescriptorSetLayoutCreateInfo>,
    pub push_constant_ranges: Vec<PushConstantRange>,
}
Expand description

Parameters to create a new PipelineLayout as well as its accompanying DescriptorSetLayout objects.

Fields§

§flags: PipelineLayoutCreateFlags§set_layouts: Vec<DescriptorSetLayoutCreateInfo>§push_constant_ranges: Vec<PushConstantRange>

Implementations§

source§

impl PipelineDescriptorSetLayoutCreateInfo

source

pub fn from_stages<'a>( stages: impl IntoIterator<Item = &'a PipelineShaderStageCreateInfo> ) -> Self

Creates a new PipelineDescriptorSetLayoutCreateInfo from the union of the requirements of each shader stage in stages.

This is intended for quick prototyping or for single use layouts that do not have any bindings in common with other shaders. For the general case, it is strongly recommended to create pipeline layouts manually:

  • When multiple pipelines share the same layout object, it is faster than if they have different objects, even if the objects both contain identical bindings. It is also faster (though a little bit less), if multiple pipeline layout objects share common descriptor set objects.
  • Pipeline layouts only need to be a superset of what the shaders use, they don’t have to match exactly. Creating a manual pipeline layout therefore allows you to specify layouts that are applicable for many shaders, as long as each one uses a subset. This allows further sharing.
  • Creating a manual pipeline layout makes your code more robust against changes in the shader, in particular regarding whether a particular binding in the shader is used or not (see also the limitations below).
Limitations:

Only bindings that are statically used are included in the descriptor binding requirements, and therefore are included in the descriptor set layout. If the use of a binding depends on input variables to the shader (buffers, images, push constants etc.) then the shader reflection is unable to know that the binding is in use, and it will not be included in the pipeline layout.

Note that this corresponds to the shader_*_array_dynamic_indexing device features.

source

pub fn into_pipeline_layout_create_info( self, device: Arc<Device> ) -> Result<PipelineLayoutCreateInfo, IntoPipelineLayoutCreateInfoError>

Converts the PipelineDescriptorSetLayoutCreateInfo into a PipelineLayoutCreateInfo by creating the descriptor set layout objects.

Trait Implementations§

source§

impl Clone for PipelineDescriptorSetLayoutCreateInfo

source§

fn clone(&self) -> PipelineDescriptorSetLayoutCreateInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PipelineDescriptorSetLayoutCreateInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.