|
Blender V4.3
|
#include <mtl_memory.hh>
Public Member Functions | |
| MEM_CXX_CLASS_ALLOC_FUNCS ("MTLBuffer") | |
MTLBuffer wrapper class implementation. | |
| MTLBuffer (id< MTLDevice > device, uint64_t size, MTLResourceOptions options, uint alignment=1) | |
| MTLBuffer (id< MTLBuffer > external_buffer) | |
| ~MTLBuffer () | |
| id< MTLBuffer > | get_metal_buffer () const |
| void * | get_host_ptr () const |
| uint64_t | get_size_used () const |
| uint64_t | get_size () const |
| void | flush () |
| void | flush_range (uint64_t offset, uint64_t length) |
| bool | requires_flush () |
| void | flag_in_use (bool used) |
| bool | get_in_use () |
| void | set_usage_size (uint64_t size_used) |
| void | set_label (NSString *str) |
| MTLResourceOptions | get_resource_options () |
| uint64_t | get_alignment () |
| void | free () |
| void | debug_ensure_used () |
Public Attributes | |
| gpu::MTLBuffer * | next |
| gpu::MTLBuffer * | prev |
Definition at line 110 of file mtl_memory.hh.
| blender::gpu::MTLBuffer::MTLBuffer | ( | id< MTLDevice > | device, |
| uint64_t | size, | ||
| MTLResourceOptions | options, | ||
| uint | alignment = 1 ) |
Definition at line 646 of file mtl_memory.mm.
References BLI_assert, ceil_to_multiple_ul(), flag_in_use(), next, options, prev, and set_usage_size().
| blender::gpu::MTLBuffer::MTLBuffer | ( | id< MTLBuffer > | external_buffer | ) |
Definition at line 678 of file mtl_memory.mm.
References BLI_assert, next, prev, and set_usage_size().
| blender::gpu::gpu::MTLBuffer::~MTLBuffer | ( | ) |
Definition at line 700 of file mtl_memory.mm.
| void blender::gpu::gpu::MTLBuffer::debug_ensure_used | ( | ) |
Definition at line 754 of file mtl_memory.mm.
References BLI_assert_msg.
Referenced by blender::gpu::MTLStorageBuf::get_metal_buffer(), blender::gpu::MTLUniformBuf::get_metal_buffer(), and blender::gpu::MTLContext::set_visibility_buffer().
| void blender::gpu::gpu::MTLBuffer::flag_in_use | ( | bool | used | ) |
Definition at line 780 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::gpu::MTLBufferPool::free_buffer(), MTLBuffer(), and blender::gpu::MTLCircularBuffer::MTLCircularBuffer().
| void blender::gpu::gpu::MTLBuffer::flush | ( | ) |
Definition at line 763 of file mtl_memory.mm.
Referenced by blender::gpu::MTLContext::ensure_texture_bindings(), blender::gpu::MTLContext::ensure_texture_bindings(), and blender::gpu::MTLIndexBuf::get_index_buffer().
Definition at line 771 of file mtl_memory.mm.
References BLI_assert.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned_with_data(), blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLCircularBuffer::flush(), and blender::gpu::MTLStorageBuf::update().
| void blender::gpu::gpu::MTLBuffer::free | ( | ) |
Definition at line 708 of file mtl_memory.mm.
References blender::gpu::MTLBufferPool::free_buffer(), and blender::gpu::MTLContext::get_global_memory_manager().
Referenced by blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLIndexBuf::get_index_buffer(), blender::gpu::MTLStorageBuf::read(), blender::gpu::MTLVertBuf::read(), blender::gpu::MTLVertBuf::release_data(), blender::gpu::MTLStorageBuf::update(), blender::gpu::MTLUniformBuf::update(), blender::gpu::MTLIndexBuf::update_sub(), blender::gpu::MTLTexture::update_sub(), blender::gpu::MTLIndexBuf::upload_data(), blender::gpu::MTLIndexBuf::~MTLIndexBuf(), blender::gpu::MTLStorageBuf::~MTLStorageBuf(), and blender::gpu::MTLUniformBuf::~MTLUniformBuf().
| uint64_t blender::gpu::gpu::MTLBuffer::get_alignment | ( | ) |
Definition at line 801 of file mtl_memory.mm.
Referenced by blender::gpu::MTLCircularBuffer::allocate_range_aligned().
| void * blender::gpu::gpu::MTLBuffer::get_host_ptr | ( | ) | const |
Definition at line 726 of file mtl_memory.mm.
References BLI_assert.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned_with_data(), blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLIndexBuf::get_index_buffer(), blender::gpu::MTLIndexBuf::read(), blender::gpu::MTLStorageBuf::read(), blender::gpu::MTLVertBuf::read(), and blender::gpu::MTLStorageBuf::update().
| bool blender::gpu::gpu::MTLBuffer::get_in_use | ( | ) |
Definition at line 785 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLBufferPool::free_buffer(), and blender::gpu::MTLBufferPool::update_memory_pools().
| id< MTLBuffer > blender::gpu::gpu::MTLBuffer::get_metal_buffer | ( | ) | const |
Definition at line 721 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLBufferPool::allocate_aligned_with_data(), blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::gpu::MTLStorageBuf::async_flush_to_host(), blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLStorageBuf::clear(), blender::gpu::MTLStorageBuf::copy_sub(), blender::gpu::MTLVertBuf::duplicate_data(), blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder(), blender::gpu::MTLContext::ensure_texture_bindings(), blender::gpu::MTLContext::ensure_texture_bindings(), blender::gpu::MTLIndexBuf::get_index_buffer(), blender::gpu::MTLStorageBuf::get_metal_buffer(), blender::gpu::MTLUniformBuf::get_metal_buffer(), blender::gpu::MTLStorageBuf::init(), blender::gpu::MTLIndexBuf::read(), blender::gpu::MTLStorageBuf::read(), blender::gpu::MTLVertBuf::read(), blender::gpu::MTLStorageBuf::update(), blender::gpu::MTLUniformBuf::update(), blender::gpu::MTLIndexBuf::update_sub(), blender::gpu::MTLTexture::update_sub(), and blender::gpu::MTLVertBuf::update_sub().
| MTLResourceOptions blender::gpu::gpu::MTLBuffer::get_resource_options | ( | ) |
Definition at line 796 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned_with_data(), blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::gpu::MTLStorageBuf::read(), blender::gpu::MTLStorageBuf::update(), and blender::gpu::MTLBufferPool::update_memory_pools().
| uint64_t blender::gpu::gpu::MTLBuffer::get_size | ( | ) | const |
Definition at line 733 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLVertBuf::duplicate_data(), blender::gpu::MTLBufferHandle::MTLBufferHandle(), and blender::gpu::MTLVertBuf::update_sub().
| uint64_t blender::gpu::gpu::MTLBuffer::get_size_used | ( | ) | const |
Definition at line 738 of file mtl_memory.mm.
| blender::gpu::MTLBuffer::MEM_CXX_CLASS_ALLOC_FUNCS | ( | "MTLBuffer" | ) |
| bool blender::gpu::gpu::MTLBuffer::requires_flush | ( | ) |
Definition at line 743 of file mtl_memory.mm.
| void blender::gpu::gpu::MTLBuffer::set_label | ( | NSString * | str | ) |
Definition at line 749 of file mtl_memory.mm.
References str.
Referenced by blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLStorageBuf::init(), blender::gpu::MTLCircularBuffer::MTLCircularBuffer(), blender::gpu::MTLUniformBuf::update(), and blender::gpu::MTLIndexBuf::upload_data().
| void blender::gpu::gpu::MTLBuffer::set_usage_size | ( | uint64_t | size_used | ) |
Definition at line 790 of file mtl_memory.mm.
References BLI_assert.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), MTLBuffer(), and MTLBuffer().
| gpu::MTLBuffer* blender::gpu::MTLBuffer::next |
Definition at line 115 of file mtl_memory.hh.
Referenced by MTLBuffer(), and MTLBuffer().
| gpu::MTLBuffer * blender::gpu::MTLBuffer::prev |
Definition at line 115 of file mtl_memory.hh.
Referenced by MTLBuffer(), and MTLBuffer().