#include <GpuBuffer.hpp>
|
C3D_API | GpuBufferBase (RenderSystem const &renderSystem, VkBufferUsageFlags usage, VkMemoryPropertyFlags memoryFlags, castor::String const &debugName, ashes::QueueShare sharingMode, VkDeviceSize allocatedSize) |
| Constructor.
|
|
C3D_API void | upload (UploadData &uploader) |
| Uploads all ready memory ranges to VRAM.
|
|
C3D_API void | upload (UploadData &uploader, VkDeviceSize offset, VkDeviceSize size, VkAccessFlags dstAccessFlags, VkPipelineStageFlags dstPipelineFlags) |
| Uploads a memory range.
|
|
C3D_API void | markDirty (VkDeviceSize offset, VkDeviceSize size, VkAccessFlags dstAccessFlags, VkPipelineStageFlags dstPipelineFlags) |
| Marks a memory range to be ready for upload.
|
|
bool | hasBuffer () const noexcept |
|
ashes::Buffer< uint8_t > const & | getBuffer () const noexcept |
|
ashes::Buffer< uint8_t > & | getBuffer () noexcept |
|
template<typename DataT > |
DataT const & | getData (VkDeviceSize offset) const noexcept |
|
template<typename DataT > |
DataT & | getData (VkDeviceSize offset) noexcept |
|
castor::ByteArrayView const & | getDatas () const noexcept |
|
castor::ByteArrayView & | getDatas () noexcept |
|
◆ GpuBufferBase()
C3D_API castor3d::GpuBufferBase::GpuBufferBase |
( |
RenderSystem const & | renderSystem, |
|
|
VkBufferUsageFlags | usage, |
|
|
VkMemoryPropertyFlags | memoryFlags, |
|
|
castor::String const & | debugName, |
|
|
ashes::QueueShare | sharingMode, |
|
|
VkDeviceSize | allocatedSize ) |
Constructor.
- Parameters
-
[in] | renderSystem | The device on which the storage is allocated. |
[in] | usage | The buffer targets. |
[in] | memoryFlags | The buffer memory properties. |
[in] | debugName | The debug name. |
[in] | sharingMode | The sharing mode. |
[in] | allocatedSize | The buffer size. |
◆ getBuffer() [1/2]
ashes::Buffer< uint8_t > const & castor3d::GpuBufferBase::getBuffer |
( |
| ) |
const |
|
inlinenoexcept |
◆ getBuffer() [2/2]
ashes::Buffer< uint8_t > & castor3d::GpuBufferBase::getBuffer |
( |
| ) |
|
|
inlinenoexcept |
- Returns
- The internal buffer.
◆ getData() [1/2]
template<typename DataT >
DataT const & castor3d::GpuBufferBase::getData |
( |
VkDeviceSize | offset | ) |
const |
|
inlinenoexcept |
- Returns
- The N-th instance of the data.
- Parameters
-
[in] | offset | The memory chunk offset. |
◆ getData() [2/2]
template<typename DataT >
DataT & castor3d::GpuBufferBase::getData |
( |
VkDeviceSize | offset | ) |
|
|
inlinenoexcept |
- Returns
- The N-th instance of the data.
- Parameters
-
[in] | offset | The memory chunk offset. |
◆ getDatas() [1/2]
castor::ByteArrayView const & castor3d::GpuBufferBase::getDatas |
( |
| ) |
const |
|
inlinenoexcept |
◆ getDatas() [2/2]
castor::ByteArrayView & castor3d::GpuBufferBase::getDatas |
( |
| ) |
|
|
inlinenoexcept |
◆ hasBuffer()
bool castor3d::GpuBufferBase::hasBuffer |
( |
| ) |
const |
|
inlinenoexcept |
◆ markDirty()
C3D_API void castor3d::GpuBufferBase::markDirty |
( |
VkDeviceSize | offset, |
|
|
VkDeviceSize | size, |
|
|
VkAccessFlags | dstAccessFlags, |
|
|
VkPipelineStageFlags | dstPipelineFlags ) |
Marks a memory range to be ready for upload.
- Parameters
-
[in] | offset,size | The memory range. |
[in] | dstAccessFlags | The access flags wanted after upload. |
[in] | dstPipelineFlags | The pipeline stage flags wanted after upload. |
Referenced by castor3d::GpuBufferOffsetT< DataT >::markDirty().
◆ upload() [1/2]
Uploads all ready memory ranges to VRAM.
- Parameters
-
[in,out] | uploader | Receives the upload requests. |
◆ upload() [2/2]
C3D_API void castor3d::GpuBufferBase::upload |
( |
UploadData & | uploader, |
|
|
VkDeviceSize | offset, |
|
|
VkDeviceSize | size, |
|
|
VkAccessFlags | dstAccessFlags, |
|
|
VkPipelineStageFlags | dstPipelineFlags ) |
Uploads a memory range.
- Parameters
-
[in,out] | uploader | Receives the upload requests. |
[in] | offset,size | The memory range. |
[in] | dstAccessFlags | The access flags wanted after upload. |
[in] | dstPipelineFlags | The pipeline stage flags wanted after upload. |
◆ GpuBufferPool
The documentation for this class was generated from the following file: