|
Blender V5.3
|
#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 484 of file mtl_memory.hh.
|
inline |
Definition at line 513 of file mtl_memory.hh.
| blender::gpu::MTLScratchBufferManager::~MTLScratchBufferManager | ( | ) |
Definition at line 886 of file mtl_memory.mm.
References free().
| void blender::gpu::MTLScratchBufferManager::bind_as_ssbo | ( | int | slot | ) |
Definition at line 972 of file mtl_memory.mm.
References blender::gpu::MTLStorageBuf::bind(), and blender::BLI_assert().
| void blender::gpu::MTLScratchBufferManager::ensure_increment_scratch_buffer | ( | ) |
Definition at line 942 of file mtl_memory.mm.
References blender::BLI_assert(), MTL_LOG_DEBUG, and blender::gpu::MTLCircularBuffer::reset().
| void blender::gpu::MTLScratchBufferManager::flush_active_scratch_buffer | ( | ) |
Definition at line 964 of file mtl_memory.mm.
References blender::BLI_assert(), and blender::gpu::MTLCircularBuffer::flush().
| void blender::gpu::MTLScratchBufferManager::free | ( | ) |
Definition at line 909 of file mtl_memory.mm.
Referenced by blender::gpu::MTLContext::~MTLContext(), and ~MTLScratchBufferManager().
| void blender::gpu::MTLScratchBufferManager::init | ( | ) |
Definition at line 891 of file mtl_memory.mm.
References blender::BLI_assert(), mtl_scratch_buffer_initial_size_, and blender::gpu::MTLCircularBuffer::MTLCircularBuffer().
Referenced by blender::gpu::MTLContext::MTLContext().
| blender::gpu::MTLScratchBufferManager::MEM_CXX_CLASS_ALLOC_FUNCS | ( | "MTLBufferPool" | ) |
| MTLTemporaryBuffer blender::gpu::MTLScratchBufferManager::scratch_buffer_allocate_range | ( | uint64_t | alloc_size | ) |
Definition at line 921 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 926 of file mtl_memory.mm.
References blender::gpu::MTLCircularBuffer::allocate_range_aligned(), blender::BLI_assert(), BLI_assert_msg, blender::max_uu(), blender::gpu::MTLBufferRange::metal_buffer, and blender::gpu::MTLBufferRange::size.
Referenced by blender::gpu::MTLBindingCache< CommandEncoderT >::bind_bytes(), scratch_buffer_allocate_range(), and blender::gpu::MTLVertBuf::update_sub().
| void blender::gpu::MTLScratchBufferManager::unbind_as_ssbo | ( | ) |
Definition at line 980 of file mtl_memory.mm.
References blender::BLI_assert(), and blender::gpu::MTLStorageBuf::unbind().
|
staticconstexpr |
Definition at line 499 of file mtl_memory.hh.
Referenced by init().
|
staticconstexpr |
Definition at line 496 of file mtl_memory.hh.
Referenced by blender::gpu::MTLCircularBuffer::allocate_range_aligned().