pub struct FilterChainMetal { /* private fields */ }Expand description
A Metal filter chain.
Implementations§
source§impl FilterChainMetal
impl FilterChainMetal
sourcepub fn load_from_path(
path: impl AsRef<Path>,
queue: &ProtocolObject<dyn MTLCommandQueue>,
options: Option<&FilterChainOptionsMetal>
) -> Result<FilterChainMetal>
pub fn load_from_path( path: impl AsRef<Path>, queue: &ProtocolObject<dyn MTLCommandQueue>, options: Option<&FilterChainOptionsMetal> ) -> Result<FilterChainMetal>
Load the shader preset at the given path into a filter chain.
sourcepub fn load_from_preset(
preset: ShaderPreset,
queue: &ProtocolObject<dyn MTLCommandQueue>,
options: Option<&FilterChainOptionsMetal>
) -> Result<FilterChainMetal>
pub fn load_from_preset( preset: ShaderPreset, queue: &ProtocolObject<dyn MTLCommandQueue>, options: Option<&FilterChainOptionsMetal> ) -> Result<FilterChainMetal>
Load a filter chain from a pre-parsed ShaderPreset.
sourcepub fn load_from_preset_deferred(
preset: ShaderPreset,
queue: &ProtocolObject<dyn MTLCommandQueue>,
cmd: &ProtocolObject<dyn MTLCommandBuffer>,
options: Option<&FilterChainOptionsMetal>
) -> Result<FilterChainMetal>
pub fn load_from_preset_deferred( preset: ShaderPreset, queue: &ProtocolObject<dyn MTLCommandQueue>, cmd: &ProtocolObject<dyn MTLCommandBuffer>, options: Option<&FilterChainOptionsMetal> ) -> Result<FilterChainMetal>
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.
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(
&mut self,
input: &ProtocolObject<dyn MTLTexture>,
viewport: &Viewport<'_, MetalTextureRef<'_>>,
cmd: &ProtocolObject<dyn MTLCommandBuffer>,
frame_count: usize,
options: Option<&FrameOptionsMetal>
) -> Result<()>
pub fn frame( &mut self, input: &ProtocolObject<dyn MTLTexture>, viewport: &Viewport<'_, MetalTextureRef<'_>>, cmd: &ProtocolObject<dyn MTLCommandBuffer>, frame_count: usize, options: Option<&FrameOptionsMetal> ) -> Result<()>
Records shader rendering commands to the provided command encoder.
SAFETY: The MTLCommandBuffer provided must not have an active encoder.
Trait Implementations§
source§impl Debug for FilterChainMetal
impl Debug for FilterChainMetal
source§impl FilterChainParameters for FilterChainMetal
impl FilterChainParameters for FilterChainMetal
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 FilterChainMetal
impl !Send for FilterChainMetal
impl !Sync for FilterChainMetal
impl Unpin for FilterChainMetal
impl !UnwindSafe for FilterChainMetal
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