WorkgroupSizeCheck

Struct WorkgroupSizeCheck 

Source
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 str

Implementations§

Source§

impl WorkgroupSizeCheck<'_>

Source

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>

Source§

fn clone(&self) -> WorkgroupSizeCheck<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for WorkgroupSizeCheck<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,