The interface for a memory barrier.
More...
#include <rendering_api.hpp>
Inherited by LiteFX::Rendering::Barrier< IDirectX12Buffer, IDirectX12Image >, LiteFX::Rendering::Barrier< IVulkanBuffer, IVulkanImage >, and LiteFX::Rendering::Barrier< TBuffer, TImage >.
|
virtual | ~IBarrier () noexcept=default |
|
void | transition (IBuffer &buffer, const ResourceState &targetState) |
| Inserts a transition for all sub-resources of buffer into targetState . More...
|
|
void | transition (IBuffer &buffer, const UInt32 &element, const ResourceState &targetState) |
| Inserts a transition for the sub-resource element of buffer into targetState . More...
|
|
void | transition (IBuffer &buffer, const ResourceState &sourceState, const ResourceState &targetState) |
| Inserts a transition for all sub-resources of buffer from sourceState into targetState . More...
|
|
void | transition (IBuffer &buffer, const ResourceState &sourceState, const UInt32 &element, const ResourceState &targetState) |
| Inserts a transition for the sub-resource element of buffer from sourceState into targetState . More...
|
|
void | transition (IImage &image, const ResourceState &targetState) |
| Inserts a transition for all sub-resources of image into targetState . More...
|
|
void | transition (IImage &image, const UInt32 &level, const UInt32 &layer, const UInt32 &plane, const ResourceState &targetState) |
| Inserts a transition for a sub-resource of image into targetState . More...
|
|
void | transition (IImage &image, const ResourceState &sourceState, const ResourceState &targetState) |
| Inserts a transition for all sub-resources of image from sourceState into targetState . More...
|
|
void | transition (IImage &image, const ResourceState &sourceState, const UInt32 &level, const UInt32 &layer, const UInt32 &plane, const ResourceState &targetState) |
| Inserts a transition for a sub-resource of image from sourceState into targetState . More...
|
|
void | waitFor (const IBuffer &buffer) |
| Inserts a barrier that waits for all read/write accesses to buffer to be finished before continuing. More...
|
|
void | waitFor (const IImage &image) |
| Inserts a barrier that waits for all read/write accesses to image to be finished before continuing. More...
|
|
The interface for a memory barrier.
◆ ~IBarrier()
virtual LiteFX::Rendering::IBarrier::~IBarrier |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ transition() [1/8]
void LiteFX::Rendering::IBarrier::transition |
( |
IBuffer & |
buffer, |
|
|
const ResourceState & |
sourceState, |
|
|
const ResourceState & |
targetState |
|
) |
| |
|
inline |
Inserts a transition for all sub-resources of buffer from sourceState into targetState .
- Parameters
-
buffer | The resource to transition. |
sourceState | The source state to transition the resource from. |
targetState | The target state to transition the resource to. |
◆ transition() [2/8]
void LiteFX::Rendering::IBarrier::transition |
( |
IBuffer & |
buffer, |
|
|
const ResourceState & |
sourceState, |
|
|
const UInt32 & |
element, |
|
|
const ResourceState & |
targetState |
|
) |
| |
|
inline |
Inserts a transition for the sub-resource element of buffer from sourceState into targetState .
- Parameters
-
buffer | The resource to transition. |
sourceState | The source state to transition the sub-resource from. |
element | The element of the resource to transition. |
targetState | The target state to transition the sub-resource to. |
◆ transition() [3/8]
void LiteFX::Rendering::IBarrier::transition |
( |
IBuffer & |
buffer, |
|
|
const ResourceState & |
targetState |
|
) |
| |
|
inline |
Inserts a transition for all sub-resources of buffer into targetState .
- Parameters
-
buffer | The resource to transition. |
targetState | The target state to transition the resource to. |
◆ transition() [4/8]
void LiteFX::Rendering::IBarrier::transition |
( |
IBuffer & |
buffer, |
|
|
const UInt32 & |
element, |
|
|
const ResourceState & |
targetState |
|
) |
| |
|
inline |
Inserts a transition for the sub-resource element of buffer into targetState .
- Parameters
-
buffer | The resource to transition. |
element | The element of the resource to transition. |
targetState | The target state to transition the sub-resource to. |
◆ transition() [5/8]
void LiteFX::Rendering::IBarrier::transition |
( |
IImage & |
image, |
|
|
const ResourceState & |
sourceState, |
|
|
const ResourceState & |
targetState |
|
) |
| |
|
inline |
Inserts a transition for all sub-resources of image from sourceState into targetState .
- Parameters
-
image | The resource to transition. |
sourceState | The source state to transition the resource from. |
targetState | The target state to transition the resource to. |
◆ transition() [6/8]
void LiteFX::Rendering::IBarrier::transition |
( |
IImage & |
image, |
|
|
const ResourceState & |
sourceState, |
|
|
const UInt32 & |
level, |
|
|
const UInt32 & |
layer, |
|
|
const UInt32 & |
plane, |
|
|
const ResourceState & |
targetState |
|
) |
| |
|
inline |
Inserts a transition for a sub-resource of image from sourceState into targetState .
- Parameters
-
image | The resource to transition. |
sourceState | The source state to transition the sub-resource from. |
level | The mip-map level of the sub-resource. |
layer | The array layer of the sub-resource. |
plane | The plane of the sub-resource. |
targetState | The target state to transition the sub-resource to. |
◆ transition() [7/8]
void LiteFX::Rendering::IBarrier::transition |
( |
IImage & |
image, |
|
|
const ResourceState & |
targetState |
|
) |
| |
|
inline |
Inserts a transition for all sub-resources of image into targetState .
- Parameters
-
image | The resource to transition. |
targetState | The target state to transition the resource to. |
◆ transition() [8/8]
void LiteFX::Rendering::IBarrier::transition |
( |
IImage & |
image, |
|
|
const UInt32 & |
level, |
|
|
const UInt32 & |
layer, |
|
|
const UInt32 & |
plane, |
|
|
const ResourceState & |
targetState |
|
) |
| |
|
inline |
Inserts a transition for a sub-resource of image into targetState .
- Parameters
-
image | The resource to transition. |
level | The mip-map level of the sub-resource. |
layer | The array layer of the sub-resource. |
plane | The plane of the sub-resource. |
targetState | The target state to transition the sub-resource to. |
◆ waitFor() [1/2]
void LiteFX::Rendering::IBarrier::waitFor |
( |
const IBuffer & |
buffer | ) |
|
|
inline |
Inserts a barrier that waits for all read/write accesses to buffer to be finished before continuing.
This translates to a UAV barrier in DirectX 12 and an execution + memory barrier with no layout transition in Vulkan.
- Template Parameters
-
buffer | The buffer to wait for. |
◆ waitFor() [2/2]
void LiteFX::Rendering::IBarrier::waitFor |
( |
const IImage & |
image | ) |
|
|
inline |
Inserts a barrier that waits for all read/write accesses to image to be finished before continuing.
This translates to a UAV barrier in DirectX 12 and an execution + memory barrier with no layout transition in Vulkan.
- Template Parameters
-
image | The image to wait for. |