|
Blender V5.0
|
#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 109 of file mtl_memory.hh.
| blender::gpu::MTLBuffer::MTLBuffer | ( | id< MTLDevice > | device, |
| uint64_t | size, | ||
| MTLResourceOptions | options, | ||
| uint | alignment = 1 ) |
Definition at line 653 of file mtl_memory.mm.
References BLI_assert, ceil_to_multiple_ul(), flag_in_use(), next, options, prev, set_usage_size(), and size().
| blender::gpu::MTLBuffer::MTLBuffer | ( | id< MTLBuffer > | external_buffer | ) |
Definition at line 685 of file mtl_memory.mm.
References BLI_assert, next, prev, and set_usage_size().
| blender::gpu::gpu::MTLBuffer::~MTLBuffer | ( | ) |
Definition at line 707 of file mtl_memory.mm.
| void blender::gpu::gpu::MTLBuffer::debug_ensure_used | ( | ) |
Definition at line 761 of file mtl_memory.mm.
References BLI_assert_msg.
Referenced by flush(), flush_range(), blender::gpu::MTLStorageBuf::get_metal_buffer(), and blender::gpu::MTLContext::set_visibility_buffer().
| void blender::gpu::gpu::MTLBuffer::flag_in_use | ( | bool | used | ) |
Definition at line 787 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLBufferPool::free_buffer(), and MTLBuffer().
| void blender::gpu::gpu::MTLBuffer::flush | ( | ) |
Definition at line 770 of file mtl_memory.mm.
References debug_ensure_used(), and requires_flush().
Referenced by blender::gpu::MTLContext::ensure_texture_bindings(), and blender::gpu::MTLContext::ensure_texture_bindings().
Definition at line 778 of file mtl_memory.mm.
References BLI_assert, debug_ensure_used(), length(), and requires_flush().
Referenced by blender::gpu::MTLBufferPool::allocate_aligned_with_data(), and blender::gpu::MTLStorageBuf::update().
| void blender::gpu::gpu::MTLBuffer::free | ( | ) |
Definition at line 715 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::MTLStorageBuf::read(), blender::gpu::MTLVertBuf::read(), blender::gpu::MTLStorageBuf::update(), and blender::gpu::MTLTexture::update_sub().
| uint64_t blender::gpu::gpu::MTLBuffer::get_alignment | ( | ) |
Definition at line 808 of file mtl_memory.mm.
| void * blender::gpu::gpu::MTLBuffer::get_host_ptr | ( | ) | const |
Definition at line 733 of file mtl_memory.mm.
References BLI_assert.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned_with_data(), blender::gpu::MTLStorageBuf::read(), blender::gpu::MTLVertBuf::read(), and blender::gpu::MTLStorageBuf::update().
| bool blender::gpu::gpu::MTLBuffer::get_in_use | ( | ) |
Definition at line 792 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 728 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLBufferPool::allocate_aligned_with_data(), blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLStorageBuf::copy_sub(), blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder(), blender::gpu::MTLContext::ensure_texture_bindings(), blender::gpu::MTLContext::ensure_texture_bindings(), blender::gpu::MTLStorageBuf::get_metal_buffer(), blender::gpu::MTLStorageBuf::read(), blender::gpu::MTLVertBuf::read(), blender::gpu::MTLStorageBuf::update(), and blender::gpu::MTLTexture::update_sub().
| MTLResourceOptions blender::gpu::gpu::MTLBuffer::get_resource_options | ( | ) |
Definition at line 803 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned_with_data(), and blender::gpu::MTLBufferPool::update_memory_pools().
| uint64_t blender::gpu::gpu::MTLBuffer::get_size | ( | ) | const |
Definition at line 740 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), and blender::gpu::MTLBufferHandle::MTLBufferHandle().
| uint64_t blender::gpu::gpu::MTLBuffer::get_size_used | ( | ) | const |
Definition at line 745 of file mtl_memory.mm.
| blender::gpu::MTLBuffer::MEM_CXX_CLASS_ALLOC_FUNCS | ( | "MTLBuffer" | ) |
| bool blender::gpu::gpu::MTLBuffer::requires_flush | ( | ) |
Definition at line 750 of file mtl_memory.mm.
Referenced by flush(), and flush_range().
| void blender::gpu::gpu::MTLBuffer::set_label | ( | NSString * | str | ) |
Definition at line 756 of file mtl_memory.mm.
References str.
Referenced by blender::gpu::MTLVertBuf::bind(), and blender::gpu::MTLUniformBuf::update().
| void blender::gpu::gpu::MTLBuffer::set_usage_size | ( | uint64_t | size_used | ) |
Definition at line 797 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 114 of file mtl_memory.hh.
Referenced by MTLBuffer(), and MTLBuffer().
| gpu::MTLBuffer * blender::gpu::MTLBuffer::prev |
Definition at line 114 of file mtl_memory.hh.
Referenced by MTLBuffer(), and MTLBuffer().