pub struct Resolver { /* private fields */ }Expand description
A structure which can read and execute render graphs. This pattern was derived from:
http://themaister.net/blog/2017/08/15/render-graphs-and-vulkan-a-deep-dive/ https://github.com/EmbarkStudios/kajiya
Implementations
sourceimpl Resolver
impl Resolver
sourcepub fn is_resolved(&self) -> bool
pub fn is_resolved(&self) -> bool
Returns true when all recorded passes have been submitted to a driver command buffer.
A fully-resolved graph contains no additional work and may be discarded, although doing so will stall the GPU while the fences are waited on. It is preferrable to wait a few frame so that the fences will have already been signalled.
sourcepub fn node_pipeline_stages(&self, node: impl Node) -> PipelineStageFlags
pub fn node_pipeline_stages(&self, node: impl Node) -> PipelineStageFlags
Returns the stages that process the given node.
Note that this value must be retrieved before resolving a node as there will be no data left to inspect afterwards!
sourcepub fn record_node_dependencies(
&mut self,
cache: &mut HashPool,
cmd_buf: &mut CommandBuffer,
node: impl Node
) -> Result<(), DriverError>
pub fn record_node_dependencies(
&mut self,
cache: &mut HashPool,
cmd_buf: &mut CommandBuffer,
node: impl Node
) -> Result<(), DriverError>
Records any pending render graph passes that are required by the given node, but does not record any passes that actually contain the given node.
As a side effect, the graph is optimized for the given node. Future calls may further optimize the graph, but only on top of the existing optimizations. This only matters if you are pulling multiple images out and you care - in that case pull the “most important” image first.
sourcepub fn record_node(
&mut self,
cache: &mut HashPool,
cmd_buf: &mut CommandBuffer,
node: impl Node
) -> Result<(), DriverError>
pub fn record_node(
&mut self,
cache: &mut HashPool,
cmd_buf: &mut CommandBuffer,
node: impl Node
) -> Result<(), DriverError>
Records any pending render graph passes that the given node requires.
sourcepub fn record_unscheduled_passes(
&mut self,
cache: &mut HashPool,
cmd_buf: &mut CommandBuffer
) -> Result<(), DriverError>
pub fn record_unscheduled_passes(
&mut self,
cache: &mut HashPool,
cmd_buf: &mut CommandBuffer
) -> Result<(), DriverError>
Records any pending render graph passes that have not been previously scheduled.
pub fn submit(self, cache: &mut HashPool) -> Result<(), DriverError>
pub fn unbind_node<N>(&mut self, node: N) -> <N as Edge<Self>>::Result where
N: Edge<Self>,
N: Unbind<Self, <N as Edge<Self>>::Result>,
Trait Implementations
sourceimpl Unbind<Resolver, SwapchainImage> for SwapchainImageNode
impl Unbind<Resolver, SwapchainImage> for SwapchainImageNode
fn unbind(self, graph: &mut Resolver) -> SwapchainImage
Auto Trait Implementations
impl !RefUnwindSafe for Resolver
impl Send for Resolver
impl !Sync for Resolver
impl Unpin for Resolver
impl !UnwindSafe for Resolver
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