pub(crate) struct VertexState {
slots: [Option<VertexSlot>; 16],
pub(crate) limits: VertexLimits,
}Expand description
Vertex buffer tracking state, shared between render passes and render bundles.
Tracks which vertex buffer slots are set, and caches the vertex and instance limits derived from those buffers and the current pipeline, avoiding recomputation on each draw.
Fields§
§slots: [Option<VertexSlot>; 16]§limits: VertexLimitsImplementations§
Source§impl VertexState
impl VertexState
Sourcepub(crate) fn set_buffer(
&mut self,
slot: usize,
buffer: Arc<Buffer>,
range: Range<BufferAddress>,
)
pub(crate) fn set_buffer( &mut self, slot: usize, buffer: Arc<Buffer>, range: Range<BufferAddress>, )
Set a vertex buffer slot, marking it dirty.
Sourcepub(crate) fn clear_buffer(&mut self, slot: usize)
pub(crate) fn clear_buffer(&mut self, slot: usize)
Clear a vertex buffer slot.
Sourcepub(crate) fn update_limits(&mut self, pipeline_steps: &[Option<VertexStep>])
pub(crate) fn update_limits(&mut self, pipeline_steps: &[Option<VertexStep>])
Recompute the cached vertex and instance limits based on the current slots and pipeline.
fn last_assigned_index(&self) -> Option<usize>
pub(super) fn validate( &self, pipeline: &RenderPipeline, binder: &Binder, ) -> Result<(), DrawError>
Trait Implementations§
Source§impl Debug for VertexState
impl Debug for VertexState
Source§impl Default for VertexState
impl Default for VertexState
Source§fn default() -> VertexState
fn default() -> VertexState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VertexState
impl !RefUnwindSafe for VertexState
impl Send for VertexState
impl Sync for VertexState
impl Unpin for VertexState
impl !UnwindSafe for VertexState
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more