pub(crate) struct WorkgroupSizeCheck<'a> {
pub dimensions: &'a [u32; 3],
pub per_dimension_limits: &'a [u32; 3],
pub per_dimension_limits_desc: &'static str,
pub total_limit: u32,
pub total_limit_desc: &'static str,
}Expand description
A helper type for avoiding argument order mistakes when calling
Self::check_and_compute_total_invocations.
Fields§
§dimensions: &'a [u32; 3]§per_dimension_limits: &'a [u32; 3]§per_dimension_limits_desc: &'static str§total_limit: u32§total_limit_desc: &'static strImplementations§
Source§impl WorkgroupSizeCheck<'_>
impl WorkgroupSizeCheck<'_>
Sourcepub(crate) fn check_and_compute_total_invocations(
self,
) -> Result<u32, InvalidWorkgroupSizeError>
pub(crate) fn check_and_compute_total_invocations( self, ) -> Result<u32, InvalidWorkgroupSizeError>
Check X/Y/Z workgroup sizes against per-dimension and overall limits.
This function does not check that the sizes are non-zero. In a dispatch, it is legal for the size to be zero. In shader or pipeline creation, it is an error for the size to be zero, and the caller must check that.
Trait Implementations§
Source§impl<'a> Clone for WorkgroupSizeCheck<'a>
impl<'a> Clone for WorkgroupSizeCheck<'a>
Source§fn clone(&self) -> WorkgroupSizeCheck<'a>
fn clone(&self) -> WorkgroupSizeCheck<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for WorkgroupSizeCheck<'a>
impl<'a> RefUnwindSafe for WorkgroupSizeCheck<'a>
impl<'a> Send for WorkgroupSizeCheck<'a>
impl<'a> Sync for WorkgroupSizeCheck<'a>
impl<'a> Unpin for WorkgroupSizeCheck<'a>
impl<'a> UnwindSafe for WorkgroupSizeCheck<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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