pub struct KhalBuilder { /* private fields */ }Expand description
Configures and runs the SPIR-V and PTX shader compilation pipeline.
Used in build.rs scripts to compile a shader crate before the host crate.
Implementations§
Source§impl KhalBuilder
impl KhalBuilder
Sourcepub fn new(
shader_crate: impl AsRef<Path>,
enable_builtin_features: bool,
) -> Self
pub fn new( shader_crate: impl AsRef<Path>, enable_builtin_features: bool, ) -> Self
Creates a new builder for the given shader crate directory.
If enable_builtin_features is true, platform-specific features are auto-detected.
Sourcepub fn rust_min_stack(self, stack: u32) -> Self
pub fn rust_min_stack(self, stack: u32) -> Self
Sets the RUST_MIN_STACK environment variable for the shader compilation processes.
Sourcepub fn shader_src(self, src: impl AsRef<Path>) -> Self
pub fn shader_src(self, src: impl AsRef<Path>) -> Self
Overrides the shader source directory (defaults to <shader_crate>/src).
Auto Trait Implementations§
impl Freeze for KhalBuilder
impl RefUnwindSafe for KhalBuilder
impl Send for KhalBuilder
impl Sync for KhalBuilder
impl Unpin for KhalBuilder
impl UnsafeUnpin for KhalBuilder
impl UnwindSafe for KhalBuilder
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