![]() |
VPP
0.7
A high-level modern C++ API for Vulkan
|
Utility subclass representing a vector of indexed indirect draw ranges. More...
#include <vppContainers.hpp>
Public Member Functions | |
IndexedIndirectCommands (size_t maxItemCount, MemProfile::ECharacteristic memProfile, Device hDevice) | |
![]() | |
gvector (size_t maxItemCount, MemProfile::ECharacteristic memProfile, const Device &hDevice) | |
Constructor. More... | |
iterator | begin () |
Iterator to begin of the vector. | |
iterator | end () |
Iterator to the end of the valid range (but not whole area). | |
const_iterator | cbegin () const |
Const iterator to begin of the vector. | |
const_iterator | cend () const |
Const iterator to the end of the valid range (but not whole area). | |
bool | empty () const |
Checks whether the valid range is empty. | |
size_t | size () const |
Returns the size of the valid range. | |
size_t | capacity () const |
Returns the size of the whole allocated area (maximum number of elements). | |
void | push_back (const VkDrawIndexedIndirectCommand &item) |
Adds element to the end of the valid range. | |
void | emplace_back (ArgsT... args) |
Constructs element in place at the end of the valid range. | |
VkDrawIndexedIndirectCommand * | allocate_back () |
Allocates space for new item without constructing it. | |
void | resize (size_t newSize, const VkDrawIndexedIndirectCommand &value=VkDrawIndexedIndirectCommand()) |
Resizes the vector in proper way (constructing/destructing elements). More... | |
void | setSize (size_t newSize) |
Resizes the vector in dumb way (just setting the size without initialization). Use for numeric or vector types only. | |
void | clear () |
Empties the valid range. | |
VkDrawIndexedIndirectCommand & | operator[] (size_t index) const VkDrawIndexedIndirectCommand &operator[](size_t index) const |
Access to indexed element. More... | |
void | cmdCommit (CommandBuffer cmdBuffer, size_t firstItem=0, size_t nItems=std::numeric_limits< size_t >::max()) |
Generates a command ensuring that valid elements have been synchronized from host to device. Optionally can be restricted to a range. | |
void | cmdCommit (size_t firstItem=0, size_t nItems=std::numeric_limits< size_t >::max()) |
Generates a command (to implicit context) which ensures valid elements has been synchronized from host to device. | |
void | cmdCommitAll (CommandBuffer cmdBuffer, size_t firstItem=0, size_t nItems=std::numeric_limits< size_t >::max()) |
Generates a command ensuring that entire memory area has been synchronized from host to device. Optionally can be restricted to a range. | |
void | cmdCommitAll (size_t firstItem=0, size_t nItems=std::numeric_limits< size_t >::max()) |
Generates a command (to implicit context) which ensures that entire buffer area has been synchronized from host to device. | |
void | cmdLoad (CommandBuffer cmdBuffer, size_t firstItem=0, size_t nItems=std::numeric_limits< size_t >::max()) |
Generates a command ensuring that valid elements have been synchronized from device to host. Optionally can be restricted to a range. | |
void | cmdLoad (size_t firstItem=0, size_t nItems=std::numeric_limits< size_t >::max()) |
Generates a command (to implicit context) which ensures valid elements have been synchronized from device to host. | |
void | commit (EQueueType eQueue=Q_GRAPHICS, const Fence &signalFenceOnEnd=Fence(), const Semaphore &waitOnBegin=Semaphore(), const Semaphore &signalOnEnd=Semaphore()) |
Synchronizes entire buffer from host to device. More... | |
void | commitAndWait (EQueueType eQueue=Q_GRAPHICS) |
Synchronizes entire buffer from host to device and waits for completion. | |
void | load (EQueueType eQueue=Q_GRAPHICS, const Fence &signalFenceOnEnd=Fence(), const Semaphore &waitOnBegin=Semaphore(), const Semaphore &signalOnEnd=Semaphore()) |
Synchronizes entire buffer from device to host. More... | |
void | loadAndWait (EQueueType eQueue=Q_GRAPHICS) |
Synchronizes entire buffer from device to host and waits for completion. | |
void | cmdCopyToImage (CommandBuffer hCmdBuffer, const Img &img, VkImageLayout targetLayout, std::uint32_t mipLevel=0, std::uint32_t layer=0, const VkOffset3D &imageOffset=VkOffset3D { 0, 0, 0 }, const VkExtent3D &imageExtent=VkExtent3D { 0, 0, 0 }, VkDeviceSize bufferOffset=0, std::uint32_t bufferRowLength=0, std::uint32_t bufferImageHeight=0) |
Generates a command to copy the buffer contents to specified image. More... | |
void | cmdCopyToImage (const Img &img, VkImageLayout targetLayout, std::uint32_t mipLevel=0, std::uint32_t layer=0, const VkOffset3D &imageOffset=VkOffset3D { 0, 0, 0 }, const VkExtent3D &imageExtent=VkExtent3D { 0, 0, 0 }, VkDeviceSize bufferOffset=0, std::uint32_t bufferRowLength=0, std::uint32_t bufferImageHeight=0) |
Generates a command (to the default context) to copy the buffer contents to specified image. More... | |
void | copyToImage (EQueueType eQueue, const Img &img, VkImageLayout targetLayout, const Fence &signalFenceOnEnd=Fence(), const Semaphore &waitOnBegin=Semaphore(), const Semaphore &signalOnEnd=Semaphore(), std::uint32_t mipLevel=0, std::uint32_t layer=0, const VkOffset3D &imageOffset=VkOffset3D { 0, 0, 0 }, const VkExtent3D &imageExtent=VkExtent3D { 0, 0, 0 }, VkDeviceSize bufferOffset=0, std::uint32_t bufferRowLength=0, std::uint32_t bufferImageHeight=0) |
Submits a command to copy the buffer contents to specified image. More... | |
void | copyToImageAndWait (EQueueType eQueue, const Img &img, VkImageLayout targetLayout, std::uint32_t mipLevel=0, std::uint32_t layer=0, const VkOffset3D &imageOffset=VkOffset3D { 0, 0, 0 }, const VkExtent3D &imageExtent=VkExtent3D { 0, 0, 0 }, VkDeviceSize bufferOffset=0, std::uint32_t bufferRowLength=0, std::uint32_t bufferImageHeight=0) |
Submits a command to copy the buffer contents to specified image, waits for completion. More... | |
void | cmdCopyFromImage (CommandBuffer hCmdBuffer, const Img &img, VkImageLayout sourceImageLayout, std::uint32_t mipLevel=0, std::uint32_t layer=0, const VkOffset3D &imageOffset=VkOffset3D { 0, 0, 0 }, const VkExtent3D &imageExtent=VkExtent3D { 0, 0, 0 }, VkDeviceSize bufferOffset=0, std::uint32_t bufferRowLength=0, std::uint32_t bufferImageHeight=0) |
Generates a command to copy the buffer contents from specified image. More... | |
void | cmdCopyFromImage (const Img &img, VkImageLayout sourceImageLayout, std::uint32_t mipLevel=0, std::uint32_t layer=0, const VkOffset3D &imageOffset=VkOffset3D { 0, 0, 0 }, const VkExtent3D &imageExtent=VkExtent3D { 0, 0, 0 }, VkDeviceSize bufferOffset=0, std::uint32_t bufferRowLength=0, std::uint32_t bufferImageHeight=0) |
Generates a command (to the default context) to copy the buffer contents from specified image. More... | |
void | copyFromImage (EQueueType eQueue, const Img &img, VkImageLayout sourceImageLayout, const Fence &signalFenceOnEnd=Fence(), const Semaphore &waitOnBegin=Semaphore(), const Semaphore &signalOnEnd=Semaphore(), std::uint32_t mipLevel=0, std::uint32_t layer=0, const VkOffset3D &imageOffset=VkOffset3D { 0, 0, 0 }, const VkExtent3D &imageExtent=VkExtent3D { 0, 0, 0 }, VkDeviceSize bufferOffset=0, std::uint32_t bufferRowLength=0, std::uint32_t bufferImageHeight=0) |
Submits a command to copy the buffer contents from specified image. More... | |
void | copyFromImageAndWait (EQueueType eQueue, const Img &img, VkImageLayout sourceImageLayout, std::uint32_t mipLevel=0, std::uint32_t layer=0, const VkOffset3D &imageOffset=VkOffset3D { 0, 0, 0 }, const VkExtent3D &imageExtent=VkExtent3D { 0, 0, 0 }, VkDeviceSize bufferOffset=0, std::uint32_t bufferRowLength=0, std::uint32_t bufferImageHeight=0) |
Submits a command to copy the buffer contents from specified image. Waits for completion. More... | |
![]() | |
Buffer () | |
Constructs null reference. | |
Buffer (VkDeviceSize size, const Device &hDevice, unsigned int flags=0, unsigned int addUsage=0) | |
Constructs a buffer of given size and usage (bitwise combination of EUsageFlags values), associated with given device. | |
Buffer (VkDeviceSize size, const Device &hDevice, const std::vector< unsigned int > &queueFamilyIndices, unsigned int flags=0, unsigned int addUsage=0) | |
Constructs a buffer of given size and usage (bitwise combination of EUsageFlags values), associated with given device. This constructor also takes a list of queue families allowed to access the buffer in concurrent mode. | |
template<unsigned int USAGE2> | |
Buffer (const Buffer< USAGE2 > &other) | |
Construct new reference to existing buffer, with compatible usage. | |
![]() | |
Buf () | |
Constructs null reference. | |
Buf (VkDeviceSize bufferSize, unsigned int usageMask, const Device &hDevice, unsigned int flags=0) | |
Constructs a buffer of given size and usage (bitwise combination of EUsageFlags values), associated with given device. | |
Buf (VkDeviceSize bufferSize, unsigned int usageMask, const Device &hDevice, const std::vector< unsigned int > &queueFamilyIndices, unsigned int flags=0) | |
Constructs a buffer of given size and usage (bitwise combination of EUsageFlags values), associated with given device. This constructor also takes a list of queue families allowed to access the buffer in concurrent mode. | |
operator bool () const | |
Checks whether this is not a null reference. | |
VkBuffer | handle () const |
Retrieves Vulkan handle of the buffer. | |
const Device & | device () const |
Retrieves the device associated with the buffer. | |
VkDeviceSize | size () const |
Retrieves the size of the buffer. | |
unsigned int | getUsage () const |
Retrieves usage flags of the buffer. | |
template<class MemoryT > | |
MemoryT | bindMemory (const MemProfile &memProfile) const |
Allocates and binds memory for the buffer. | |
![]() | |
MemoryBinding () | |
Constructs null reference. | |
MemoryBinding (const Buffer< USAGE > &res, const MemProfile &memProfile) | |
Binds memory to a buffer and constructs MemoryBinding object. | |
const Buffer< USAGE > & | resource () const |
Retrieves the buffer. | |
DeviceMemory & | memory () |
Retrieves the memory object. | |
Additional Inherited Members | |
![]() | |
typedef VkDrawIndexedIndirectCommand * | iterator |
Random access iterator. | |
typedef const VkDrawIndexedIndirectCommand * | const_iterator |
Random access const iterator. | |
![]() | |
enum | EUsageFlags { SOURCE = VK_BUFFER_USAGE_TRANSFER_SRC_BIT, TARGET = VK_BUFFER_USAGE_TRANSFER_DST_BIT, UNITEX = VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, STORTEX = VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, UNIFORM = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, STORAGE = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, INDEX = VK_BUFFER_USAGE_INDEX_BUFFER_BIT, VERTEX = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, INDIRECT = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT } |
Buffer usage flags. Can be bitwise-combined to create multipurpose buffers. More... | |
enum | ECreationFlags { SPARSE_BINDING = VK_BUFFER_CREATE_SPARSE_BINDING_BIT, SPARSE_RESIDENCY = VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, SPARSE_ALIASED = VK_BUFFER_CREATE_SPARSE_ALIASED_BIT } |
![]() | |
static const unsigned int | usage = USAGE |
Utility subclass representing a vector of indexed indirect draw ranges.
This object is reference-counted and may be passed by value.