|
Blender V5.0
|
#include <mtl_context.hh>
Static Public Attributes | |
| static volatile std::atomic< int > | num_active_cmd_bufs_in_system = 0 |
Friends | |
| class | MTLContext |
MTLCommandBuffer initialization and render coordination. | |
| void | prepare (bool supports_render=true) |
| bool | submit (bool wait) |
Command buffer debugging. | |
| bool | insert_memory_barrier (GPUBarrier barrier_bits, GPUStageBarrierBits before_stages, GPUStageBarrierBits after_stages) |
| void | encode_signal_event (id< MTLEvent > event, uint64_t value) |
| void | encode_wait_for_event (id< MTLEvent > event, uint64_t value) |
| void | push_debug_group (const char *name, int index) |
| void | pop_debug_group () |
Definition at line 545 of file mtl_context.hh.
|
inline |
Definition at line 597 of file mtl_context.hh.
References MTLContext.
|
inline |
Definition at line 661 of file mtl_context.hh.
References BLI_assert, and num_active_cmd_bufs_in_system.
Referenced by blender::gpu::present().
| bool blender::gpu::MTLCommandBufferManager::do_break_submission | ( | ) |
Definition at line 479 of file mtl_command_buffer.mm.
References GPU_DEVICE_ATI, GPU_DEVICE_INTEL, GPU_DRIVER_ANY, GPU_OS_ANY, and GPU_type_matches().
| void blender::gpu::MTLCommandBufferManager::encode_signal_event | ( | id< MTLEvent > | event, |
| uint64_t | value ) |
Definition at line 666 of file mtl_command_buffer.mm.
References BLI_assert, and end_active_command_encoder().
Referenced by blender::gpu::MTLStorageBuf::async_flush_to_host(), and blender::gpu::MTLFence::signal().
| void blender::gpu::MTLCommandBufferManager::encode_wait_for_event | ( | id< MTLEvent > | event, |
| uint64_t | value ) |
Definition at line 676 of file mtl_command_buffer.mm.
References BLI_assert, and end_active_command_encoder().
Referenced by blender::gpu::MTLFence::wait().
| bool blender::gpu::MTLCommandBufferManager::end_active_command_encoder | ( | bool | retain_framebuffers = false | ) |
Definition at line 232 of file mtl_command_buffer.mm.
References BLI_assert.
Referenced by encode_signal_event(), encode_wait_for_event(), ensure_begin_blit_encoder(), ensure_begin_compute_encoder(), ensure_begin_render_command_encoder(), insert_memory_barrier(), pop_debug_group(), push_debug_group(), and submit().
| id< MTLBlitCommandEncoder > blender::gpu::MTLCommandBufferManager::ensure_begin_blit_encoder | ( | ) |
Definition at line 374 of file mtl_command_buffer.mm.
References BLI_assert, end_active_command_encoder(), G, and G_DEBUG_GPU.
Referenced by blender::gpu::MTLStorageBuf::async_flush_to_host(), blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLFrameBuffer::blit(), blender::gpu::MTLStorageBuf::clear(), blender::gpu::MTLTexture::clear(), blender::gpu::MTLStorageBuf::copy_sub(), blender::gpu::MTLTexture::copy_to(), blender::gpu::MTLTexture::generate_mipmap(), blender::gpu::MTLQueryPool::get_occlusion_result(), blender::gpu::MTLIndexBuf::read(), blender::gpu::MTLStorageBuf::read(), blender::gpu::MTLVertBuf::read(), blender::gpu::MTLStorageBuf::update(), blender::gpu::MTLIndexBuf::update_sub(), blender::gpu::MTLTexture::update_sub(), blender::gpu::MTLTexture::update_sub(), and blender::gpu::MTLVertBuf::update_sub().
| id< MTLComputeCommandEncoder > blender::gpu::MTLCommandBufferManager::ensure_begin_compute_encoder | ( | ) |
Definition at line 413 of file mtl_command_buffer.mm.
References BLI_assert, end_active_command_encoder(), G, and G_DEBUG_GPU.
Referenced by blender::gpu::MTLStorageBuf::clear(), blender::gpu::MTLTexture::clear(), and blender::gpu::MTLTexture::update_sub().
| id< MTLRenderCommandEncoder > blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder | ( | MTLFrameBuffer * | ctx_framebuffer, |
| bool | force_begin, | ||
| bool * | r_new_pass ) |
Definition at line 292 of file mtl_command_buffer.mm.
References blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor(), BLI_assert, end_active_command_encoder(), G, G_DEBUG_GPU, and blender::gpu::MTLBuffer::get_metal_buffer().
| id< MTLBlitCommandEncoder > blender::gpu::MTLCommandBufferManager::get_active_blit_command_encoder | ( | ) |
Definition at line 209 of file mtl_command_buffer.mm.
|
inline |
Definition at line 668 of file mtl_context.hh.
Referenced by wait_until_active_command_buffers_complete().
| id< MTLComputeCommandEncoder > blender::gpu::MTLCommandBufferManager::get_active_compute_command_encoder | ( | ) |
Definition at line 215 of file mtl_command_buffer.mm.
Referenced by insert_memory_barrier().
| MTLFrameBuffer * blender::gpu::MTLCommandBufferManager::get_active_framebuffer | ( | ) |
Definition at line 221 of file mtl_command_buffer.mm.
References is_inside_render_pass().
Referenced by blender::gpu::MTLBatch::bind().
| id< MTLRenderCommandEncoder > blender::gpu::MTLCommandBufferManager::get_active_render_command_encoder | ( | ) |
Definition at line 203 of file mtl_command_buffer.mm.
Referenced by blender::gpu::MTLQueryPool::begin_query(), blender::gpu::MTLQueryPool::end_query(), and insert_memory_barrier().
|
inline |
Definition at line 622 of file mtl_context.hh.
References BLI_assert, and is_inside_compute().
Referenced by blender::gpu::MTLStorageBuf::clear(), blender::gpu::MTLTexture::clear(), and blender::gpu::MTLTexture::update_sub().
|
inline |
Definition at line 614 of file mtl_context.hh.
References BLI_assert, and is_inside_render_pass().
Referenced by blender::gpu::MTLBatch::bind().
|
inline |
Definition at line 655 of file mtl_context.hh.
References num_active_cmd_bufs_in_system.
Referenced by blender::gpu::present().
| bool blender::gpu::MTLCommandBufferManager::insert_memory_barrier | ( | GPUBarrier | barrier_bits, |
| GPUStageBarrierBits | before_stages, | ||
| GPUStageBarrierBits | after_stages ) |
Definition at line 579 of file mtl_command_buffer.mm.
References BLI_assert, end_active_command_encoder(), get_active_compute_command_encoder(), get_active_render_command_encoder(), GPU_ARCHITECTURE_TBDR, GPU_BARRIER_BUFFER_UPDATE, GPU_BARRIER_ELEMENT_ARRAY, GPU_BARRIER_SHADER_IMAGE_ACCESS, GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_STAGE_FRAGMENT, GPU_BARRIER_STAGE_VERTEX, GPU_BARRIER_TEXTURE_FETCH, GPU_BARRIER_UNIFORM, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, and GPU_platform_architecture().
Referenced by blender::gpu::MTLStateManager::issue_barrier().
| bool blender::gpu::MTLCommandBufferManager::is_inside_blit | ( | ) |
Definition at line 193 of file mtl_command_buffer.mm.
| bool blender::gpu::MTLCommandBufferManager::is_inside_compute | ( | ) |
Definition at line 198 of file mtl_command_buffer.mm.
Referenced by get_compute_state().
| bool blender::gpu::MTLCommandBufferManager::is_inside_render_pass | ( | ) |
Definition at line 188 of file mtl_command_buffer.mm.
Referenced by get_active_framebuffer(), and get_render_pass_state().
| void blender::gpu::MTLCommandBufferManager::pop_debug_group | ( | ) |
Definition at line 523 of file mtl_command_buffer.mm.
References end_active_command_encoder(), and METAL_DEBUG_CAPTURE_MAX_NESTED_GROUPS.
| void blender::gpu::MTLCommandBufferManager::prepare | ( | bool | supports_render = true | ) |
Definition at line 29 of file mtl_command_buffer.mm.
| void blender::gpu::MTLCommandBufferManager::push_debug_group | ( | const char * | name, |
| int | index ) |
Definition at line 505 of file mtl_command_buffer.mm.
References end_active_command_encoder(), and name.
| void blender::gpu::MTLCommandBufferManager::register_draw_counters | ( | int | vertex_submission | ) |
Definition at line 462 of file mtl_command_buffer.mm.
| void blender::gpu::MTLCommandBufferManager::reset_counters | ( | ) |
Definition at line 470 of file mtl_command_buffer.mm.
| bool blender::gpu::MTLCommandBufferManager::submit | ( | bool | wait | ) |
Definition at line 89 of file mtl_command_buffer.mm.
References BLI_assert, blender::gpu::MTLSafeFreeList::decrement_reference(), end_active_command_encoder(), error(), G, G_DEBUG_GPU, blender::gpu::MTLBackend::get(), blender::gpu::MTLBufferPool::get_current_safe_list(), blender::gpu::MTLContext::get_global_memory_manager(), blender::gpu::MTLSafeFreeList::increment_reference(), GHOST_ContextMTL::max_command_buffer_count, MTL_LOG_WARNING, num_active_cmd_bufs_in_system, and wait_until_active_command_buffers_complete().
Referenced by blender::gpu::MTLTexture::update_sub().
|
inline |
Definition at line 673 of file mtl_context.hh.
References get_active_command_buffer_count().
Referenced by submit().
|
friend |
Definition at line 546 of file mtl_context.hh.
References MTLContext.
Referenced by MTLCommandBufferManager(), and MTLContext.
|
static |
Definition at line 550 of file mtl_context.hh.
Referenced by dec_active_command_buffer_count(), inc_active_command_buffer_count(), blender::gpu::present(), and submit().