pub(crate) struct DrawBatcher {
batches: HashMap<(TrackerIndex, u64, usize), DrawIndirectValidationBatch, BuildHasherDefault<FxHasher>>,
current_dst_entry: Option<CurrentEntry>,
}Expand description
Accumulates all needed data needed to validate indirect draws.
Fields§
§batches: HashMap<(TrackerIndex, u64, usize), DrawIndirectValidationBatch, BuildHasherDefault<FxHasher>>§current_dst_entry: Option<CurrentEntry>Implementations§
Source§impl DrawBatcher
impl DrawBatcher
pub(crate) fn new() -> Self
Sourcepub(crate) fn add<'a>(
&mut self,
indirect_draw_validation_resources: &'a mut DrawResources,
device: &Device,
src_buffer: &Arc<Buffer>,
offset: u64,
family: DrawCommandFamily,
vertex_or_index_limit: u64,
instance_limit: u64,
) -> Result<(usize, u64), DeviceError>
pub(crate) fn add<'a>( &mut self, indirect_draw_validation_resources: &'a mut DrawResources, device: &Device, src_buffer: &Arc<Buffer>, offset: u64, family: DrawCommandFamily, vertex_or_index_limit: u64, instance_limit: u64, ) -> Result<(usize, u64), DeviceError>
Add an indirect draw to be validated.
Returns the index of the indirect buffer in indirect_draw_validation_resources
and the offset to be used for the draw.
Auto Trait Implementations§
impl Freeze for DrawBatcher
impl !RefUnwindSafe for DrawBatcher
impl Send for DrawBatcher
impl Sync for DrawBatcher
impl Unpin for DrawBatcher
impl !UnwindSafe for DrawBatcher
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