pub struct SpirvCompilation { /* private fields */ }
Expand description
A reflectable shader compilation via glslang.
Trait Implementations§
Source§impl Clone for SpirvCompilation
impl Clone for SpirvCompilation
Source§fn clone(&self) -> SpirvCompilation
fn clone(&self) -> SpirvCompilation
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 moreSource§impl Debug for SpirvCompilation
impl Debug for SpirvCompilation
Source§impl FromCompilation<SpirvCompilation, Naga> for MSL
Available on non-crate feature stable
only.
impl FromCompilation<SpirvCompilation, Naga> for MSL
Available on non-crate feature
stable
only.Source§type Options = Option<MslVersion>
type Options = Option<MslVersion>
Options provided to the compiler.
Source§type Context = NagaMslContext
type Context = NagaMslContext
Additional context returned by the compiler after compilation.
Source§type Output = impl CompileReflectShader<<MSL as FromCompilation<SpirvCompilation, Naga>>::Target, SpirvCompilation, Naga>
type Output = impl CompileReflectShader<<MSL as FromCompilation<SpirvCompilation, Naga>>::Target, SpirvCompilation, Naga>
The output type after conversion.
Source§fn from_compilation(
compile: SpirvCompilation,
) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
fn from_compilation( compile: SpirvCompilation, ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
Tries to convert the input object into an object ready for compilation.
Source§impl FromCompilation<SpirvCompilation, Naga> for SPIRV
Available on non-crate feature stable
only.
impl FromCompilation<SpirvCompilation, Naga> for SPIRV
Available on non-crate feature
stable
only.Source§type Options = NagaSpirvOptions
type Options = NagaSpirvOptions
Options provided to the compiler.
Source§type Context = NagaSpirvContext
type Context = NagaSpirvContext
Additional context returned by the compiler after compilation.
Source§type Output = impl CompileReflectShader<<SPIRV as FromCompilation<SpirvCompilation, Naga>>::Target, SpirvCompilation, Naga>
type Output = impl CompileReflectShader<<SPIRV as FromCompilation<SpirvCompilation, Naga>>::Target, SpirvCompilation, Naga>
The output type after conversion.
Source§fn from_compilation(
compile: SpirvCompilation,
) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
fn from_compilation( compile: SpirvCompilation, ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
Tries to convert the input object into an object ready for compilation.
Source§impl FromCompilation<SpirvCompilation, Naga> for WGSL
Available on non-crate feature stable
only.
impl FromCompilation<SpirvCompilation, Naga> for WGSL
Available on non-crate feature
stable
only.Source§type Options = NagaLoweringOptions
type Options = NagaLoweringOptions
Options provided to the compiler.
Source§type Context = NagaWgslContext
type Context = NagaWgslContext
Additional context returned by the compiler after compilation.
Source§type Output = impl CompileReflectShader<<WGSL as FromCompilation<SpirvCompilation, Naga>>::Target, SpirvCompilation, Naga>
type Output = impl CompileReflectShader<<WGSL as FromCompilation<SpirvCompilation, Naga>>::Target, SpirvCompilation, Naga>
The output type after conversion.
Source§fn from_compilation(
compile: SpirvCompilation,
) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
fn from_compilation( compile: SpirvCompilation, ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
Tries to convert the input object into an object ready for compilation.
Source§impl FromCompilation<SpirvCompilation, SpirvCross> for GLSL
Available on non-crate feature stable
only.
impl FromCompilation<SpirvCompilation, SpirvCross> for GLSL
Available on non-crate feature
stable
only.Source§type Options = GlslVersion
type Options = GlslVersion
Options provided to the compiler.
Source§type Context = CrossGlslContext
type Context = CrossGlslContext
Additional context returned by the compiler after compilation.
Source§type Output = impl CompileReflectShader<<GLSL as FromCompilation<SpirvCompilation, SpirvCross>>::Target, SpirvCompilation, SpirvCross>
type Output = impl CompileReflectShader<<GLSL as FromCompilation<SpirvCompilation, SpirvCross>>::Target, SpirvCompilation, SpirvCross>
The output type after conversion.
Source§fn from_compilation(
compile: SpirvCompilation,
) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
fn from_compilation( compile: SpirvCompilation, ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
Tries to convert the input object into an object ready for compilation.
Source§impl FromCompilation<SpirvCompilation, SpirvCross> for HLSL
Available on non-crate feature stable
only.
impl FromCompilation<SpirvCompilation, SpirvCross> for HLSL
Available on non-crate feature
stable
only.Source§type Options = Option<HlslShaderModel>
type Options = Option<HlslShaderModel>
Options provided to the compiler.
Source§type Context = CrossHlslContext
type Context = CrossHlslContext
Additional context returned by the compiler after compilation.
Source§type Output = impl CompileReflectShader<<HLSL as FromCompilation<SpirvCompilation, SpirvCross>>::Target, SpirvCompilation, SpirvCross>
type Output = impl CompileReflectShader<<HLSL as FromCompilation<SpirvCompilation, SpirvCross>>::Target, SpirvCompilation, SpirvCross>
The output type after conversion.
Source§fn from_compilation(
compile: SpirvCompilation,
) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
fn from_compilation( compile: SpirvCompilation, ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
Tries to convert the input object into an object ready for compilation.
Source§impl FromCompilation<SpirvCompilation, SpirvCross> for MSL
Available on non-crate feature stable
only.
impl FromCompilation<SpirvCompilation, SpirvCross> for MSL
Available on non-crate feature
stable
only.Source§type Options = Option<MslVersion>
type Options = Option<MslVersion>
Options provided to the compiler.
Source§type Context = CrossMslContext
type Context = CrossMslContext
Additional context returned by the compiler after compilation.
Source§type Output = impl CompileReflectShader<<MSL as FromCompilation<SpirvCompilation, SpirvCross>>::Target, SpirvCompilation, SpirvCross>
type Output = impl CompileReflectShader<<MSL as FromCompilation<SpirvCompilation, SpirvCross>>::Target, SpirvCompilation, SpirvCross>
The output type after conversion.
Source§fn from_compilation(
compile: SpirvCompilation,
) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
fn from_compilation( compile: SpirvCompilation, ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
Tries to convert the input object into an object ready for compilation.
Source§impl FromCompilation<SpirvCompilation, SpirvCross> for SPIRV
Available on non-crate feature stable
only.
impl FromCompilation<SpirvCompilation, SpirvCross> for SPIRV
Available on non-crate feature
stable
only.Source§type Output = impl CompileReflectShader<<SPIRV as FromCompilation<SpirvCompilation, SpirvCross>>::Target, SpirvCompilation, SpirvCross>
type Output = impl CompileReflectShader<<SPIRV as FromCompilation<SpirvCompilation, SpirvCross>>::Target, SpirvCompilation, SpirvCross>
The output type after conversion.
Source§fn from_compilation(
compile: SpirvCompilation,
) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
fn from_compilation( compile: SpirvCompilation, ) -> Result<CompilerBackend<Self::Output>, ShaderReflectError>
Tries to convert the input object into an object ready for compilation.
Source§impl ShaderInputCompiler<SpirvCompilation> for Glslang
impl ShaderInputCompiler<SpirvCompilation> for Glslang
Source§fn compile(
source: &ShaderSource,
) -> Result<SpirvCompilation, ShaderCompileError>
fn compile( source: &ShaderSource, ) -> Result<SpirvCompilation, ShaderCompileError>
Compile the input shader source file into a compilation unit.
Source§impl ShaderReflectObject for SpirvCompilation
Marker trait for types that are the reflectable outputs of a shader compilation.
impl ShaderReflectObject for SpirvCompilation
Marker trait for types that are the reflectable outputs of a shader compilation.
Source§impl TryFrom<&ShaderSource> for SpirvCompilation
impl TryFrom<&ShaderSource> for SpirvCompilation
Source§fn try_from(source: &ShaderSource) -> Result<Self, Self::Error>
fn try_from(source: &ShaderSource) -> Result<Self, Self::Error>
Tries to compile SPIR-V from the provided shader source.
Source§type Error = ShaderCompileError
type Error = ShaderCompileError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for SpirvCompilation
impl RefUnwindSafe for SpirvCompilation
impl Send for SpirvCompilation
impl Sync for SpirvCompilation
impl Unpin for SpirvCompilation
impl UnwindSafe for SpirvCompilation
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