[−][src]Trait rendy_shader::Shader
Interface to create shader modules from shaders.
Implemented for static shaders via [compile_to_spirv!
] macro.
Associated Types
Loading content...Required methods
fn spirv(&self) -> Result<Cow<'_, [u32]>, Self::Error>
Get spirv bytecode.
fn entry(&self) -> &str
Get the entry point of the shader.
fn stage(&self) -> ShaderStageFlags
Get the rendy_core::hal representation of this shaders kind/stage.
Provided methods
unsafe fn module<B>(
&self,
factory: &Factory<B>
) -> Result<B::ShaderModule, ShaderError> where
B: Backend,
&self,
factory: &Factory<B>
) -> Result<B::ShaderModule, ShaderError> where
B: Backend,
Create shader module.
Spir-V bytecode must adhere valid usage on this Vulkan spec page: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkShaderModuleCreateInfo.html