Struct ExecutableTaskGraph

Source
pub struct ExecutableTaskGraph<W: ?Sized> { /* private fields */ }
Expand description

A TaskGraph that has been compiled into an executable form.

Implementations§

Source§

impl<W: ?Sized> ExecutableTaskGraph<W>

Source

pub fn decompile(self) -> TaskGraph<W>

Decompiles the graph back into a modifiable form.

Source§

impl<W: ?Sized + 'static> ExecutableTaskGraph<W>

Source

pub unsafe fn execute( &self, resource_map: ResourceMap<'_>, world: &W, pre_present_notify: impl FnOnce(), ) -> Result<(), ExecuteError>

Executes the next frame of the [flight] given by flight_id.

§Safety
  • There must be no other task graphs executing that access any of the same subresources as self.
  • A subresource in flight must not be accessed in more than one frame in flight.
§Panics
  • Panics if resource_map doesn’t map the virtual resources of self exhaustively.
  • Panics if self.flight_id() is invalid.
  • Panics if another thread is already executing a task graph using the flight.
  • Panics if resource_map maps to any swapchain that isn’t owned by the flight.
  • Panics if the oldest frame of the flight wasn’t waited on.
Source§

impl<W: ?Sized> ExecutableTaskGraph<W>

Source

pub fn task_node(&self, id: NodeId) -> Result<&TaskNode<W>, TaskGraphError>

Returns a reference to the task node corresponding to id.

Source

pub fn task_node_mut( &mut self, id: NodeId, ) -> Result<&mut TaskNode<W>, TaskGraphError>

Returns a mutable reference to the task node corresponding to id.

Source

pub fn task_nodes(&self) -> TaskNodes<'_, W>

Returns an iterator over all TaskNodes.

Source

pub fn task_nodes_mut(&mut self) -> TaskNodesMut<'_, W>

Returns an iterator over all TaskNodes that allows you to mutate them.

Source

pub fn flight_id(&self) -> Id<Flight>

Returns the flight ID that the task graph was compiled with.

Trait Implementations§

Source§

impl<W: ?Sized> Debug for ExecutableTaskGraph<W>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<W: ?Sized> DeviceOwned for ExecutableTaskGraph<W>

Source§

fn device(&self) -> &Arc<Device>

Returns the device that owns self.

Auto Trait Implementations§

§

impl<W> !Freeze for ExecutableTaskGraph<W>

§

impl<W> !RefUnwindSafe for ExecutableTaskGraph<W>

§

impl<W> Send for ExecutableTaskGraph<W>
where W: ?Sized,

§

impl<W> !Sync for ExecutableTaskGraph<W>

§

impl<W> Unpin for ExecutableTaskGraph<W>
where W: ?Sized,

§

impl<W> !UnwindSafe for ExecutableTaskGraph<W>

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