Struct SpecialTypes
pub struct SpecialTypes {
pub ray_desc: Option<Handle<Type>>,
pub ray_intersection: Option<Handle<Type>>,
pub ray_vertex_return: Option<Handle<Type>>,
pub external_texture_params: Option<Handle<Type>>,
pub external_texture_transfer_function: Option<Handle<Type>>,
pub predeclared_types: IndexMap<PredeclaredType, Handle<Type>, BuildHasherDefault<FxHasher>>,
}unstable-wgpu-27 only.Expand description
Set of special types that can be optionally generated by the frontends.
Fields§
§ray_desc: Option<Handle<Type>>Type for RayDesc.
Call Module::generate_ray_desc_type to populate this if
needed and return the handle.
ray_intersection: Option<Handle<Type>>Type for RayIntersection.
Call Module::generate_ray_intersection_type to populate
this if needed and return the handle.
ray_vertex_return: Option<Handle<Type>>Type for RayVertexReturn.
external_texture_params: Option<Handle<Type>>Struct containing parameters required by some backends to emit code for
ImageClass::External textures.
See wgpu_core::device::resource::ExternalTextureParams for the
documentation of each field.
In WGSL, this type would be:
struct NagaExternalTextureParams { // align size offset
yuv_conversion_matrix: mat4x4<f32>, // 16 64 0
gamut_conversion_matrix: mat3x3<f32>, // 16 48 64
src_tf: NagaExternalTextureTransferFn, // 4 16 112
dst_tf: NagaExternalTextureTransferFn, // 4 16 128
sample_transform: mat3x2<f32>, // 8 24 144
load_transform: mat3x2<f32>, // 8 24 168
size: vec2<u32>, // 8 8 192
num_planes: u32, // 4 4 200
} // whole struct: 16 208Call Module::generate_external_texture_types to populate this if
needed.
external_texture_transfer_function: Option<Handle<Type>>Struct describing a gamma encoding transfer function. Member of
NagaExternalTextureParams, describing how the backend should perform
color space conversion when sampling from ImageClass::External
textures.
In WGSL, this type would be:
struct NagaExternalTextureTransferFn { // align size offset
a: f32, // 4 4 0
b: f32, // 4 4 4
g: f32, // 4 4 8
k: f32, // 4 4 12
} // whole struct: 4 16Call Module::generate_external_texture_types to populate this if
needed.
predeclared_types: IndexMap<PredeclaredType, Handle<Type>, BuildHasherDefault<FxHasher>>Types for predeclared wgsl types instantiated on demand.
Call Module::generate_predeclared_type to populate this if
needed and return the handle.
Trait Implementations§
§impl Clone for SpecialTypes
impl Clone for SpecialTypes
§fn clone(&self) -> SpecialTypes
fn clone(&self) -> SpecialTypes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SpecialTypes
impl Debug for SpecialTypes
§impl Default for SpecialTypes
impl Default for SpecialTypes
§fn default() -> SpecialTypes
fn default() -> SpecialTypes
Auto Trait Implementations§
impl Freeze for SpecialTypes
impl RefUnwindSafe for SpecialTypes
impl Send for SpecialTypes
impl Sync for SpecialTypes
impl Unpin for SpecialTypes
impl UnwindSafe for SpecialTypes
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.