Magnum::Vk::MemoryBarrier class new in Git master

Global memory barrier.

Wraps a VkMemoryBarrier. This class is subsequently used in CommandBuffer::pipelineBarrier(), see Copying image data and Copying buffer data for usage examples.

Constructors, destructors, conversion operators

MemoryBarrier(Accesses sourceAccesses, Accesses destinationAccesses)
Constructor.
MemoryBarrier(NoInitT) explicit noexcept
Construct without initializing the contents.
MemoryBarrier(const VkMemoryBarrier& barrier) explicit
Construct from existing data.
operator const VkMemoryBarrier*() const

Public functions

auto operator*() -> VkMemoryBarrier&
Underlying VkMemoryBarrier structure.
auto operator*() const -> const VkMemoryBarrier&
auto operator->() -> VkMemoryBarrier*
auto operator->() const -> const VkMemoryBarrier*

Function documentation

Magnum::Vk::MemoryBarrier::MemoryBarrier(Accesses sourceAccesses, Accesses destinationAccesses)

Constructor.

Parameters
sourceAccesses Source memory access types participating in a dependency. While allowed, passing Read accesses here is redundant — that's already taken care of by the stage execution dependency in CommandBuffer::pipelineBarrier().
destinationAccesses Destination memory access types participating in a dependency

The following VkMemoryBarrier fields are pre-filled in addition to sType, everything else is zero-filled:

  • srcAccessMask to sourceAccesses
  • dstAccessMask to destinationAccesses

Magnum::Vk::MemoryBarrier::MemoryBarrier(NoInitT) explicit noexcept

Construct without initializing the contents.

Note that not even the sType field is set — the structure has to be fully initialized afterwards in order to be usable.

Magnum::Vk::MemoryBarrier::MemoryBarrier(const VkMemoryBarrier& barrier) explicit

Construct from existing data.

Copies the existing values verbatim, pointers are kept unchanged without taking over the ownership. Modifying the newly created instance will not modify the original data nor the pointed-to data.

Magnum::Vk::MemoryBarrier::operator const VkMemoryBarrier*() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const VkMemoryBarrier& Magnum::Vk::MemoryBarrier::operator*() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

VkMemoryBarrier* Magnum::Vk::MemoryBarrier::operator->()

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const VkMemoryBarrier* Magnum::Vk::MemoryBarrier::operator->() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.