Struct wgpu_core::track::texture::ComplexTextureState
source · struct ComplexTextureState {
mips: ArrayVec<RangedStates<u32, TextureUses>, { _ }>,
}
Expand description
Represents the complex state of textures where every subresource is potentially in a different state.
Fields§
§mips: ArrayVec<RangedStates<u32, TextureUses>, { _ }>
Implementations§
source§impl ComplexTextureState
impl ComplexTextureState
sourcefn new(mip_level_count: u32, array_layer_count: u32) -> Self
fn new(mip_level_count: u32, array_layer_count: u32) -> Self
Creates complex texture state for the given sizes.
This state will be initialized with the UNKNOWN state, a special state which means the trakcer knows nothing about the state.
sourceunsafe fn from_selector_state_iter(
full_range: TextureSelector,
state_iter: impl Iterator<Item = (TextureSelector, TextureUses)>,
) -> Self
unsafe fn from_selector_state_iter( full_range: TextureSelector, state_iter: impl Iterator<Item = (TextureSelector, TextureUses)>, ) -> Self
Initialize a complex state from a selector representing the full size of the texture and an iterator of a selector and a texture use, specifying a usage for a specific set of subresources.
Self::to_selector_state_iter
can be used to create such an iterator.
§Safety
All selectors in the iterator must be inside of the full_range selector.
The full range selector must have mips and layers start at 0.
sourcefn to_selector_state_iter(
&self,
) -> impl Iterator<Item = (TextureSelector, TextureUses)> + Clone + '_
fn to_selector_state_iter( &self, ) -> impl Iterator<Item = (TextureSelector, TextureUses)> + Clone + '_
Convert a complex state into an iterator over all states stored.
Self::from_selector_state_iter
can be used to consume such an iterator.
Trait Implementations§
source§impl Clone for ComplexTextureState
impl Clone for ComplexTextureState
source§fn clone(&self) -> ComplexTextureState
fn clone(&self) -> ComplexTextureState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ComplexTextureState
impl Debug for ComplexTextureState
source§impl Default for ComplexTextureState
impl Default for ComplexTextureState
source§fn default() -> ComplexTextureState
fn default() -> ComplexTextureState
source§impl PartialEq for ComplexTextureState
impl PartialEq for ComplexTextureState
source§fn eq(&self, other: &ComplexTextureState) -> bool
fn eq(&self, other: &ComplexTextureState) -> bool
self
and other
values to be equal, and is used
by ==
.