#include <GpuBuffer.hpp>
|
C3D_API | GpuBufferBase (RenderSystem const &renderSystem, VkBufferUsageFlags usage, VkMemoryPropertyFlags memoryFlags, castor::String debugName, ashes::QueueShare sharingMode, VkDeviceSize allocatedSize, bool smallData=false) |
| Constructor. More...
|
|
C3D_API void | upload (ashes::CommandBuffer const &cb) |
| Uploads all ready memory ranges to VRAM. More...
|
|
C3D_API void | uploadDirect (ashes::Queue const &queue, ashes::CommandPool const &commandPool, VkDeviceSize offset, VkDeviceSize size, VkAccessFlags dstAccessFlags, VkPipelineStageFlags dstPipelineFlags) |
| Uploads a memory range. More...
|
|
C3D_API void | markDirty (VkDeviceSize offset, VkDeviceSize size, VkAccessFlags dstAccessFlags, VkPipelineStageFlags dstPipelineFlags) |
| Marks a memory range to be ready for upload. More...
|
|
bool | hasBuffer () const |
|
ashes::Buffer< uint8_t > const & | getBuffer () const |
|
| operator ashes::Buffer< uint8_t > const & () const |
|
ashes::Buffer< uint8_t > & | getBuffer () |
|
| operator ashes::Buffer< uint8_t > & () |
|
template<typename DataT > |
DataT const & | getData (VkDeviceSize offset) const |
|
template<typename DataT > |
DataT & | getData (VkDeviceSize offset) |
|
castor::ArrayView< uint8_t > const & | getDatas () const |
|
castor::ArrayView< uint8_t > & | getDatas () |
|
◆ GpuBufferBase()
C3D_API castor3d::GpuBufferBase::GpuBufferBase |
( |
RenderSystem const & |
renderSystem, |
|
|
VkBufferUsageFlags |
usage, |
|
|
VkMemoryPropertyFlags |
memoryFlags, |
|
|
castor::String |
debugName, |
|
|
ashes::QueueShare |
sharingMode, |
|
|
VkDeviceSize |
allocatedSize, |
|
|
bool |
smallData = false |
|
) |
| |
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. |
[in] | smallData | Tells if the memory chunks allocated through this buffer are less than 65536 bytes. |
◆ getBuffer() [1/2]
ashes::Buffer< uint8_t > & castor3d::GpuBufferBase::getBuffer |
( |
| ) |
|
|
inline |
- Returns
- The internal buffer.
◆ getBuffer() [2/2]
ashes::Buffer< uint8_t > const & castor3d::GpuBufferBase::getBuffer |
( |
| ) |
const |
|
inline |
◆ getData() [1/2]
template<typename DataT >
DataT & castor3d::GpuBufferBase::getData |
( |
VkDeviceSize |
offset | ) |
|
|
inline |
- Returns
- The N-th instance of the data.
- Parameters
-
[in] | offset | The memory chunk offset. |
◆ getData() [2/2]
template<typename DataT >
DataT const & castor3d::GpuBufferBase::getData |
( |
VkDeviceSize |
offset | ) |
const |
|
inline |
- Returns
- The N-th instance of the data.
- Parameters
-
[in] | offset | The memory chunk offset. |
◆ getDatas() [1/2]
castor::ArrayView< uint8_t > & castor3d::GpuBufferBase::getDatas |
( |
| ) |
|
|
inline |
◆ getDatas() [2/2]
castor::ArrayView< uint8_t > const & castor3d::GpuBufferBase::getDatas |
( |
| ) |
const |
|
inline |
◆ hasBuffer()
bool castor3d::GpuBufferBase::hasBuffer |
( |
| ) |
const |
|
inline |
◆ markDirty()
C3D_API void castor3d::GpuBufferBase::markDirty |
( |
VkDeviceSize |
offset, |
|
|
VkDeviceSize |
size, |
|
|
VkAccessFlags |
dstAccessFlags, |
|
|
VkPipelineStageFlags |
dstPipelineFlags |
|
) |
| |
◆ operator ashes::Buffer< uint8_t > &()
castor3d::GpuBufferBase::operator ashes::Buffer< uint8_t > & |
( |
| ) |
|
|
inline |
◆ operator ashes::Buffer< uint8_t > const &()
castor3d::GpuBufferBase::operator ashes::Buffer< uint8_t > const & |
( |
| ) |
const |
|
inline |
◆ upload()
C3D_API void castor3d::GpuBufferBase::upload |
( |
ashes::CommandBuffer const & |
cb | ) |
|
Uploads all ready memory ranges to VRAM.
- Parameters
-
[in] | cb | The command buffer on which transfer commands are recorded. |
◆ uploadDirect()
C3D_API void castor3d::GpuBufferBase::uploadDirect |
( |
ashes::Queue const & |
queue, |
|
|
ashes::CommandPool const & |
commandPool, |
|
|
VkDeviceSize |
offset, |
|
|
VkDeviceSize |
size, |
|
|
VkAccessFlags |
dstAccessFlags, |
|
|
VkPipelineStageFlags |
dstPipelineFlags |
|
) |
| |
Uploads a memory range.
- Parameters
-
[in] | queue | The queue to which the upload commands will be submitted to. |
[in] | commandPool | The command pool from which the command buffer will be created. |
[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: