Struct rafx_api::RafxShaderPackage
source · pub struct RafxShaderPackage {
pub gles2: Option<RafxShaderPackageGles2>,
pub gles3: Option<RafxShaderPackageGles3>,
pub dx12: Option<RafxShaderPackageDx12>,
pub metal: Option<RafxShaderPackageMetal>,
pub vk: Option<RafxShaderPackageVulkan>,
pub vk_reflection: Option<Vec<RafxReflectedEntryPoint>>,
pub dx12_reflection: Option<Vec<RafxReflectedEntryPoint>>,
pub metal_reflection: Option<Vec<RafxReflectedEntryPoint>>,
pub gles2_reflection: Option<Vec<RafxReflectedEntryPoint>>,
pub gles3_reflection: Option<Vec<RafxReflectedEntryPoint>>,
pub debug_name: Option<String>,
}
Expand description
Owns data necessary to create a shader module in (optionally) multiple APIs.
This struct can be serialized/deserialized and is intended to allow asset pipeline to store a shader module to be created at runtime. The package can optionally include data for multiple APIs allowing a single file to be used with whatever API is found at runtime.
Optionally, reflection data can be packaged along with shaders. Shaders may have platform-specific changes that produce different reflection data, so reflection is stored per-api
Fields§
§gles2: Option<RafxShaderPackageGles2>
§gles3: Option<RafxShaderPackageGles3>
§dx12: Option<RafxShaderPackageDx12>
§metal: Option<RafxShaderPackageMetal>
§vk: Option<RafxShaderPackageVulkan>
§vk_reflection: Option<Vec<RafxReflectedEntryPoint>>
§dx12_reflection: Option<Vec<RafxReflectedEntryPoint>>
§metal_reflection: Option<Vec<RafxReflectedEntryPoint>>
§gles2_reflection: Option<Vec<RafxReflectedEntryPoint>>
§gles3_reflection: Option<Vec<RafxReflectedEntryPoint>>
§debug_name: Option<String>
Implementations§
source§impl RafxShaderPackage
impl RafxShaderPackage
pub fn reflection( &self, api_type: RafxApiType ) -> Option<&Vec<RafxReflectedEntryPoint>>
pub fn find_entry_point( &self, api_type: RafxApiType, entry_point_name: &str ) -> Option<&RafxReflectedEntryPoint>
pub fn module_def(&self) -> RafxShaderModuleDef<'_>
Trait Implementations§
source§impl Clone for RafxShaderPackage
impl Clone for RafxShaderPackage
source§fn clone(&self) -> RafxShaderPackage
fn clone(&self) -> RafxShaderPackage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RafxShaderPackage
impl Debug for RafxShaderPackage
source§impl Default for RafxShaderPackage
impl Default for RafxShaderPackage
source§fn default() -> RafxShaderPackage
fn default() -> RafxShaderPackage
Returns the “default value” for a type. Read more
source§impl Hash for RafxShaderPackage
impl Hash for RafxShaderPackage
source§impl PartialEq for RafxShaderPackage
impl PartialEq for RafxShaderPackage
source§fn eq(&self, other: &RafxShaderPackage) -> bool
fn eq(&self, other: &RafxShaderPackage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for RafxShaderPackage
impl StructuralPartialEq for RafxShaderPackage
Auto Trait Implementations§
impl RefUnwindSafe for RafxShaderPackage
impl Send for RafxShaderPackage
impl Sync for RafxShaderPackage
impl Unpin for RafxShaderPackage
impl UnwindSafe for RafxShaderPackage
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
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.