API Documentation
Loading...
Searching...
No Matches
VulkanBuffer Class Reference

#include <VulkanBuffer.h>

Inheritance diagram for VulkanBuffer:
[legend]
Collaboration diagram for VulkanBuffer:
[legend]

Public Member Functions

 VulkanBuffer (const String &label, const ConstPointer< VulkanDevice > &vulkan_instance)
 
 VulkanBuffer (const TableColumn &reference_data, const ConstPointer< VulkanDevice > &vulkan_instance)
 
 VulkanBuffer (VulkanBuffer &&vulkan_buffer) noexcept
 
 ~VulkanBuffer ()
 
void insertRows (uint04 location, uint04 add_size) final override
 
void setSize (uint04 buffer_size) final override
 
void updateRegion (const TableColumn &column, uint04 offset, uint04 size) override
 
void copyData (const TableColumn &reference_data, bool set_type) override
 
void cleanup () override
 
VkBuffer getVKBuffer () const
 
VkVertexInputBindingDescription getBindingDescription (uint04 number) const
 
VkFormat getFormat (uint01 vertex_index) const
 
VkFormat getFormat () const
 
void copyBuffer (VkBuffer srcBuffer, VkBuffer dstBuffer, uint04 src_start, uint04 dst_start, uint04 size, bool wait_for_completion)
 
void copyData (const VulkanBuffer &reference_data, bool set_type)
 
- Public Member Functions inherited from GraphicsBuffer
NDEVR_GRAPHICS_API GraphicsBuffer (const String &label)
 
NDEVR_GRAPHICS_API GraphicsBuffer (GraphicsBuffer &&buffer) noexcept
 
virtual void setAccessable (bool is_accessable, bool copy_existing)
 
bool isAccessable () const
 
void setUsage (Type type)
 
virtual void compress (BinaryCompressionObject &object) override
 
virtual void mapToFile (BinaryFile &file, BinaryCompressionObject &object) override
 
virtual void mapToFile (BinaryFile &file, int compression) override
 
virtual void mapFromFile (BinaryFile &file, uint08 version_number) override
 
bool isSame (uint04 index, const String &value) const override
 
bool isSame (uint04 index, const char *value) const override
 
bool contains (uint04 index, const String &value, bool ignore_case) const override
 
bool contains (uint04 index, const char *value, bool ignore_case) const override
 
bool beginsWith (uint04 index, const String &value, bool ignore_case) const override
 
bool beginsWith (uint04 index, const char *value, bool ignore_case) const override
 
virtual TableColumngetSelected (const Buffer< bool > &) const override
 
template<class t_type_a , class t_type_b >
void move (void *memory, const t_type_b &value) const
 
template<class t_type_a , class t_type_b >
void move (t_type_b &value, void *memory) const
 
template<class t_type_a >
void move (void *memory, const String &value) const
 
template<class t_type_a , class t_type_b >
void get (void *memory, t_type_b &value)
 
template<class t_type_a >
void get (void *memory, String &value)
 
template<class t_type >
void setMemory (uint04 index, uint04 vector_pos, const t_type &value)
 
template<class t_type >
void setMemory (void *temp_value, const t_type &value)
 
template<class t_type >
void setMemory (const t_type *data_to_insert, uint04 offset, uint04 size)
 
template<class t_type >
void getMemory (uint04 index, uint04 vector_pos, t_type &value) const
 
template<class t_type >
void setRawMemory (uint04 index, const t_type &value)
 
template<class t_type >
void getMemory (uint04 index, t_type &value) const
 
template<class t_type >
void setMemory (uint04 index, const t_type &value)
 
void set (uint04 index, uint04 vector_pos, bool value) final override
 
void set (uint04 index, uint04 vector_pos, uint01 value) final override
 
void set (uint04 index, uint04 vector_pos, uint02 value) final override
 
void set (uint04 index, uint04 vector_pos, uint04 value) final override
 
void set (uint04 index, uint04 vector_pos, uint08 value) final override
 
void set (uint04 index, uint04 vector_pos, sint01 value) final override
 
void set (uint04 index, uint04 vector_pos, sint02 value) final override
 
void set (uint04 index, uint04 vector_pos, sint04 value) final override
 
void set (uint04 index, uint04 vector_pos, sint08 value) final override
 
void set (uint04 index, uint04 vector_pos, fltp04 value) final override
 
void set (uint04 index, uint04 vector_pos, fltp08 value) final override
 
void set (uint04 index, uint04 vector_pos, const String &value) final override
 
void set (uint04 index, bool value) final override
 
void set (uint04 index, uint01 value) final override
 
void set (uint04 index, uint02 value) final override
 
void set (uint04 index, uint04 value) final override
 
void set (uint04 index, uint08 value) final override
 
void set (uint04 index, sint01 value) final override
 
void set (uint04 index, sint02 value) final override
 
void set (uint04 index, sint04 value) final override
 
void set (uint04 index, sint08 value) final override
 
void set (uint04 index, fltp04 value) final override
 
void set (uint04 index, fltp08 value) final override
 
void set (uint04 index, const String &value) final override
 
void set (uint04 index, RGBColor value) final override
 
void get (uint04 index, uint04 vector_pos, bool &value) const final override
 
void get (uint04 index, uint04 vector_pos, uint01 &value) const final override
 
void get (uint04 index, uint04 vector_pos, uint02 &value) const final override
 
void get (uint04 index, uint04 vector_pos, uint04 &value) const final override
 
void get (uint04 index, uint04 vector_pos, uint08 &value) const final override
 
void get (uint04 index, uint04 vector_pos, sint01 &value) const final override
 
void get (uint04 index, uint04 vector_pos, sint02 &value) const final override
 
void get (uint04 index, uint04 vector_pos, sint04 &value) const final override
 
void get (uint04 index, uint04 vector_pos, sint08 &value) const final override
 
void get (uint04 index, uint04 vector_pos, fltp04 &value) const final override
 
void get (uint04 index, uint04 vector_pos, fltp08 &value) const final override
 
void get (uint04 index, uint04 vector_pos, String &value) const final override
 
void get (uint04 index, bool &value) const final override
 
void get (uint04 index, uint01 &value) const final override
 
void get (uint04 index, uint02 &value) const final override
 
void get (uint04 index, uint04 &value) const final override
 
void get (uint04 index, uint08 &value) const final override
 
void get (uint04 index, sint01 &value) const final override
 
void get (uint04 index, sint02 &value) const final override
 
void get (uint04 index, sint04 &value) const final override
 
void get (uint04 index, sint08 &value) const final override
 
void get (uint04 index, fltp04 &value) const final override
 
void get (uint04 index, fltp08 &value) const final override
 
void get (uint04 index, String &value) const final override
 
void get (uint04 index, RGBColor &value) const final override
 
virtual void copyRow (uint04 source, uint04 destination) override
 
virtual void copyRows (uint04 source, uint04 destination, uint04 size) override
 
virtual void insertIndices (uint04 location, uint04 size) override
 
virtual void removeIndices (uint04 location, uint04 size) override
 
void removeIndices (const Buffer< uint04 > &offset_lookup_list) override final
 
uint04 size () const final override
 
virtual NDEVR_GRAPHICS_API void updateFrom (const TableColumn &column) override
 
void removeRow (uint04 index) override final
 
void removeRows (uint04 index, uint04 size) override final
 
void removeRows (const Buffer< uint04 > &indices) override final
 
void removeRows (uint04 offset, const Buffer< bool > &indices) override
 
void insert (uint04 index) override final
 
NDEVR_GRAPHICS_API void setType (const TypeInfo &type)
 
uint04 capacity ()
 
template<class t_type >
void setData (const t_type *begin, const t_type *end, bool set_type)
 
void * begin () final
 
void * end () final
 
const void * begin () const final
 
const void * end () const final
 
- Public Member Functions inherited from TableColumn
 TableColumn (const String &label)
 
 TableColumn (const String &label, const TypeInfo type)
 
virtual ~TableColumn ()
 
const Stringlabel () const
 
void setLabel (const String &label)
 
virtual void setRowSize (uint04, uint04)
 
virtual uint04 getRowSize (uint04) const
 
virtual TypeInfo type () const
 
virtual void set (uint04 index, const Matrix< fltp08 > &transform)
 
virtual void set (uint04 index, const Matrix< fltp04 > &transform)
 
virtual void compressIfNeeded (BinaryCompressionObject &object)
 
void updateCompressionInfo (BinaryCompressionObject &object)
 
virtual void set (uint04 index, const UUID &value)
 
void set (uint04 index, const Time &time)
 
void set (uint04 index, const Vector< 32, bool > &value)
 
template<uint01 t_dims, class t_type >
void set (uint04 index, const Triangle< t_dims, t_type > &value)
 
template<uint01 t_dims, class t_type >
void set (uint04 index, const Bounds< t_dims, t_type > &value)
 
template<class t_type , uint01 t_col, uint01 t_row>
void set (uint04 index, const Matrix< t_type, t_col, t_row > &matrix)
 
template<class t_class >
std::enable_if< IsVec< t_class >::value >::type set (uint04 index, const t_class &value)
 
template<class t_class >
std::enable_if< ObjectInfo< t_class >::Enum >::type set (uint04 index, const t_class &value)
 
void set (uint04 index, const BitFlag &bitflag)
 
template<class t_class >
std::enable_if<!ObjectInfo< t_class >::Enum &&!IsVec< t_class >::value >::type set (uint04 index, const t_class &value)
 
template<class t_type >
void set (t_type *values, uint04 start_index, uint04 size)
 
template<uint01 t_dims, class t_type >
void setVector (uint04 index, const Vector< t_dims, t_type > &value)
 
template<class t_class >
void get (uint04 index, Vector< 1, t_class > &vector) const
 
void get (uint04 index, BitFlag &bitflag) const
 
template<class t_class >
std::enable_if< IsVec< t_class >::value &&t_class::NumberOfDimensions()!=1 >::type get (uint04 index, t_class &vector) const
 
template<class t_class >
std::enable_if< ObjectInfo< t_class >::Enum >::type get (uint04 index, t_class &enum_value) const
 
template<class t_type >
uint04 getIndexOf (const t_type &object) const
 
void setCompressionMode (CompressionMode compression_mode)
 
virtual void get (uint04 index, Matrix< fltp08 > &transform) const
 
virtual void get (uint04 index, Matrix< fltp04 > &transform) const
 
virtual void getVector (uint04 index, Vector< 3, fltp04 > &vector) const
 
virtual void getVector (uint04 index, Vector< 3, fltp08 > &vector) const
 
virtual void getVector (uint04 index, Vector< 3, uint04 > &vector) const
 
virtual void getVector (uint04 index, Vector< 2, uint04 > &vector) const
 
virtual void getVector (uint04 index, Vector< 1, uint04 > &vector) const
 
template<class t_type , uint01 t_col, uint01 t_row>
void get (uint04 index, Matrix< t_type, t_col, t_row > &matrix) const
 
void get (uint04 index, File &file) const
 
virtual void get (uint04 index, UUID &vector) const
 
void get (uint04 index, Time &time) const
 
void get (uint04 index, TranslatedString &string) const
 
void get (uint04 index, Vector< 32, bool > &value) const
 
template<uint01 t_dims, class t_type >
void get (uint04 index, Bounds< t_dims, t_type > &bounds) const
 
template<uint01 t_dims, class t_type >
void get (uint04 index, Triangle< t_dims, t_type > &tri) const
 
template<class t_class >
t_class get (uint04 index) const
 
template<class t_class >
t_class get (uint04 index, uint04 sub_index) const
 
template<uint01 t_dims, class t_type >
void getVector (uint04 index, Vector< t_dims, t_type > &value) const
 
template<class t_type >
void insert (uint04 index, const t_type &value)
 
virtual void setAll (uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column)
 
template<class t_type >
void setAll (uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column)
 
virtual void addRow ()
 
Time modifiedTime () const
 
void clearUpdates ()
 
void updateAll ()
 
void update (const TableChange &change)
 
template<class t_type >
void setDefaultValue (const t_type &value)
 
template<class t_type >
t_type getDefaultValue () const
 
const Buffer< TableChange > & changes () const
 
template<class t_type >
Buffer< t_type > getAll (uint04 start, uint04 size) const
 
Buffer< TableChangechangesSince (const Time &time) const
 
Buffer< TableChangechangesSince (const Time &time, const Bounds< 1, uint04 > &range) const
 
bool hasChangesSince (const Time &time, const Bounds< 1, uint04 > &range) const
 
BinaryCompressionObjectcompressionObject ()
 
bool compressionValid () const
 
template<>
void set (uint04 index, const aiColor4D &value)
 
template<>
aiColor4D get (uint04 index) const
 
template<>
void set (uint04 index, const aiVector3D &value)
 
template<>
aiVector3D get (uint04 index) const
 
template<>
void set (uint04 index, const aiVector2D &value)
 
template<>
aiVector2D get (uint04 index) const
 

Static Public Member Functions

static uint04 findMemoryType (const VulkanDevice &device, uint04 typeFilter, uint04 properties)
 
static VkBuffer createVKBuffer (uint04 &allocation_size, const VulkanDevice &device, uint04 size, uint04 object_size, uint04 usage, uint04 properties, VkDeviceMemory &bufferMemory)
 

Additional Inherited Members

- Public Types inherited from GraphicsBuffer
enum  Type { VERTEX , UNIFORM , INDEX , INSTANCE }
 
- Protected Member Functions inherited from GraphicsBuffer
template<class t_convert_type , class t_type >
void _setRawData (const t_type *begin, uint04 offset, uint04 size)
 
template<class t_type >
void getData (t_type *data_to_get, uint04 offset, uint04 size)
 
- Protected Member Functions inherited from TableColumn
template<uint01 t_dims>
void _setAll (uint04 to_location, uint04 from_location, uint04 size, const TableColumn &from_column)
 
virtual uint08 tableHash () const
 
- Protected Attributes inherited from GraphicsBuffer
uint04 m_size
 
uint04 m_allocated_size
 
Type m_internal_type
 
bool m_is_accessable
 
bool m_is_normalized
 
bool m_is_memory_owner
 
- Protected Attributes inherited from TableColumn
BinaryCompressionObject m_compression_object
 
Time m_modified_time
 
String m_label
 
TypeInfo m_type
 
uint08 m_compression_hash
 
Buffer< TableChangem_changes
 
CompressionMode m_compression_mode = CompressionMode::e_default_compression
 
bool m_compression_valid
 

Constructor & Destructor Documentation

◆ VulkanBuffer() [1/3]

VulkanBuffer ( const String & label,
const ConstPointer< VulkanDevice > & vulkan_instance )

◆ VulkanBuffer() [2/3]

VulkanBuffer ( const TableColumn & reference_data,
const ConstPointer< VulkanDevice > & vulkan_instance )

◆ VulkanBuffer() [3/3]

VulkanBuffer ( VulkanBuffer && vulkan_buffer)
noexcept

◆ ~VulkanBuffer()

Member Function Documentation

◆ cleanup()

void cleanup ( )
overridevirtual

Implements GraphicsBuffer.

◆ copyBuffer()

void copyBuffer ( VkBuffer srcBuffer,
VkBuffer dstBuffer,
uint04 src_start,
uint04 dst_start,
uint04 size,
bool wait_for_completion )

◆ copyData() [1/2]

void copyData ( const TableColumn & reference_data,
bool set_type )
overridevirtual

Implements GraphicsBuffer.

◆ copyData() [2/2]

void copyData ( const VulkanBuffer & reference_data,
bool set_type )

◆ createVKBuffer()

VkBuffer createVKBuffer ( uint04 & allocation_size,
const VulkanDevice & device,
uint04 size,
uint04 object_size,
uint04 usage,
uint04 properties,
VkDeviceMemory & bufferMemory )
static

◆ findMemoryType()

uint04 findMemoryType ( const VulkanDevice & device,
uint04 typeFilter,
uint04 properties )
static

◆ getBindingDescription()

VkVertexInputBindingDescription getBindingDescription ( uint04 number) const

◆ getFormat() [1/2]

VkFormat getFormat ( ) const

◆ getFormat() [2/2]

VkFormat getFormat ( uint01 vertex_index) const

◆ getVKBuffer()

VkBuffer getVKBuffer ( ) const

◆ insertRows()

void insertRows ( uint04 location,
uint04 add_size )
finaloverridevirtual

Implements TableColumn.

◆ setSize()

void setSize ( uint04 buffer_size)
finaloverridevirtual

Implements TableColumn.

◆ updateRegion()

void updateRegion ( const TableColumn & column,
uint04 offset,
uint04 size )
overridevirtual

Implements GraphicsBuffer.


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