pub struct TaskNodeBuilder<'a> { /* private fields */ }
Expand description
A builder used to add resource accesses and attachments to a TaskNode
.
Implementations§
Source§impl TaskNodeBuilder<'_>
impl TaskNodeBuilder<'_>
Sourcepub fn buffer_access(
&mut self,
id: Id<Buffer>,
access_types: AccessTypes,
) -> &mut Self
pub fn buffer_access( &mut self, id: Id<Buffer>, access_types: AccessTypes, ) -> &mut Self
Adds a buffer access to the task node.
§Panics
- Panics if
id
is not a valid virtual resource ID nor a valid physical ID. - Panics if
access_types
contains any access type that’s not a valid buffer access type.
Sourcepub fn image_access(
&mut self,
id: Id<Image>,
access_types: AccessTypes,
layout_type: ImageLayoutType,
) -> &mut Self
pub fn image_access( &mut self, id: Id<Image>, access_types: AccessTypes, layout_type: ImageLayoutType, ) -> &mut Self
Adds an image access to the task node.
§Panics
- Panics if
id
is not a valid virtual resource ID nor a valid physical ID. - Panics if
access_types
contains any access type that’s not a valid image access type. - Panics if
access_types
contains attachment access types as well as other access types. - Panics if
access_types
contains both color and depth/stencil access types. - Panics if an access for
id
was already added and its image layout doesn’t equalaccess_types.image_layout(layout_type)
.
Sourcepub fn framebuffer(&mut self, id: Id<Framebuffer>) -> &mut Self
pub fn framebuffer(&mut self, id: Id<Framebuffer>) -> &mut Self
Sets the framebuffer that the task node’s attachments will belong to. You must call this method before adding attachments to the task node.
§Panics
- Panics if
id
is not a valid framebuffer ID. - Panics if the framebuffer was already set.
Sourcepub fn input_attachment(
&mut self,
id: Id<Image>,
access_types: AccessTypes,
layout_type: ImageLayoutType,
attachment_info: &AttachmentInfo<'_>,
) -> &mut Self
pub fn input_attachment( &mut self, id: Id<Image>, access_types: AccessTypes, layout_type: ImageLayoutType, attachment_info: &AttachmentInfo<'_>, ) -> &mut Self
Adds an input attachment to the task node.
§Panics
- Panics if the framebuffer wasn’t set beforehand.
- Panics if
id
is not a valid virtual resource ID nor a valid physical ID. - Panics if
access_types
contains any access type that’s not an input attachment access type. - Panics if an input attachment for
id
was already added. - Panics if an input attachment using the
attachment_info.index
was already added. - Panics if a color or depth/stencil attachment using
id
was added but the attachment infos don’t match. - Panics if an access for
id
was already added and its image layout doesn’t equalaccess_types.image_layout(layout_type)
.
Sourcepub fn color_attachment(
&mut self,
id: Id<Image>,
access_types: AccessTypes,
layout_type: ImageLayoutType,
attachment_info: &AttachmentInfo<'_>,
) -> &mut Self
pub fn color_attachment( &mut self, id: Id<Image>, access_types: AccessTypes, layout_type: ImageLayoutType, attachment_info: &AttachmentInfo<'_>, ) -> &mut Self
Adds a color attachment to the task node.
§Panics
- Panics if the framebuffer wasn’t set beforehand.
- Panics if
id
is not a valid virtual resource ID nor a valid physical ID. - Panics if
access_types
contains any access type that’s not a color attachment access type. - Panics if a color attachment using
id
was already added. - Panics if a color attachment using the
attachment_info.index
was already added. - Panics if an input attachment using
id
was added but the attachment infos don’t match. - Panics if
attachment_info.format
is not a color format. - Panics if an access for
id
was already added and its image layout doesn’t equalaccess_types.image_layout(layout_type)
.
Sourcepub fn depth_stencil_attachment(
&mut self,
id: Id<Image>,
access_types: AccessTypes,
layout_type: ImageLayoutType,
attachment_info: &AttachmentInfo<'_>,
) -> &mut Self
pub fn depth_stencil_attachment( &mut self, id: Id<Image>, access_types: AccessTypes, layout_type: ImageLayoutType, attachment_info: &AttachmentInfo<'_>, ) -> &mut Self
Adds a depth/stencil attachment to the task node.
§Panics
- Panics if the framebuffer wasn’t set beforehand.
- Panics if
id
is not a valid virtual resource ID nor a valid physical ID. - Panics if
access_types
contains any access type that’s not a depth/stencil attachment access type. - Panics if a depth/stencil attachment was already added.
- Panics if an input attachment using
id
was added but the attachment infos don’t match. - Panics if
attachment_info.format
is not a depth/stencil format. - Panics if an access for
id
was already added and its image layout doesn’t equalaccess_types.image_layout(layout_type)
.
Auto Trait Implementations§
impl<'a> Freeze for TaskNodeBuilder<'a>
impl<'a> !RefUnwindSafe for TaskNodeBuilder<'a>
impl<'a> Send for TaskNodeBuilder<'a>
impl<'a> Sync for TaskNodeBuilder<'a>
impl<'a> Unpin for TaskNodeBuilder<'a>
impl<'a> !UnwindSafe for TaskNodeBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more