|
Blender V5.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 113 of file mtl_memory.hh.
| blender::gpu::MTLBuffer::MTLBuffer | ( | id< MTLDevice > | device, |
| uint64_t | size, | ||
| MTLResourceOptions | options, | ||
| uint | alignment = 1 ) |
Definition at line 703 of file mtl_memory.mm.
References blender::BLI_assert(), blender::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 735 of file mtl_memory.mm.
References blender::BLI_assert(), next, prev, and set_usage_size().
| blender::gpu::gpu::MTLBuffer::~MTLBuffer | ( | ) |
Definition at line 757 of file mtl_memory.mm.
| void blender::gpu::gpu::MTLBuffer::debug_ensure_used | ( | ) |
Definition at line 811 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 837 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 820 of file mtl_memory.mm.
References debug_ensure_used(), and requires_flush().
Referenced by blender::gpu::bind_sampler_argument_buffer().
Definition at line 828 of file mtl_memory.mm.
References blender::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 765 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::MTLBottomLevelAS::build(), blender::gpu::MTLTopLevelAS::build(), 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 858 of file mtl_memory.mm.
| void * blender::gpu::gpu::MTLBuffer::get_host_ptr | ( | ) | const |
Definition at line 783 of file mtl_memory.mm.
References blender::BLI_assert().
Referenced by blender::gpu::MTLBufferPool::allocate_aligned_with_data(), blender::gpu::MTLTopLevelAS::build(), blender::gpu::MTLStorageBuf::read(), blender::gpu::MTLVertBuf::read(), and blender::gpu::MTLStorageBuf::update().
| bool blender::gpu::gpu::MTLBuffer::get_in_use | ( | ) |
Definition at line 842 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLBufferPool::free_buffer(), and blender::gpu::MTLBufferPool::update_memory_pools().
Definition at line 778 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::bind_sampler_argument_buffer(), blender::gpu::MTLBottomLevelAS::build(), blender::gpu::MTLTopLevelAS::build(), blender::gpu::MTLIndexBuf::copy_sub(), blender::gpu::MTLStorageBuf::copy_sub(), blender::gpu::MTLVertBuf::copy_sub(), blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder(), 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 853 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 790 of file mtl_memory.mm.
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::gpu::MTLSafeFreeList::insert_buffer(), and blender::gpu::MTLBufferHandle::MTLBufferHandle().
| uint64_t blender::gpu::gpu::MTLBuffer::get_size_used | ( | ) | const |
Definition at line 795 of file mtl_memory.mm.
| blender::gpu::MTLBuffer::MEM_CXX_CLASS_ALLOC_FUNCS | ( | "MTLBuffer" | ) |
| bool blender::gpu::gpu::MTLBuffer::requires_flush | ( | ) |
Definition at line 800 of file mtl_memory.mm.
Referenced by flush(), and flush_range().
| void blender::gpu::gpu::MTLBuffer::set_label | ( | NSString * | str | ) |
Definition at line 806 of file mtl_memory.mm.
References str.
| void blender::gpu::gpu::MTLBuffer::set_usage_size | ( | uint64_t | size_used | ) |
Definition at line 847 of file mtl_memory.mm.
References blender::BLI_assert().
Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), MTLBuffer(), and MTLBuffer().
| gpu::MTLBuffer* blender::gpu::MTLBuffer::next |
Definition at line 118 of file mtl_memory.hh.
Referenced by MTLBuffer(), and MTLBuffer().
| gpu::MTLBuffer * blender::gpu::MTLBuffer::prev |
Definition at line 118 of file mtl_memory.hh.
Referenced by MTLBuffer(), and MTLBuffer().