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 more