pub struct ShaderModule(/* private fields */);Expand description
compiled shader code (SPIR-V)
Implementations§
Source§impl ShaderModule
impl ShaderModule
Sourcepub fn from_spirv(device: &Device, code: &[u32]) -> Result<ShaderModule>
pub fn from_spirv(device: &Device, code: &[u32]) -> Result<ShaderModule>
a module from SPIR-V words: version up to 1.3 on Vulkan 1.1 devices, 1.5 on 1.2, 1.6 on 1.3 (the magic number and version are checked; the code itself is the driver’s)
Sourcepub fn entry_points(&self) -> Vec<(u32, &str)>
pub fn entry_points(&self) -> Vec<(u32, &str)>
the entry points: (model as SPIR-V numbers it: 0 vertex, 4 fragment, 5 compute, name)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ShaderModule
impl !UnwindSafe for ShaderModule
impl Forget for ShaderModule
impl Freeze for ShaderModule
impl Send for ShaderModule
impl Sync for ShaderModule
impl Unpin for ShaderModule
impl UnsafeUnpin for ShaderModule
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