Struct ForceShaderModelToken
pub struct ForceShaderModelToken {
inner: Option<DxcShaderModel>,
}Expand description
Used to force wgpu to expose certain features on passthrough shaders even when those features aren’t present on runtime-compiled shaders
Fields§
§inner: Option<DxcShaderModel>Implementations§
§impl ForceShaderModelToken
impl ForceShaderModelToken
pub const fn default() -> ForceShaderModelToken
pub const fn default() -> ForceShaderModelToken
This function is identical to Default::default() except that it is a const fn.
§impl ForceShaderModelToken
impl ForceShaderModelToken
pub const unsafe fn with_shader_model(
sm: DxcShaderModel,
) -> ForceShaderModelToken
pub const unsafe fn with_shader_model( sm: DxcShaderModel, ) -> ForceShaderModelToken
Creates an unsafe token, opting you in to seeing features that you may not necessarily use on standard runtime-compiled shaders.
§Safety
Do not make use in runtime-compiled shaders of any features that may not be supported by the FXC or DXC version you use.
pub const fn get(&self) -> Option<DxcShaderModel>
pub const fn get(&self) -> Option<DxcShaderModel>
Returns the shader model version, if any, in this token.
Trait Implementations§
§impl Clone for ForceShaderModelToken
impl Clone for ForceShaderModelToken
§fn clone(&self) -> ForceShaderModelToken
fn clone(&self) -> ForceShaderModelToken
Returns a duplicate 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 more§impl Debug for ForceShaderModelToken
impl Debug for ForceShaderModelToken
§impl Default for ForceShaderModelToken
impl Default for ForceShaderModelToken
§fn default() -> ForceShaderModelToken
fn default() -> ForceShaderModelToken
Returns the “default value” for a type. Read more
§impl PartialEq for ForceShaderModelToken
impl PartialEq for ForceShaderModelToken
impl Eq for ForceShaderModelToken
impl StructuralPartialEq for ForceShaderModelToken
Auto Trait Implementations§
impl Freeze for ForceShaderModelToken
impl RefUnwindSafe for ForceShaderModelToken
impl Send for ForceShaderModelToken
impl Sync for ForceShaderModelToken
impl Unpin for ForceShaderModelToken
impl UnwindSafe for ForceShaderModelToken
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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>
Converts
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>
Converts
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