|
Blender V5.0
|
#include <mtl_memory.hh>
Public Member Functions | |
| MTLScratchBufferManager (MTLContext &context) | |
| MEM_CXX_CLASS_ALLOC_FUNCS ("MTLBufferPool") | |
MTLScratchBufferManager and MTLCircularBuffer implementation. | |
| ~MTLScratchBufferManager () | |
| void | init () |
| void | free () |
| MTLTemporaryBuffer | scratch_buffer_allocate_range (uint64_t alloc_size) |
| MTLTemporaryBuffer | scratch_buffer_allocate_range_aligned (uint64_t alloc_size, uint alignment) |
| void | ensure_increment_scratch_buffer () |
| void | flush_active_scratch_buffer () |
| void | bind_as_ssbo (int slot) |
| void | unbind_as_ssbo () |
Static Public Attributes | |
| static constexpr uint | mtl_scratch_buffer_max_size_ = 128 * 1024 * 1024 |
| static constexpr uint | mtl_scratch_buffer_initial_size_ = 16 * 1024 * 1024 |
Definition at line 469 of file mtl_memory.hh.
|
inline |
Definition at line 498 of file mtl_memory.hh.
| blender::gpu::MTLScratchBufferManager::~MTLScratchBufferManager | ( | ) |
Definition at line 836 of file mtl_memory.mm.
References free().
| void blender::gpu::MTLScratchBufferManager::bind_as_ssbo | ( | int | slot | ) |
Definition at line 922 of file mtl_memory.mm.
References blender::gpu::MTLStorageBuf::bind(), and BLI_assert.
| void blender::gpu::MTLScratchBufferManager::ensure_increment_scratch_buffer | ( | ) |
Definition at line 892 of file mtl_memory.mm.
References BLI_assert, MTL_LOG_DEBUG, and blender::gpu::MTLCircularBuffer::reset().
| void blender::gpu::MTLScratchBufferManager::flush_active_scratch_buffer | ( | ) |
Definition at line 914 of file mtl_memory.mm.
References BLI_assert, and blender::gpu::MTLCircularBuffer::flush().
| void blender::gpu::MTLScratchBufferManager::free | ( | ) |
Definition at line 859 of file mtl_memory.mm.
Referenced by blender::gpu::MTLContext::~MTLContext(), and ~MTLScratchBufferManager().
| void blender::gpu::MTLScratchBufferManager::init | ( | ) |
Definition at line 841 of file mtl_memory.mm.
References BLI_assert, and mtl_scratch_buffer_initial_size_.
| blender::gpu::MTLScratchBufferManager::MEM_CXX_CLASS_ALLOC_FUNCS | ( | "MTLBufferPool" | ) |
| MTLTemporaryBuffer blender::gpu::MTLScratchBufferManager::scratch_buffer_allocate_range | ( | uint64_t | alloc_size | ) |
Definition at line 871 of file mtl_memory.mm.
References scratch_buffer_allocate_range_aligned().
Referenced by blender::gpu::MTLIndexBuf::update_sub().
| MTLTemporaryBuffer blender::gpu::MTLScratchBufferManager::scratch_buffer_allocate_range_aligned | ( | uint64_t | alloc_size, |
| uint | alignment ) |
Definition at line 876 of file mtl_memory.mm.
References blender::gpu::MTLCircularBuffer::allocate_range_aligned(), BLI_assert, BLI_assert_msg, max_uu(), blender::gpu::MTLBufferRange::metal_buffer, and blender::gpu::MTLBufferRange::size.
Referenced by scratch_buffer_allocate_range(), and blender::gpu::MTLVertBuf::update_sub().
| void blender::gpu::MTLScratchBufferManager::unbind_as_ssbo | ( | ) |
Definition at line 930 of file mtl_memory.mm.
References BLI_assert, and blender::gpu::MTLStorageBuf::unbind().
|
staticconstexpr |
Definition at line 484 of file mtl_memory.hh.
Referenced by init().
|
staticconstexpr |
Definition at line 481 of file mtl_memory.hh.
Referenced by blender::gpu::MTLCircularBuffer::allocate_range_aligned().