#[non_exhaustive]pub enum Type {
Show 15 variants
Scalar(ScalarType),
Vector(VectorType),
Matrix(MatrixType),
Image(ImageType),
CombinedImageSampler(CombinedImageSamplerType),
SampledImage(SampledImageType),
StorageImage(StorageImageType),
Sampler(SamplerType),
SubpassData(SubpassDataType),
Array(ArrayType),
Struct(StructType),
AccelStruct(AccelStructType),
DeviceAddress(DeviceAddressType),
DevicePointer(PointerType),
RayQuery(RayQueryType),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Scalar(ScalarType)
A single value, which can be a signed or unsigned integer, a floating point number, or a boolean value.
Vector(VectorType)
A collection of scalars.
Matrix(MatrixType)
A collection of vectors.
Image(ImageType)
An image. In most cases, this variant is elevated to
CombinedImageSampler
, SampledImage
, or StorageImage
so you
shouldn’t see this in your reflection results.
CombinedImageSampler(CombinedImageSamplerType)
A sampled image externally combined with a sampler state. Such design is preferred in OpenGL and Vulkan.
SampledImage(SampledImageType)
A sampled image yet to be combined with a Sampler
. Such design is
preferred in DirectX and Vulkan.
StorageImage(StorageImageType)
A storage image that shaders can read and/or write.
Sampler(SamplerType)
Separable sampler state.
SubpassData(SubpassDataType)
Pixel store from input attachments.
Array(ArrayType)
Repetition of a single type.
Struct(StructType)
Aggregation of types.
AccelStruct(AccelStructType)
Acceleration structure for ray-tracing. Only available with
RayTracingKHR
capability enabled.
DeviceAddress(DeviceAddressType)
Forward-declared pointer but the type of pointed data is unknown.
Usually used for GPU linked lists. See VK_KHR_buffer_device_address
.
DevicePointer(PointerType)
Forward-declared pointer. Usually used for bindless resources with the
buffer_reference
extension. See VK_KHR_buffer_device_address
.
RayQuery(RayQueryType)
Ray query payload type (rayQueryEXT
). Only available with RayQueryKHR
capability enabled.
Implementations§
source§impl Type
impl Type
pub fn min_nbyte(&self) -> Option<usize>
pub fn nbyte(&self) -> Option<usize>
pub fn member_offset(&self, member_index: usize) -> Option<usize>
pub fn access_ty(&self) -> Option<AccessType>
pub fn walk<'a>(&'a self) -> Walk<'a> ⓘ
pub fn is_scalar(&self) -> bool
pub fn is_vector(&self) -> bool
pub fn is_matrix(&self) -> bool
pub fn is_image(&self) -> bool
pub fn is_sampler(&self) -> bool
pub fn is_combined_image_sampler(&self) -> bool
pub fn is_sampled_image(&self) -> bool
pub fn is_storage_image(&self) -> bool
pub fn is_subpass_data(&self) -> bool
pub fn is_array(&self) -> bool
pub fn is_struct(&self) -> bool
pub fn is_accel_struct(&self) -> bool
pub fn is_device_address(&self) -> bool
pub fn is_device_pointer(&self) -> bool
pub fn as_scalar(&self) -> Option<&ScalarType>
pub fn as_vector(&self) -> Option<&VectorType>
pub fn as_matrix(&self) -> Option<&MatrixType>
pub fn as_image(&self) -> Option<&ImageType>
pub fn as_sampler(&self) -> Option<&SamplerType>
pub fn as_combined_image_sampler(&self) -> Option<&CombinedImageSamplerType>
pub fn as_sampled_image(&self) -> Option<&SampledImageType>
pub fn as_storage_image(&self) -> Option<&StorageImageType>
pub fn as_subpass_data(&self) -> Option<&SubpassDataType>
pub fn as_array(&self) -> Option<&ArrayType>
pub fn as_struct(&self) -> Option<&StructType>
pub fn as_accel_struct(&self) -> Option<&AccelStructType>
pub fn as_device_address(&self) -> Option<&DeviceAddressType>
pub fn as_device_pointer(&self) -> Option<&PointerType>
pub fn mutate<F>(self, f: F) -> Type
Trait Implementations§
source§impl PartialEq for Type
impl PartialEq for Type
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)