Blender V5.3
blender::gpu::VKIndexBuffer Class Reference

#include <vk_index_buffer.hh>

Inherits blender::gpu::IndexBuf.

Public Member Functions

void upload_data () override
void bind_as_ssbo (uint binding) override
void read (uint32_t *data) const override
void update_sub (uint start, uint len, const void *data) override
void copy_sub (IndexBuf &source_buf, uint source_first_index, uint dest_first_index, uint index_len) override
 Copy part of source index buffer into this index buffer.
VkBuffer vk_handle () const
const VKResourceWithHandle< VkBuffer > & resource () const
bool has_device_address () const
VkDeviceAddress device_address_get () const
VkIndexType vk_index_type () const
VkDeviceSize allocated_size_get () const
 Return the allocated size of the buffer in bytes.
void ensure_updated ()
Public Member Functions inherited from blender::gpu::IndexBuf
 IndexBuf ()
virtual ~IndexBuf ()
void init (uint indices_len, uint32_t *indices, uint min_index, uint max_index, GPUPrimType prim_type, bool uses_restart_indices)
void init_subrange (IndexBuf *elem_src, uint start, uint length)
void init_build_on_device (uint index_len)
uint32_t index_len_get () const
uint32_t index_start_get () const
uint32_t index_base_get () const
bool is_32bit () const
GPUIndexBufType index_type () const
size_t size_get () const
bool is_init () const

Additional Inherited Members

Protected Attributes inherited from blender::gpu::IndexBuf
GPUIndexBufType index_type_ = GPU_INDEX_U32
uint32_t index_start_ = 0
uint32_t index_len_ = 0
uint32_t index_base_ = 0
bool is_init_ = false
bool is_subrange_ = false
bool is_empty_ = false
union blender::gpu::IndexBuf:: { ... }  

Detailed Description

Definition at line 17 of file vk_index_buffer.hh.

Member Function Documentation

◆ allocated_size_get()

VkDeviceSize blender::gpu::VKIndexBuffer::allocated_size_get ( ) const
inline

Return the allocated size of the buffer in bytes.

Definition at line 56 of file vk_index_buffer.hh.

◆ bind_as_ssbo()

◆ copy_sub()

void blender::gpu::VKIndexBuffer::copy_sub ( IndexBuf & source_buf,
uint source_first_index,
uint dest_first_index,
uint index_len )
overridevirtual

Copy part of source index buffer into this index buffer.

Note
: index type of both buffers must be identical.
: asserts when the copy range exceeds the bounds of either buffer.
: both index buffers must be uploaded with GPU_indexbuf_use before calling.
Parameters
source_bufsource index buffer to copy data from.
source_first_indexstarting index to start copying the data from.
dest_first_indexstarting index to copy the data to.
index_lenthe number of indices to copy.

Implements blender::gpu::IndexBuf.

Definition at line 121 of file vk_index_buffer.cc.

References blender::BLI_assert(), BLI_assert_msg, blender::gpu::render_graph::VKCopyBufferData::dst_buffer, blender::gpu::VKContext::get(), blender::gpu::IndexBuf::index_len_, blender::gpu::IndexBuf::index_type_, blender::gpu::IndexBuf::IndexBuf(), blender::gpu::VKBuffer::is_allocated(), blender::gpu::IndexBuf::is_subrange_, blender::gpu::render_graph::VKCopyBufferData::region, blender::gpu::VKBuffer::resource(), blender::gpu::render_graph::VKCopyBufferData::src_buffer, and blender::gpu::to_bytesize().

◆ device_address_get()

VkDeviceAddress blender::gpu::VKIndexBuffer::device_address_get ( ) const
inline

Definition at line 47 of file vk_index_buffer.hh.

Referenced by blender::gpu::VKBottomLevelAS::add_geometry().

◆ ensure_updated()

◆ has_device_address()

bool blender::gpu::VKIndexBuffer::has_device_address ( ) const
inline

Definition at line 43 of file vk_index_buffer.hh.

Referenced by blender::gpu::VKBottomLevelAS::add_geometry().

◆ read()

◆ resource()

const VKResourceWithHandle< VkBuffer > & blender::gpu::VKIndexBuffer::resource ( ) const
inline

◆ update_sub()

◆ upload_data()

void blender::gpu::VKIndexBuffer::upload_data ( )
overridevirtual

Implements blender::gpu::IndexBuf.

Definition at line 71 of file vk_index_buffer.cc.

References ensure_updated().

Referenced by blender::gpu::VKBatch::ensure_data_uploaded().

◆ vk_handle()

VkBuffer blender::gpu::VKIndexBuffer::vk_handle ( ) const
inline

Definition at line 35 of file vk_index_buffer.hh.

◆ vk_index_type()

VkIndexType blender::gpu::VKIndexBuffer::vk_index_type ( ) const
inline

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