pub struct WgpuPipeline<'a> { /* private fields */ }Implementations§
Source§impl<'a> WgpuPipeline<'a>
impl<'a> WgpuPipeline<'a>
pub fn compile( context: &'a WgpuComputeContext, source: &str, entry_point: &str, ) -> Result<Self, ForgeError>
Sourcepub fn compile_spirv(
context: &'a WgpuComputeContext,
spirv: &[u8],
entry_point: &str,
) -> Result<Self, ForgeError>
pub fn compile_spirv( context: &'a WgpuComputeContext, spirv: &[u8], entry_point: &str, ) -> Result<Self, ForgeError>
Like [compile] but accepts pre-compiled SPIR-V bytes (from HLSL→DXC).
Sourcepub fn compile_msl(
context: &'a WgpuComputeContext,
_source: &str,
_entry_point: &str,
) -> Result<Self, ForgeError>
pub fn compile_msl( context: &'a WgpuComputeContext, _source: &str, _entry_point: &str, ) -> Result<Self, ForgeError>
Compile pre-emitted MSL source through wgpu’s Metal backend.
wgpu does not expose ShaderSource::Msl — on macOS, wgpu transpiles
WGSL→MSL internally via naga. For pre-emitted MSL, the caller should
use a native Metal path (e.g. metal-rs). This method exists so the
runtime can attempt MSL compilation on macOS; on other platforms it
returns an error and the runtime falls back to WGSL.
Sourcepub fn dispatch_rayprobe(
&self,
tlas: &Tlas,
buffers: &[BufferView],
schedule: &Schedule,
element_count: usize,
) -> Result<u64, ForgeError>
pub fn dispatch_rayprobe( &self, tlas: &Tlas, buffers: &[BufferView], schedule: &Schedule, element_count: usize, ) -> Result<u64, ForgeError>
Dispatch a ray-query kernel, binding tlas as the acceleration_structure
at binding 0 and the supplied buffer views (rays at binding 1, hits at
binding 2) at their own bindings. The generic QualiaCompute::dispatch
only binds buffers, so this is the dedicated path for the acceleration-
structure binding. Returns wall-clock nanoseconds (ray-query passes skip the
timestamp path). The caller must keep the TLAS (and its BLAS) alive.
Trait Implementations§
Source§impl<'a> QualiaCompute for WgpuPipeline<'a>
impl<'a> QualiaCompute for WgpuPipeline<'a>
Source§fn dispatch(
&self,
buffers: &[BufferView],
schedule: &Schedule,
element_count: usize,
) -> Result<u64, ForgeError>
fn dispatch( &self, buffers: &[BufferView], schedule: &Schedule, element_count: usize, ) -> Result<u64, ForgeError>
Schedule and buffer views. Read moreAuto Trait Implementations§
impl<'a> Freeze for WgpuPipeline<'a>
impl<'a> !RefUnwindSafe for WgpuPipeline<'a>
impl<'a> !Send for WgpuPipeline<'a>
impl<'a> !Sync for WgpuPipeline<'a>
impl<'a> Unpin for WgpuPipeline<'a>
impl<'a> UnsafeUnpin for WgpuPipeline<'a>
impl<'a> !UnwindSafe for WgpuPipeline<'a>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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