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>,
features: ShaderFeatures,
queue: &ProtocolObject<dyn MTLCommandQueue>,
options: Option<&FilterChainOptionsMetal>,
) -> Result<FilterChainMetal>
pub fn load_from_path( path: impl AsRef<Path>, features: ShaderFeatures, 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_pack(
preset: ShaderPresetPack,
queue: &ProtocolObject<dyn MTLCommandQueue>,
options: Option<&FilterChainOptionsMetal>,
) -> Result<FilterChainMetal>
pub fn load_from_pack( preset: ShaderPresetPack, 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 load_from_pack_deferred(
preset: ShaderPresetPack,
queue: &ProtocolObject<dyn MTLCommandQueue>,
cmd: &ProtocolObject<dyn MTLCommandBuffer>,
options: Option<&FilterChainOptionsMetal>,
) -> Result<FilterChainMetal>
pub fn load_from_pack_deferred( preset: ShaderPresetPack, 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 parameters(&self) -> &RuntimeParameters
fn parameters(&self) -> &RuntimeParameters
Auto Trait Implementations§
impl !Freeze for FilterChainMetal
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
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