struct ImageCoordinates {
value_id: Word,
type_id: Word,
size: Option<VectorSize>,
}
Expand description
Information about a vector of coordinates.
The coordinate vectors expected by SPIR-V OpImageRead
and OpImageFetch
supply the array index for arrayed images as an additional component at
the end, whereas Naga’s ImageLoad
, ImageStore
, and ImageSample
carry
the array index as a separate field.
In the process of generating code to compute the combined vector, we also produce SPIR-V types and vector lengths that are useful elsewhere. This struct gathers that information into one place, with standard names.
Fields§
§value_id: Word
The SPIR-V id of the combined coordinate/index vector value.
Note: when indexing a non-arrayed 1D image, this will be a scalar.
type_id: Word
The SPIR-V id of the type of value
.
size: Option<VectorSize>
The number of components in value
, if it is a vector, or None
if it
is a scalar.
Auto Trait Implementations§
impl Freeze for ImageCoordinates
impl RefUnwindSafe for ImageCoordinates
impl Send for ImageCoordinates
impl Sync for ImageCoordinates
impl Unpin for ImageCoordinates
impl UnwindSafe for ImageCoordinates
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