Struct Subpass

Source
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.

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 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.