Blender V5.0
blender::draw::StorageArrayBuffer< T, len, device_only > Class Template Reference

#include <DRW_gpu_wrapper.hh>

Inherits blender::draw::detail::StorageCommon< T, len, device_only >.

Inherited by blender::draw::StorageVectorBuffer< IrradianceBrickPacked, 16 >, blender::draw::StorageVectorBuffer< ShadowTileMapData, SHADOW_MAX_TILEMAP >, blender::draw::StorageVectorBuffer< blender::VecBase< float, 4 > >, blender::draw::StorageVectorBuffer< VertexData >, blender::draw::StorageVectorBuffer< InstanceDataT >, blender::draw::StorageVectorBuffer< uint32_t >, blender::draw::StorageVectorBuffer< blender::eevee::Material >, and blender::draw::StorageVectorBuffer< T, len >.

Public Member Functions

 StorageArrayBuffer (const char *name=nullptr)
 ~StorageArrayBuffer ()
void resize (int64_t new_size)
Tget_or_resize (int64_t index)
void trim_to_next_power_of_2 (int64_t required_size)
int64_t size () const
MutableSpan< Tas_span () const
Public Member Functions inherited from blender::draw::detail::StorageCommon< T, len, device_only >
 StorageCommon (const char *name=nullptr)
 ~StorageCommon ()
void push_update ()
void clear_to_zero ()
void async_flush_to_host ()
void read ()
 operator gpu::StorageBuf * () const
gpu::StorageBuf ** operator& ()
Public Member Functions inherited from blender::draw::detail::DataBuffer< T, len, false >
const Toperator[] (int64_t index) const
const Tdata () const
const Tbegin () const
const Tend () const
 operator Span< T > () const

Static Public Member Functions

static void swap (StorageArrayBuffer &a, StorageArrayBuffer &b)

Additional Inherited Members

Protected Member Functions inherited from blender::draw::detail::DataBuffer< T, len, false >
 BLI_STATIC_ASSERT (((sizeof(T) *len) % 16)==0, "Buffer size need to be aligned to size of float4.")
Protected Attributes inherited from blender::draw::detail::StorageCommon< T, len, device_only >
gpu::StorageBufssbo_
const char * name_ = typeid(T).name()
Protected Attributes inherited from blender::draw::detail::DataBuffer< T, len, false >
Tdata_
int64_t len_

Detailed Description

template<typename T, int64_t len = (512u + (sizeof(T) - 1)) / sizeof(T), bool device_only = false>
class blender::draw::StorageArrayBuffer< T, len, device_only >
Template Parameters
TType of the values stored in this uniform buffer.
lenThe number of values that can be stored in this storage buffer at creation.
device_onlyTrue if created on device and no memory host memory is allocated.

Definition at line 332 of file DRW_gpu_wrapper.hh.

Constructor & Destructor Documentation

◆ StorageArrayBuffer()

template<typename T, int64_t len = (512u + (sizeof(T) - 1)) / sizeof(T), bool device_only = false>
blender::draw::StorageArrayBuffer< T, len, device_only >::StorageArrayBuffer ( const char * name = nullptr)
inline

◆ ~StorageArrayBuffer()

template<typename T, int64_t len = (512u + (sizeof(T) - 1)) / sizeof(T), bool device_only = false>
blender::draw::StorageArrayBuffer< T, len, device_only >::~StorageArrayBuffer ( )
inline

Definition at line 339 of file DRW_gpu_wrapper.hh.

Member Function Documentation

◆ as_span()

template<typename T, int64_t len = (512u + (sizeof(T) - 1)) / sizeof(T), bool device_only = false>
MutableSpan< T > blender::draw::StorageArrayBuffer< T, len, device_only >::as_span ( ) const
inline

Definition at line 394 of file DRW_gpu_wrapper.hh.

◆ get_or_resize()

template<typename T, int64_t len = (512u + (sizeof(T) - 1)) / sizeof(T), bool device_only = false>
T & blender::draw::StorageArrayBuffer< T, len, device_only >::get_or_resize ( int64_t index)
inline

Definition at line 365 of file DRW_gpu_wrapper.hh.

◆ resize()

◆ size()

template<typename T, int64_t len = (512u + (sizeof(T) - 1)) / sizeof(T), bool device_only = false>
int64_t blender::draw::StorageArrayBuffer< T, len, device_only >::size ( ) const
inline

Definition at line 389 of file DRW_gpu_wrapper.hh.

Referenced by blender::draw::test_eevee_shadow_free().

◆ swap()

template<typename T, int64_t len = (512u + (sizeof(T) - 1)) / sizeof(T), bool device_only = false>
void blender::draw::StorageArrayBuffer< T, len, device_only >::swap ( StorageArrayBuffer< T, len, device_only > & a,
StorageArrayBuffer< T, len, device_only > & b )
inlinestatic

◆ trim_to_next_power_of_2()

template<typename T, int64_t len = (512u + (sizeof(T) - 1)) / sizeof(T), bool device_only = false>
void blender::draw::StorageArrayBuffer< T, len, device_only >::trim_to_next_power_of_2 ( int64_t required_size)
inline

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