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>,
features: ShaderFeatures,
device: &Device,
queue: &Queue,
options: Option<&FilterChainOptionsWgpu>,
) -> Result<FilterChainWgpu>
pub fn load_from_path( path: impl AsRef<Path>, features: ShaderFeatures, device: &Device, queue: &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: &Device,
queue: &Queue,
options: Option<&FilterChainOptionsWgpu>,
) -> Result<FilterChainWgpu>
pub fn load_from_preset( preset: ShaderPreset, device: &Device, queue: &Queue, options: Option<&FilterChainOptionsWgpu>, ) -> Result<FilterChainWgpu>
Load a filter chain from a pre-parsed ShaderPreset
.
Sourcepub fn load_from_pack(
preset: ShaderPresetPack,
device: &Device,
queue: &Queue,
options: Option<&FilterChainOptionsWgpu>,
) -> Result<FilterChainWgpu>
pub fn load_from_pack( preset: ShaderPresetPack, device: &Device, queue: &Queue, options: Option<&FilterChainOptionsWgpu>, ) -> Result<FilterChainWgpu>
Load a filter chain from a pre-parsed and loaded ShaderPresetPack
.
Sourcepub fn load_from_preset_deferred(
preset: ShaderPreset,
device: &Device,
queue: &Queue,
cmd: &mut CommandEncoder,
options: Option<&FilterChainOptionsWgpu>,
) -> Result<FilterChainWgpu>
pub fn load_from_preset_deferred( preset: ShaderPreset, device: &Device, queue: &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 load_from_pack_deferred(
preset: ShaderPresetPack,
device: &Device,
queue: &Queue,
cmd: &mut CommandEncoder,
options: Option<&FilterChainOptionsWgpu>,
) -> Result<FilterChainWgpu>
pub fn load_from_pack_deferred( preset: ShaderPresetPack, device: &Device, queue: &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: &Texture,
viewport: &Viewport<'_, WgpuOutputView<'a>>,
cmd: &mut CommandEncoder,
frame_count: usize,
options: Option<&FrameOptionsWgpu>,
) -> Result<()>
pub fn frame<'a>( &mut self, input: &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 parameters(&self) -> &RuntimeParameters
fn parameters(&self) -> &RuntimeParameters
Auto Trait Implementations§
impl !Freeze for FilterChainWgpu
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
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