Struct vulkano::render_pass::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
sourceimpl Subpass
impl Subpass
sourcepub fn from(render_pass: Arc<RenderPass>, id: u32) -> Option<Subpass>
pub fn from(render_pass: Arc<RenderPass>, id: u32) -> Option<Subpass>
Returns a handle that represents a subpass of a render pass.
sourcepub fn render_pass(&self) -> &Arc<RenderPass>
pub fn render_pass(&self) -> &Arc<RenderPass>
Returns the render pass of this subpass.
sourcepub fn subpass_desc(&self) -> &SubpassDescription
pub fn subpass_desc(&self) -> &SubpassDescription
Returns the subpass description for this subpass.
sourcepub fn is_last_subpass(&self) -> bool
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.
sourcepub fn next_subpass(&mut self)
pub fn next_subpass(&mut self)
sourcepub fn num_color_attachments(&self) -> u32
pub fn num_color_attachments(&self) -> u32
Returns the number of color attachments in this subpass.
sourcepub fn has_depth(&self) -> bool
pub fn has_depth(&self) -> bool
Returns true if the subpass has a depth attachment or a depth-stencil attachment.
sourcepub fn has_writable_depth(&self) -> bool
pub fn has_writable_depth(&self) -> bool
Returns true if the subpass has a depth attachment or a depth-stencil attachment whose
layout is not DepthStencilReadOnlyOptimal
.
sourcepub fn has_stencil(&self) -> bool
pub fn has_stencil(&self) -> bool
Returns true if the subpass has a stencil attachment or a depth-stencil attachment.
sourcepub fn has_writable_stencil(&self) -> bool
pub fn has_writable_stencil(&self) -> bool
Returns true if the subpass has a stencil attachment or a depth-stencil attachment whose
layout is not DepthStencilReadOnlyOptimal
.
sourcepub fn num_samples(&self) -> Option<SampleCount>
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.
sourcepub fn is_compatible_with(&self, shader_interface: &ShaderInterface) -> bool
pub fn is_compatible_with(&self, shader_interface: &ShaderInterface) -> bool
Returns true
if this subpass is compatible with the fragment output definition.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Subpass
impl Send for Subpass
impl Sync for Subpass
impl Unpin for Subpass
impl UnwindSafe for Subpass
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more