Struct screen_13::graph::RenderGraph
source · pub struct RenderGraph {
pub debug: bool,
/* private fields */
}
Expand description
A composable graph of render pass operations.
RenderGraph
instances are are intended for one-time use.
The design of this code originated with a combination of
PassBuilder
and
render_graph.cpp
.
Fields§
§debug: bool
Set to true (when in debug mode) in order to get a breakpoint hit where you want.
Implementations§
source§impl RenderGraph
impl RenderGraph
sourcepub fn begin_pass(&mut self, name: impl AsRef<str>) -> PassRef<'_>
pub fn begin_pass(&mut self, name: impl AsRef<str>) -> PassRef<'_>
Begins a new pass.
sourcepub fn bind_node<'a, B>(&'a mut self, binding: B) -> <B as Edge<Self>>::Resultwhere
B: Edge<Self> + Bind<&'a mut Self, <B as Edge<Self>>::Result>,
pub fn bind_node<'a, B>(&'a mut self, binding: B) -> <B as Edge<Self>>::Resultwhere
B: Edge<Self> + Bind<&'a mut Self, <B as Edge<Self>>::Result>,
Binds a Vulkan acceleration structure, buffer, or image to this graph.
Bound nodes may be used in passes for pipeline and shader operations.
sourcepub fn blit_image(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyImageNode>,
filter: Filter,
) -> &mut Self
pub fn blit_image( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyImageNode>, filter: Filter, ) -> &mut Self
Copy an image, potentially performing format conversion.
sourcepub fn blit_image_region(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyImageNode>,
filter: Filter,
region: ImageBlit,
) -> &mut Self
pub fn blit_image_region( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyImageNode>, filter: Filter, region: ImageBlit, ) -> &mut Self
Copy a region of an image, potentially performing format conversion.
sourcepub fn blit_image_regions(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyImageNode>,
filter: Filter,
regions: impl AsRef<[ImageBlit]> + 'static + Send,
) -> &mut Self
pub fn blit_image_regions( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyImageNode>, filter: Filter, regions: impl AsRef<[ImageBlit]> + 'static + Send, ) -> &mut Self
Copy regions of an image, potentially performing format conversion.
sourcepub fn clear_color_image(
&mut self,
image_node: impl Into<AnyImageNode>,
) -> &mut Self
pub fn clear_color_image( &mut self, image_node: impl Into<AnyImageNode>, ) -> &mut Self
Clear a color image.
sourcepub fn clear_color_image_value(
&mut self,
image_node: impl Into<AnyImageNode>,
color_value: impl Into<ClearColorValue>,
) -> &mut Self
pub fn clear_color_image_value( &mut self, image_node: impl Into<AnyImageNode>, color_value: impl Into<ClearColorValue>, ) -> &mut Self
Clear a color image.
sourcepub fn clear_depth_stencil_image(
&mut self,
image_node: impl Into<AnyImageNode>,
) -> &mut Self
pub fn clear_depth_stencil_image( &mut self, image_node: impl Into<AnyImageNode>, ) -> &mut Self
Clears a depth/stencil image.
sourcepub fn clear_depth_stencil_image_value(
&mut self,
image_node: impl Into<AnyImageNode>,
depth: f32,
stencil: u32,
) -> &mut Self
pub fn clear_depth_stencil_image_value( &mut self, image_node: impl Into<AnyImageNode>, depth: f32, stencil: u32, ) -> &mut Self
Clears a depth/stencil image.
sourcepub fn copy_buffer(
&mut self,
src_node: impl Into<AnyBufferNode>,
dst_node: impl Into<AnyBufferNode>,
) -> &mut Self
pub fn copy_buffer( &mut self, src_node: impl Into<AnyBufferNode>, dst_node: impl Into<AnyBufferNode>, ) -> &mut Self
Copy data between buffers
sourcepub fn copy_buffer_region(
&mut self,
src_node: impl Into<AnyBufferNode>,
dst_node: impl Into<AnyBufferNode>,
region: BufferCopy,
) -> &mut Self
pub fn copy_buffer_region( &mut self, src_node: impl Into<AnyBufferNode>, dst_node: impl Into<AnyBufferNode>, region: BufferCopy, ) -> &mut Self
Copy data between buffer regions.
sourcepub fn copy_buffer_regions(
&mut self,
src_node: impl Into<AnyBufferNode>,
dst_node: impl Into<AnyBufferNode>,
regions: impl AsRef<[BufferCopy]> + 'static + Send,
) -> &mut Self
pub fn copy_buffer_regions( &mut self, src_node: impl Into<AnyBufferNode>, dst_node: impl Into<AnyBufferNode>, regions: impl AsRef<[BufferCopy]> + 'static + Send, ) -> &mut Self
Copy data between buffer regions.
sourcepub fn copy_buffer_to_image(
&mut self,
src_node: impl Into<AnyBufferNode>,
dst_node: impl Into<AnyImageNode>,
) -> &mut Self
pub fn copy_buffer_to_image( &mut self, src_node: impl Into<AnyBufferNode>, dst_node: impl Into<AnyImageNode>, ) -> &mut Self
Copy data from a buffer into an image.
sourcepub fn copy_buffer_to_image_region(
&mut self,
src_node: impl Into<AnyBufferNode>,
dst_node: impl Into<AnyImageNode>,
region: BufferImageCopy,
) -> &mut Self
pub fn copy_buffer_to_image_region( &mut self, src_node: impl Into<AnyBufferNode>, dst_node: impl Into<AnyImageNode>, region: BufferImageCopy, ) -> &mut Self
Copy data from a buffer into an image.
sourcepub fn copy_buffer_to_image_regions(
&mut self,
src_node: impl Into<AnyBufferNode>,
dst_node: impl Into<AnyImageNode>,
regions: impl AsRef<[BufferImageCopy]> + 'static + Send,
) -> &mut Self
pub fn copy_buffer_to_image_regions( &mut self, src_node: impl Into<AnyBufferNode>, dst_node: impl Into<AnyImageNode>, regions: impl AsRef<[BufferImageCopy]> + 'static + Send, ) -> &mut Self
Copy data from a buffer into an image.
sourcepub fn copy_image(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyImageNode>,
) -> &mut Self
pub fn copy_image( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyImageNode>, ) -> &mut Self
Copy data between images.
sourcepub fn copy_image_region(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyImageNode>,
region: ImageCopy,
) -> &mut Self
pub fn copy_image_region( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyImageNode>, region: ImageCopy, ) -> &mut Self
Copy data between images.
sourcepub fn copy_image_regions(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyImageNode>,
regions: impl AsRef<[ImageCopy]> + 'static + Send,
) -> &mut Self
pub fn copy_image_regions( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyImageNode>, regions: impl AsRef<[ImageCopy]> + 'static + Send, ) -> &mut Self
Copy data between images.
sourcepub fn copy_image_to_buffer(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyBufferNode>,
) -> &mut Self
pub fn copy_image_to_buffer( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyBufferNode>, ) -> &mut Self
Copy image data into a buffer.
sourcepub fn copy_image_to_buffer_region(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyBufferNode>,
region: BufferImageCopy,
) -> &mut Self
pub fn copy_image_to_buffer_region( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyBufferNode>, region: BufferImageCopy, ) -> &mut Self
Copy image data into a buffer.
sourcepub fn copy_image_to_buffer_regions(
&mut self,
src_node: impl Into<AnyImageNode>,
dst_node: impl Into<AnyBufferNode>,
regions: impl AsRef<[BufferImageCopy]> + 'static + Send,
) -> &mut Self
pub fn copy_image_to_buffer_regions( &mut self, src_node: impl Into<AnyImageNode>, dst_node: impl Into<AnyBufferNode>, regions: impl AsRef<[BufferImageCopy]> + 'static + Send, ) -> &mut Self
Copy image data into a buffer.
sourcepub fn fill_buffer(
&mut self,
buffer_node: impl Into<AnyBufferNode>,
data: u32,
) -> &mut Self
pub fn fill_buffer( &mut self, buffer_node: impl Into<AnyBufferNode>, data: u32, ) -> &mut Self
Fill a region of a buffer with a fixed value.
sourcepub fn fill_buffer_region(
&mut self,
buffer_node: impl Into<AnyBufferNode>,
data: u32,
region: Range<DeviceSize>,
) -> &mut Self
pub fn fill_buffer_region( &mut self, buffer_node: impl Into<AnyBufferNode>, data: u32, region: Range<DeviceSize>, ) -> &mut Self
Fill a region of a buffer with a fixed value.
sourcepub fn node_device_address(
&self,
node: impl Into<AnyBufferNode>,
) -> DeviceAddress
pub fn node_device_address( &self, node: impl Into<AnyBufferNode>, ) -> DeviceAddress
Returns the device address of a buffer node.
§Panics
Panics if the buffer is not currently bound or was not created with the
SHADER_DEVICE_ADDRESS
usage flag.
sourcepub fn node_info<N>(&self, node: N) -> <N as Information>::Infowhere
N: Information,
pub fn node_info<N>(&self, node: N) -> <N as Information>::Infowhere
N: Information,
Returns information used to crate a node.
sourcepub fn resolve(self) -> Resolver
pub fn resolve(self) -> Resolver
Finalizes the graph and provides an object with functions for submitting the resulting commands.
sourcepub fn unbind_node<N>(&mut self, node: N) -> <N as Edge<Self>>::Resultwhere
N: Edge<Self> + Unbind<Self, <N as Edge<Self>>::Result>,
pub fn unbind_node<N>(&mut self, node: N) -> <N as Edge<Self>>::Resultwhere
N: Edge<Self> + Unbind<Self, <N as Edge<Self>>::Result>,
Removes a node from this graph.
Future access to node
on this graph will return invalid results.
sourcepub fn update_buffer(
&mut self,
buffer_node: impl Into<AnyBufferNode>,
data: impl AsRef<[u8]> + 'static + Send,
) -> &mut Self
pub fn update_buffer( &mut self, buffer_node: impl Into<AnyBufferNode>, data: impl AsRef<[u8]> + 'static + Send, ) -> &mut Self
Note: data
must not exceed 65536 bytes.
sourcepub fn update_buffer_offset(
&mut self,
buffer_node: impl Into<AnyBufferNode>,
offset: DeviceSize,
data: impl AsRef<[u8]> + 'static + Send,
) -> &mut Self
pub fn update_buffer_offset( &mut self, buffer_node: impl Into<AnyBufferNode>, offset: DeviceSize, data: impl AsRef<[u8]> + 'static + Send, ) -> &mut Self
Note: data
must not exceed 65536 bytes.