VPP  0.8
A high-level modern C++ API for Vulkan
vpp::Barriers Class Reference

General class encapsulating description of a set of pipeline barriers. More...

#include <vppBarriers.hpp>

Inheritance diagram for vpp::Barriers:
vpp::Bar vpp::BarrierList vpp::BufferMemoryBarrier vpp::ImageMemoryBarrier vpp::MemoryBarrier

Public Member Functions

 Barriers ()
 Constructs empty barrier container.
 
 Barriers (const Barriers &rhs)
 Constructs a copy of other barrier container.
 
void setBarriers (const std::vector< VkMemoryBarrier > &bar)
 Assigns a set of Vulkan global memory barriers. More...
 
void setBarriers (const std::vector< VkBufferMemoryBarrier > &bar)
 Assigns a set of Vulkan buffer barriers. More...
 
void setBarriers (const std::vector< VkImageMemoryBarrier > &bar)
 Assigns a set of Vulkan image barriers. More...
 
void setBarriers (const VkMemoryBarrier &bar)
 Assigns single Vulkan global memory barrier. More...
 
void setBarriers (const VkBufferMemoryBarrier &bar)
 Assigns single Vulkan buffer barrier. More...
 
void setBarriers (const VkImageMemoryBarrier bar)
 Assigns single Vulkan image barrier. More...
 
template<typename BarriersA >
 Barriers (const BarriersA &ba)
 Constructs barriers object from supplied data (one element). More...
 
template<typename BarriersA , typename BarriersB >
 Barriers (const BarriersA &ba, const BarriersB &bb)
 Constructs barriers object from supplied data (two elements). More...
 
template<typename BarriersA , typename BarriersB , typename BarriersC >
 Barriers (const BarriersA &ba, const BarriersB &bb, const BarriersC &bc)
 Constructs barriers object from supplied data (three elements). More...
 

Additional Inherited Members

- Public Types inherited from vpp::Bar
enum  EStage {
  NONE, INDIRECT, VTXIN, VSHADER,
  VERTEX, TCSHADER, TESHADER, GSHADER,
  GEOMETRY, FSHADER, FRAGMENT, EDEPTH,
  LDEPTH, CLROUT, CSHADER, COMPUTE,
  TRANSFER, HOST
}
 Enumeration specifying how the resource was (or will be) accessed. More...
 

Detailed Description

General class encapsulating description of a set of pipeline barriers.

In Vulkan you can issue multiple barriers in single call. The vpp::Barriers class is a unified interface to barrier descriptions. It is accepted by general barrier creating command: vpp::UniversalCommands::cmdPipelineBarrier().

Caution: vpp::Barriers does not take ownership of the data (it does not make a copy in memory), although some of its derived classes do.

Most of the time you will want to use one of the derived subclasses. Direct usage of vpp::Barriers is required only for complex, muilti-barrier scenarios where you need to specify barriers using low-level Vulkan structures.

Constructor & Destructor Documentation

◆ Barriers() [1/3]

template<typename BarriersA >
vpp::Barriers::Barriers ( const BarriersA &  ba)

Constructs barriers object from supplied data (one element).

It is equivalent to constructing empty container and calling setBarriers(). You can specify either single Vulkan barrier structure of any type or a vector.

◆ Barriers() [2/3]

template<typename BarriersA , typename BarriersB >
vpp::Barriers::Barriers ( const BarriersA &  ba,
const BarriersB &  bb 
)

Constructs barriers object from supplied data (two elements).

It is equivalent to constructing empty container and calling setBarriers(). You can specify either Vulkan barrier structures of any type or vectors.

◆ Barriers() [3/3]

template<typename BarriersA , typename BarriersB , typename BarriersC >
vpp::Barriers::Barriers ( const BarriersA &  ba,
const BarriersB &  bb,
const BarriersC &  bc 
)

Constructs barriers object from supplied data (three elements).

It is equivalent to constructing empty container and calling setBarriers(). You can specify either Vulkan barrier structures of any type or vectors.

Member Function Documentation

◆ setBarriers() [1/6]

void vpp::Barriers::setBarriers ( const std::vector< VkMemoryBarrier > &  bar)

Assigns a set of Vulkan global memory barriers.

Multiple invocations overwrite previously assigned sets. The memory, buffer and image categories are assigned independently of each other.

Does not copy the vector, only references it.

◆ setBarriers() [2/6]

void vpp::Barriers::setBarriers ( const std::vector< VkBufferMemoryBarrier > &  bar)

Assigns a set of Vulkan buffer barriers.

Multiple invocations overwrite previously assigned sets. The memory, buffer and image categories are assigned independently of each other.

Does not copy the vector, only references it.

◆ setBarriers() [3/6]

void vpp::Barriers::setBarriers ( const std::vector< VkImageMemoryBarrier > &  bar)

Assigns a set of Vulkan image barriers.

Multiple invocations overwrite previously assigned sets. The memory, buffer and image categories are assigned independently of each other.

Does not copy the vector, only references it.

◆ setBarriers() [4/6]

void vpp::Barriers::setBarriers ( const VkMemoryBarrier &  bar)

Assigns single Vulkan global memory barrier.

Multiple invocations overwrite previously assigned sets. The memory, buffer and image categories are assigned independently of each other.

Does not copy the structure, only references it.

◆ setBarriers() [5/6]

void vpp::Barriers::setBarriers ( const VkBufferMemoryBarrier &  bar)

Assigns single Vulkan buffer barrier.

Multiple invocations overwrite previously assigned sets. The memory, buffer and image categories are assigned independently of each other.

Does not copy the structure, only references it.

◆ setBarriers() [6/6]

void vpp::Barriers::setBarriers ( const VkImageMemoryBarrier  bar)

Assigns single Vulkan image barrier.

Multiple invocations overwrite previously assigned sets. The memory, buffer and image categories are assigned independently of each other.

Does not copy the structure, only references it.


The documentation for this class was generated from the following file: