|
Blender V4.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 () |
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 468 of file mtl_memory.hh.
|
inline |
Definition at line 497 of file mtl_memory.hh.
| blender::gpu::MTLScratchBufferManager::~MTLScratchBufferManager | ( | ) |
Definition at line 829 of file mtl_memory.mm.
References free().
| void blender::gpu::MTLScratchBufferManager::ensure_increment_scratch_buffer | ( | ) |
Definition at line 885 of file mtl_memory.mm.
References BLI_assert, blender::gpu::MTLContext::get_current_frame_index(), MTL_LOG_INFO, and blender::gpu::MTLCircularBuffer::reset().
| void blender::gpu::MTLScratchBufferManager::flush_active_scratch_buffer | ( | ) |
Definition at line 907 of file mtl_memory.mm.
References BLI_assert, and blender::gpu::MTLCircularBuffer::flush().
Referenced by blender::gpu::MTLCommandBufferManager::submit().
| void blender::gpu::MTLScratchBufferManager::free | ( | ) |
Definition at line 852 of file mtl_memory.mm.
Referenced by blender::gpu::MTLContext::~MTLContext(), and ~MTLScratchBufferManager().
| void blender::gpu::MTLScratchBufferManager::init | ( | ) |
Definition at line 834 of file mtl_memory.mm.
References BLI_assert, blender::gpu::MTLContext::device, and mtl_scratch_buffer_initial_size_.
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 864 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 869 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 blender::gpu::MTLImmediate::begin(), blender::gpu::MTLComputeState::bind_compute_bytes(), blender::gpu::MTLRenderPassState::bind_fragment_bytes(), blender::gpu::MTLRenderPassState::bind_vertex_bytes(), blender::gpu::MTLImmediate::end(), scratch_buffer_allocate_range(), and blender::gpu::MTLVertBuf::update_sub().
|
staticconstexpr |
Definition at line 483 of file mtl_memory.hh.
Referenced by init().
|
staticconstexpr |
Definition at line 480 of file mtl_memory.hh.
Referenced by blender::gpu::MTLCircularBuffer::allocate_range_aligned().