pub struct ShaderModule(/* private fields */);Expand description
shader code: WGSL, as the browser takes it
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>
the browser takes WGSL: ShaderModule::from_wgsl
Sourcepub fn from_wgsl(device: &Device, source: &str) -> Result<ShaderModule>
pub fn from_wgsl(device: &Device, source: &str) -> Result<ShaderModule>
a module from WGSL source, which the browser compiles and validates (its errors come later:
web_dev.rs); var<immediate> becomes the uniform block behind push constants
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 !Send for ShaderModule
impl !Sync for ShaderModule
impl Forget for ShaderModule
impl Freeze for ShaderModule
impl RefUnwindSafe for ShaderModule
impl Unpin for ShaderModule
impl UnsafeUnpin for ShaderModule
impl UnwindSafe 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