Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Friends | List of all members
castor3d::GpuBufferBase Class Reference

#include <GpuBuffer.hpp>

Inheritance diagram for castor3d::GpuBufferBase:
Inheritance graph
[legend]

Public Member Functions

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
 

Friends

class GpuBufferPool
 

Constructor & Destructor Documentation

◆ 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]renderSystemThe device on which the storage is allocated.
[in]usageThe buffer targets.
[in]memoryFlagsThe buffer memory properties.
[in]debugNameThe debug name.
[in]sharingModeThe sharing mode.
[in]allocatedSizeThe buffer size.

Member Function Documentation

◆ getBuffer() [1/2]

ashes::Buffer< uint8_t > const & castor3d::GpuBufferBase::getBuffer ( ) const
inlinenoexcept
Returns
The internal buffer.

Referenced by castor3d::GpuBufferOffsetT< DataT >::getBuffer(), and castor3d::GpuBufferOffsetT< DataT >::getBuffer().

Here is the caller graph for this function:

◆ 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]offsetThe 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]offsetThe memory chunk offset.

◆ getDatas() [1/2]

castor::ByteArrayView const & castor3d::GpuBufferBase::getDatas ( ) const
inlinenoexcept
Returns
The data.

Referenced by castor3d::GpuBufferOffsetT< DataT >::getData().

Here is the caller graph for this function:

◆ getDatas() [2/2]

castor::ByteArrayView & castor3d::GpuBufferBase::getDatas ( )
inlinenoexcept
Returns
The data.

◆ hasBuffer()

bool castor3d::GpuBufferBase::hasBuffer ( ) const
inlinenoexcept
Returns
The internal buffer.

Referenced by castor3d::GpuBufferOffsetT< DataT >::operator bool().

Here is the caller graph for this function:

◆ 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,sizeThe memory range.
[in]dstAccessFlagsThe access flags wanted after upload.
[in]dstPipelineFlagsThe pipeline stage flags wanted after upload.

Referenced by castor3d::GpuBufferOffsetT< DataT >::markDirty().

Here is the caller graph for this function:

◆ upload() [1/2]

C3D_API void castor3d::GpuBufferBase::upload ( UploadData & uploader)

Uploads all ready memory ranges to VRAM.

Parameters
[in,out]uploaderReceives 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]uploaderReceives the upload requests.
[in]offset,sizeThe memory range.
[in]dstAccessFlagsThe access flags wanted after upload.
[in]dstPipelineFlagsThe pipeline stage flags wanted after upload.

Friends And Related Symbol Documentation

◆ GpuBufferPool

friend class GpuBufferPool
friend

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