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: FastIndexMap<PredeclaredType, Handle<Type>>,
}
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 208
Call 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 16
Call Module::generate_external_texture_types
to populate this if
needed.
predeclared_types: FastIndexMap<PredeclaredType, Handle<Type>>
Types for predeclared wgsl types instantiated on demand.
Call Module::generate_predeclared_type
to populate this if
needed and return the handle.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for SpecialTypes
impl<'arbitrary> Arbitrary<'arbitrary> for SpecialTypes
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read moreSource§impl Clone for SpecialTypes
impl Clone for SpecialTypes
Source§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