pub struct BarrierOp { /* private fields */ }Expand description
One barrier the executor must insert before a pass runs. Per-backend
interpretation: Vulkan emits vkCmdPipelineBarrier; DirectX emits
D3D12_RESOURCE_BARRIER; Metal mostly ignores them (implicit hazard
tracking) but may translate from: Write, to: Read on the cull ICB
path into an explicit useResource(.Write) declaration.
Implementations§
Source§impl BarrierOp
impl BarrierOp
Sourcepub fn resource_index(self) -> usize
pub fn resource_index(self) -> usize
Pass-local accessors so callers don’t have to import ResourceId.
Returns the resource’s stable index, the same value the executor
uses to look the resource up in CompiledGraph.resources.
Sourcepub fn source_state(self) -> ResourceState
pub fn source_state(self) -> ResourceState
Accessor for the transition’s source state, paired with to_state.
Sourcepub fn to_state(self) -> ResourceState
pub fn to_state(self) -> ResourceState
The transition’s destination state.
Sourcepub fn read_stages(self) -> ReadStages
pub fn read_stages(self) -> ReadStages
Stage union of this barrier’s Read side: the consuming run’s stages for a
* -> Read transition (the backend must make the producing write visible
to all of them), the prior run’s stages for a Read -> Write (WAR).
Empty when neither side is Read.
Trait Implementations§
impl Copy for BarrierOp
impl Eq for BarrierOp
impl StructuralPartialEq for BarrierOp
Auto Trait Implementations§
impl Freeze for BarrierOp
impl RefUnwindSafe for BarrierOp
impl Send for BarrierOp
impl Sync for BarrierOp
impl Unpin for BarrierOp
impl UnsafeUnpin for BarrierOp
impl UnwindSafe for BarrierOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.