pub struct FilterChainVulkan { /* private fields */ }
Expand description

A Vulkan filter chain.

Implementations§

source§

impl FilterChainVulkan

source

pub fn load_from_path(
vulkan: impl TryInto<VulkanObjects, Error = FilterChainError>,
path: impl AsRef<Path>,
options: Option<&FilterChainOptionsVulkan>
) -> Result<FilterChainVulkan>

Load the shader preset at the given path into a filter chain.

source

pub fn load_from_preset(
vulkan: impl TryInto<VulkanObjects, Error = FilterChainError>,
preset: ShaderPreset,
options: Option<&FilterChainOptionsVulkan>
) -> Result<FilterChainVulkan>

Load a filter chain from a pre-parsed ShaderPreset.

source

pub fn push_history(
&mut self,
input: &VulkanImage,
cmd: CommandBuffer,
count: usize
) -> Result<()>

source

pub fn frame(
&mut self,
input: &VulkanImage,
viewport: &Viewport<'_, VulkanImage>,
cmd: CommandBuffer,
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_OPTIMAL layout.
  • The output image must be in VK_COLOR_ATTACHMENT_OPTIMAL layout.

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

source§

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)

Sets the number of shader passes enabled at runtime.
source§

fn enumerate_parameters(&self) -> Iter<'_, String, f32>

Enumerates the active parameters as well as their values in the current filter chain.
source§

fn get_parameter(&self, parameter: &str) -> Option<f32>

Get the value of the given parameter if present.
source§

fn set_parameter(&mut self, parameter: &str, new_value: f32) -> Option<f32>

Set the value of the given parameter if present. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.