pub struct Subpass { /* private fields */ }
Expand description

Represents a subpass within a RenderPass object.

This struct doesn’t correspond to anything in Vulkan. It is simply an equivalent to a tuple of a render pass and subpass index. Contrary to a tuple, however, the existence of the subpass is checked when the object is created. When you have a Subpass you are guaranteed that the given subpass does exist.

Implementations§

source§

impl Subpass

source

pub fn from(render_pass: Arc<RenderPass>, id: u32) -> Option<Subpass>

Returns a handle that represents a subpass of a render pass.

source

pub fn render_pass(&self) -> &Arc<RenderPass>

Returns the render pass of this subpass.

source

pub fn index(&self) -> u32

Returns the index of this subpass within the renderpass.

source

pub fn subpass_desc(&self) -> &SubpassDescription

Returns the subpass description for this subpass.

source

pub fn is_last_subpass(&self) -> bool

Returns whether this subpass is the last one in the render pass. If true is returned, calling next_subpass will panic.

source

pub fn next_subpass(&mut self)

Advances to the next subpass after this one.

Panics
  • Panics if there are no more render passes.
source

pub fn num_color_attachments(&self) -> u32

Returns the number of color attachments in this subpass.

source

pub fn num_samples(&self) -> Option<SampleCount>

Returns the number of samples in the color and/or depth/stencil attachments. Returns None if there is no such attachment in this subpass.

source

pub fn is_compatible_with(&self, shader_interface: &ShaderInterface) -> bool

Returns true if this subpass is compatible with the fragment output definition.

Trait Implementations§

source§

impl Clone for Subpass

source§

fn clone(&self) -> Subpass

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 Subpass

source§

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

Formats the value using the given formatter. Read more
source§

impl From<Subpass> for (Arc<RenderPass>, u32)

source§

fn from(value: Subpass) -> (Arc<RenderPass>, u32)

Converts to this type from the input type.
source§

impl From<Subpass> for CommandBufferInheritanceRenderPassInfo

source§

fn from(subpass: Subpass) -> Self

Converts to this type from the input type.
source§

impl From<Subpass> for CommandBufferInheritanceRenderPassType

source§

fn from(val: Subpass) -> Self

Converts to this type from the input type.
source§

impl From<Subpass> for PipelineSubpassType

source§

fn from(val: Subpass) -> Self

Converts to this type from the input type.

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.