Struct wgpu_core::track::texture::TextureViewBindGroupState
source · pub(crate) struct TextureViewBindGroupState {
views: Vec<(Arc<TextureView>, TextureUses)>,
}
Expand description
Stores a bind group’s texture views + their usages (within the bind group).
Fields§
§views: Vec<(Arc<TextureView>, TextureUses)>
Implementations§
source§impl TextureViewBindGroupState
impl TextureViewBindGroupState
pub fn new() -> Self
sourcepub(crate) fn optimize(&mut self)
pub(crate) fn optimize(&mut self)
Optimize the texture bind group state by sorting it by ID.
When this list of states is merged into a tracker, the memory accesses will be in a constant ascending order.
sourcepub fn insert_single(&mut self, view: Arc<TextureView>, usage: TextureUses)
pub fn insert_single(&mut self, view: Arc<TextureView>, usage: TextureUses)
Adds the given resource with the given state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextureViewBindGroupState
impl !RefUnwindSafe for TextureViewBindGroupState
impl Send for TextureViewBindGroupState
impl Sync for TextureViewBindGroupState
impl Unpin for TextureViewBindGroupState
impl !UnwindSafe for TextureViewBindGroupState
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
Mutably borrows from an owned value. Read more