pub enum LayerResult<T> {
Handled(T),
Unhandled,
}Expand description
The return value of an intercepted Vulkan command by the layer implementation.
The layer framework uses the value of this type to decide whether to call into the next call
chain after calling into the layer implementation. For an intercepted Vulkan command, if the
layer implementation returns LayerResult::Handled, the layer framework won’t call into the
next layer call chain. Otherwise, if LayerResult::Unhandled is returned, the layer framework
will call into the next layer call chain with the original parameters.
Variants§
Handled(T)
The layer implementation has handled this Vulkan command, so the layer framework shouldn’t try to call into the next call chain.
This can be useful if the layer implementation wants to modify the parameters passed to the
next call chain, or wants to use some other Vulkan commands to fake/emulate the intercepted
Vulkan command. This is useful when the layer wants to emulate an unsupported extension.
T is usually ash::prelude::VkResult<U>.
Unhandled
The layer implementation doesn’t handle this Vulkan command, so the layer framework should call into the next call chain with the original parameters.
If the layer implementation doesn’t want to bother calling into the next call chain, and
wants the layer framework to do the job, this variant can be used. Note that if the layer
implementation needs to inform the layer framework that there is an error and needs to
return early, LayerResult::Handled should be used.
Trait Implementations§
Source§impl<T: Clone> Clone for LayerResult<T>
impl<T: Clone> Clone for LayerResult<T>
Source§fn clone(&self) -> LayerResult<T>
fn clone(&self) -> LayerResult<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more