Struct GraphicsPipelineDesc

Source
pub struct GraphicsPipelineDesc {
    pub vertex_shader: Option<Shader>,
    pub tessellation_control_shader: Option<Shader>,
    pub tessellation_evaluation_shader: Option<Shader>,
    pub geometry_shader: Option<Shader>,
    pub fragment_shader: Option<Shader>,
    pub mesh_shader: Option<Shader>,
    pub task_shader: Option<Shader>,
}
Expand description

Graphics Pipeline Descriptor.

§Overview

The graphics pipeline is invoked by executing a draw command. The pipeline consists of multiple stages, where some are fully programmable (Shader) and other fixed-function stages can be only configured.

§Stages

We will go through the the different stages starting from top to bottom. At the highest abstraction level we split the graphics pipeline into three components (grr terminology):

  • Primitive Stage: Reading data from buffers and generates primitives.
  • Rasterizer: Transforms primitives into fragments.
  • Fragment Stage: Shades fragments and blends them into the framebuffer.

Fig. 1 shows a very simplistic view of a graphics pipeline consisting of a vertex (VS) and fragment (FS) shader. We will discuss the different stages in more detail later on. The Primitive Stage in this examples consists of the Input Assembler (IA) and the Vertex Shader (VS). The Rasterizer is shown as the fixed function RS stage. The fragment shader together with the framebuffer output (FB) build the Fragment Stage.

Fig.1 Basic Vertex-Fragment Shader Pipeline

In the following the different top-level stages will be split up and discussed in more detail

§Primitive Stage

§Rasterizer

§Fragment Stage

§Examples

Fields§

§vertex_shader: Option<Shader>§tessellation_control_shader: Option<Shader>§tessellation_evaluation_shader: Option<Shader>§geometry_shader: Option<Shader>§fragment_shader: Option<Shader>§mesh_shader: Option<Shader>§task_shader: Option<Shader>

Trait Implementations§

Source§

impl Clone for GraphicsPipelineDesc

Source§

fn clone(&self) -> GraphicsPipelineDesc

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 From<MeshPipelineDesc> for GraphicsPipelineDesc

Source§

fn from(desc: MeshPipelineDesc) -> Self

Converts to this type from the input type.
Source§

impl From<VertexPipelineDesc> for GraphicsPipelineDesc

Source§

fn from(desc: VertexPipelineDesc) -> Self

Converts to this type from the input type.
Source§

impl Copy for GraphicsPipelineDesc

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.