pub struct GraphicsPipelineCreateInfo {
Show 16 fields pub flags: PipelineCreateFlags, pub stages: SmallVec<[PipelineShaderStageCreateInfo; 5]>, pub vertex_input_state: Option<VertexInputState>, pub input_assembly_state: Option<InputAssemblyState>, pub tessellation_state: Option<TessellationState>, pub viewport_state: Option<ViewportState>, pub rasterization_state: Option<RasterizationState>, pub multisample_state: Option<MultisampleState>, pub depth_stencil_state: Option<DepthStencilState>, pub color_blend_state: Option<ColorBlendState>, pub dynamic_state: HashSet<DynamicState>, pub layout: Arc<PipelineLayout>, pub subpass: Option<PipelineSubpassType>, pub base_pipeline: Option<Arc<GraphicsPipeline>>, pub discard_rectangle_state: Option<DiscardRectangleState>, pub _ne: NonExhaustive,
}
Expand description

Parameters to create a new GraphicsPipeline.

Fields§

§flags: PipelineCreateFlags

Additional properties of the pipeline.

The default value is empty.

§stages: SmallVec<[PipelineShaderStageCreateInfo; 5]>

The shader stages to use.

A vertex shader must always be included. Other stages are optional.

The default value is empty.

§vertex_input_state: Option<VertexInputState>

The vertex input state.

This state is always used, and must be provided.

The default value is None.

§input_assembly_state: Option<InputAssemblyState>

The input assembly state.

This state is always used, and must be provided.

The default value is None.

§tessellation_state: Option<TessellationState>

The tessellation state.

This state is used if stages contains tessellation shaders.

The default value is None.

§viewport_state: Option<ViewportState>

The viewport state.

This state is used if rasterizer discarding is not enabled.

The default value is None.

§rasterization_state: Option<RasterizationState>

The rasterization state.

This state is always used, and must be provided.

The default value is None.

§multisample_state: Option<MultisampleState>

The multisample state.

This state is used if rasterizer discarding is not enabled.

The default value is None.

§depth_stencil_state: Option<DepthStencilState>

The depth/stencil state.

This state is used if render_pass has depth/stencil attachments, or if rasterizer discarding is enabled.

The default value is None.

§color_blend_state: Option<ColorBlendState>

The color blend state.

This state is used if render_pass has color attachments, and rasterizer discarding is not enabled.

The default value is None.

§dynamic_state: HashSet<DynamicState>

The state(s) that will be set dynamically when recording a command buffer.

The default value is empty.

§layout: Arc<PipelineLayout>

The pipeline layout to use for the pipeline.

There is no default value.

§subpass: Option<PipelineSubpassType>

The render subpass to use.

This state is always used, and must be provided.

The default value is None.

§base_pipeline: Option<Arc<GraphicsPipeline>>

The pipeline to use as a base when creating this pipeline.

If this is Some, then flags must contain PipelineCreateFlags::DERIVATIVE, and the flags of the provided pipeline must contain PipelineCreateFlags::ALLOW_DERIVATIVES.

The default value is None.

§discard_rectangle_state: Option<DiscardRectangleState>

The discard rectangle state.

This state is always used if it is provided.

The default value is None.

§_ne: NonExhaustive

Implementations§

source§

impl GraphicsPipelineCreateInfo

source

pub fn layout(layout: Arc<PipelineLayout>) -> Self

Returns a GraphicsPipelineCreateInfo with the specified layout.

Trait Implementations§

source§

impl Clone for GraphicsPipelineCreateInfo

source§

fn clone(&self) -> GraphicsPipelineCreateInfo

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 GraphicsPipelineCreateInfo

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.