pub struct FilterChainWgpu { /* private fields */ }
Expand description
A wgpu filter chain.
Implementations§
source§impl FilterChainWgpu
impl FilterChainWgpu
sourcepub fn load_from_path(
path: impl AsRef<Path>,
device: Arc<Device>,
queue: Arc<Queue>,
options: Option<&FilterChainOptionsWgpu>
) -> Result<FilterChainWgpu>
pub fn load_from_path( path: impl AsRef<Path>, device: Arc<Device>, queue: Arc<Queue>, options: Option<&FilterChainOptionsWgpu> ) -> Result<FilterChainWgpu>
Load the shader preset at the given path into a filter chain.
sourcepub fn load_from_preset(
preset: ShaderPreset,
device: Arc<Device>,
queue: Arc<Queue>,
options: Option<&FilterChainOptionsWgpu>
) -> Result<FilterChainWgpu>
pub fn load_from_preset( preset: ShaderPreset, device: Arc<Device>, queue: Arc<Queue>, options: Option<&FilterChainOptionsWgpu> ) -> Result<FilterChainWgpu>
Load a filter chain from a pre-parsed ShaderPreset
.
sourcepub fn load_from_preset_deferred(
preset: ShaderPreset,
device: Arc<Device>,
queue: Arc<Queue>,
cmd: &mut CommandEncoder,
options: Option<&FilterChainOptionsWgpu>
) -> Result<FilterChainWgpu>
pub fn load_from_preset_deferred( preset: ShaderPreset, device: Arc<Device>, queue: Arc<Queue>, cmd: &mut CommandEncoder, options: Option<&FilterChainOptionsWgpu> ) -> Result<FilterChainWgpu>
Load a filter chain from a pre-parsed ShaderPreset
, deferring and GPU-side initialization
to the caller. This function therefore requires no external synchronization of the device queue.
§Safety
The provided command buffer must be ready for recording and contain no prior commands.
The caller is responsible for ending the command buffer and immediately submitting it to a
graphics queue. The command buffer must be completely executed before calling frame
.
sourcepub fn frame<'a>(
&mut self,
input: Arc<Texture>,
viewport: &Viewport<'_, WgpuOutputView<'a>>,
cmd: &mut CommandEncoder,
frame_count: usize,
options: Option<&FrameOptionsWgpu>
) -> Result<()>
pub fn frame<'a>( &mut self, input: Arc<Texture>, viewport: &Viewport<'_, WgpuOutputView<'a>>, cmd: &mut CommandEncoder, frame_count: usize, options: Option<&FrameOptionsWgpu> ) -> Result<()>
Records shader rendering commands to the provided command encoder.
Trait Implementations§
source§impl FilterChainParameters for FilterChainWgpu
impl FilterChainParameters for FilterChainWgpu
source§fn get_enabled_pass_count(&self) -> usize
fn get_enabled_pass_count(&self) -> usize
Gets the number of shader passes enabled at runtime.
source§fn set_enabled_pass_count(&mut self, count: usize)
fn set_enabled_pass_count(&mut self, count: usize)
Sets the number of shader passes enabled at runtime.
source§fn enumerate_parameters<'a>(&'a self) -> Iter<'_, String, f32>
fn enumerate_parameters<'a>(&'a self) -> Iter<'_, String, f32>
Enumerates the active parameters as well as their values in the current filter chain.
Auto Trait Implementations§
impl !RefUnwindSafe for FilterChainWgpu
impl Send for FilterChainWgpu
impl Sync for FilterChainWgpu
impl Unpin for FilterChainWgpu
impl !UnwindSafe for FilterChainWgpu
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