pub struct FilterChainVulkan { /* private fields */ }Expand description
A Vulkan filter chain.
Implementations§
Source§impl FilterChainVulkan
impl FilterChainVulkan
Sourcepub unsafe fn load_from_path<V, E>(
path: impl AsRef<Path>,
features: ShaderFeatures,
vulkan: V,
options: Option<&FilterChainOptionsVulkan>,
) -> Result<FilterChainVulkan>
pub unsafe fn load_from_path<V, E>( path: impl AsRef<Path>, features: ShaderFeatures, vulkan: V, options: Option<&FilterChainOptionsVulkan>, ) -> Result<FilterChainVulkan>
Load the shader preset at the given path into a filter chain.
Sourcepub unsafe fn load_from_preset<V, E>(
preset: ShaderPreset,
vulkan: V,
options: Option<&FilterChainOptionsVulkan>,
) -> Result<FilterChainVulkan>
pub unsafe fn load_from_preset<V, E>( preset: ShaderPreset, vulkan: V, options: Option<&FilterChainOptionsVulkan>, ) -> Result<FilterChainVulkan>
Load a filter chain from a pre-parsed ShaderPreset.
Sourcepub unsafe fn load_from_pack<V, E>(
preset: ShaderPresetPack,
vulkan: V,
options: Option<&FilterChainOptionsVulkan>,
) -> Result<FilterChainVulkan>
pub unsafe fn load_from_pack<V, E>( preset: ShaderPresetPack, vulkan: V, options: Option<&FilterChainOptionsVulkan>, ) -> Result<FilterChainVulkan>
Load a filter chain from a pre-parsed and loaded ShaderPresetPack.
Sourcepub unsafe fn load_from_preset_deferred<V, E>(
preset: ShaderPreset,
vulkan: V,
cmd: CommandBuffer,
options: Option<&FilterChainOptionsVulkan>,
) -> Result<FilterChainVulkan>
pub unsafe fn load_from_preset_deferred<V, E>( preset: ShaderPreset, vulkan: V, cmd: CommandBuffer, options: Option<&FilterChainOptionsVulkan>, ) -> Result<FilterChainVulkan>
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 unsafe fn load_from_pack_deferred<V, E>(
preset: ShaderPresetPack,
vulkan: V,
cmd: CommandBuffer,
options: Option<&FilterChainOptionsVulkan>,
) -> Result<FilterChainVulkan>
pub unsafe fn load_from_pack_deferred<V, E>( preset: ShaderPresetPack, vulkan: V, cmd: CommandBuffer, options: Option<&FilterChainOptionsVulkan>, ) -> Result<FilterChainVulkan>
Load a filter chain from a pre-parsed, loaded ShaderPresetPack, 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 unsafe fn frame(
&mut self,
input: &VulkanImage,
viewport: &Viewport<'_, VulkanImage>,
cmd: CommandBuffer,
frame_count: usize,
options: Option<&FrameOptionsVulkan>,
) -> Result<()>
pub unsafe fn frame( &mut self, input: &VulkanImage, viewport: &Viewport<'_, VulkanImage>, cmd: CommandBuffer, frame_count: usize, options: Option<&FrameOptionsVulkan>, ) -> Result<()>
Records shader rendering commands to the provided command buffer.
- The input image must be in the
VK_SHADER_READ_ONLY_OPTIMALlayout. - The output image must be in
VK_COLOR_ATTACHMENT_OPTIMALlayout.
librashader will not create a pipeline barrier for the final pass. The output image will
remain in VK_COLOR_ATTACHMENT_OPTIMAL after all shader passes. The caller must transition
the output image to the final layout.
Trait Implementations§
Source§impl FilterChainParameters for FilterChainVulkan
impl FilterChainParameters for FilterChainVulkan
Source§fn parameters(&self) -> &RuntimeParameters
fn parameters(&self) -> &RuntimeParameters
Auto Trait Implementations§
impl !Freeze for FilterChainVulkan
impl !RefUnwindSafe for FilterChainVulkan
impl Send for FilterChainVulkan
impl Sync for FilterChainVulkan
impl Unpin for FilterChainVulkan
impl !UnwindSafe for FilterChainVulkan
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