pub struct ForceShaderModelToken { /* private fields */ }Expand description
Used to force wgpu to expose certain features on passthrough shaders even when those features aren’t present on runtime-compiled shaders
Implementations§
Source§impl ForceShaderModelToken
impl ForceShaderModelToken
Sourcepub unsafe fn with_shader_model(sm: DxcShaderModel) -> Self
pub unsafe fn with_shader_model(sm: DxcShaderModel) -> Self
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.
Sourcepub fn get(&self) -> Option<DxcShaderModel>
pub fn get(&self) -> Option<DxcShaderModel>
Returns the shader model version, if any, in this token.
Trait Implementations§
Source§impl Clone for ForceShaderModelToken
impl Clone for ForceShaderModelToken
Source§impl Debug for ForceShaderModelToken
impl Debug for ForceShaderModelToken
Auto Trait Implementations§
impl Forget for ForceShaderModelToken
impl Freeze for ForceShaderModelToken
impl Move for ForceShaderModelToken
impl RefUnwindSafe for ForceShaderModelToken
impl Send for ForceShaderModelToken
impl Sync for ForceShaderModelToken
impl Unpin for ForceShaderModelToken
impl UnsafeUnpin 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,
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