Blender
V3.3
|
#include <mtl_context.hh>
Static Public Attributes | |
static id< MTLEvent > | sync_event = nil |
static uint64_t | event_signal_val = 0 |
static int | num_active_cmd_bufs = 0 |
Friends | |
class | MTLContext |
MTLCommandBuffer initialization and render coordination. | |
void | prepare (bool supports_render=true) |
bool | submit (bool wait) |
Definition at line 466 of file mtl_context.hh.
|
inline |
Definition at line 511 of file mtl_context.hh.
bool blender::gpu::MTLCommandBufferManager::do_break_submission | ( | ) |
Definition at line 426 of file mtl_command_buffer.mm.
References GPU_DEVICE_ATI, GPU_DEVICE_INTEL, GPU_DRIVER_ANY, GPU_OS_ANY, and GPU_type_matches().
Referenced by blender::gpu::MTLContext::ensure_begin_render_pass().
bool blender::gpu::MTLCommandBufferManager::end_active_command_encoder | ( | ) |
Definition at line 228 of file mtl_command_buffer.mm.
References BLI_assert.
Referenced by ensure_begin_blit_encoder(), ensure_begin_compute_encoder(), ensure_begin_render_command_encoder(), submit(), and blender::gpu::MTLFrameBuffer::~MTLFrameBuffer().
id< MTLBlitCommandEncoder > blender::gpu::MTLCommandBufferManager::ensure_begin_blit_encoder | ( | ) |
Definition at line 352 of file mtl_command_buffer.mm.
References BLI_assert, and end_active_command_encoder().
Referenced by blender::gpu::MTLFrameBuffer::blit(), blender::gpu::MTLTexture::copy_to(), blender::gpu::MTLTexture::generate_mipmap(), blender::gpu::MTLQueryPool::get_occlusion_result(), and blender::gpu::MTLTexture::update_sub().
id< MTLComputeCommandEncoder > blender::gpu::MTLCommandBufferManager::ensure_begin_compute_encoder | ( | ) |
Definition at line 377 of file mtl_command_buffer.mm.
References BLI_assert, and end_active_command_encoder().
Referenced by blender::gpu::MTLTexture::update_sub().
id< MTLRenderCommandEncoder > blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder | ( | MTLFrameBuffer * | ctx_framebuffer, |
bool | force_begin, | ||
bool * | new_pass | ||
) |
Definition at line 286 of file mtl_command_buffer.mm.
References blender::gpu::MTLFrameBuffer::apply_state(), blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor(), BLI_assert, blender::gpu::MTLContext::clear_visibility_dirty(), end_active_command_encoder(), blender::gpu::MTLBuffer::get_metal_buffer(), blender::gpu::MTLFrameBuffer::get_pending_clear(), blender::gpu::MTLContext::get_visibility_buffer(), blender::gpu::MTLFrameBuffer::mark_cleared(), and blender::gpu::MTLRenderPassState::reset_state().
Referenced by blender::gpu::MTLContext::ensure_begin_render_pass().
id< MTLBlitCommandEncoder > blender::gpu::MTLCommandBufferManager::get_active_blit_command_encoder | ( | ) |
Definition at line 205 of file mtl_command_buffer.mm.
id< MTLComputeCommandEncoder > blender::gpu::MTLCommandBufferManager::get_active_compute_command_encoder | ( | ) |
Definition at line 211 of file mtl_command_buffer.mm.
Referenced by insert_memory_barrier().
MTLFrameBuffer * blender::gpu::MTLCommandBufferManager::get_active_framebuffer | ( | ) |
Definition at line 217 of file mtl_command_buffer.mm.
References is_inside_render_pass().
Referenced by blender::gpu::MTLContext::ensure_begin_render_pass(), blender::gpu::MTLRenderPassState::reset_state(), and blender::gpu::MTLFrameBuffer::~MTLFrameBuffer().
id< MTLRenderCommandEncoder > blender::gpu::MTLCommandBufferManager::get_active_render_command_encoder | ( | ) |
Definition at line 199 of file mtl_command_buffer.mm.
Referenced by blender::gpu::MTLQueryPool::begin_query(), blender::gpu::MTLRenderPassState::bind_fragment_texture(), blender::gpu::MTLRenderPassState::bind_vertex_texture(), blender::gpu::MTLQueryPool::end_query(), blender::gpu::MTLContext::ensure_begin_render_pass(), and insert_memory_barrier().
|
inline |
Definition at line 528 of file mtl_context.hh.
References BLI_assert, and is_inside_render_pass().
bool blender::gpu::MTLCommandBufferManager::insert_memory_barrier | ( | eGPUBarrier | barrier_bits, |
eGPUStageBarrierBits | before_stages, | ||
eGPUStageBarrierBits | after_stages | ||
) |
Definition at line 470 of file mtl_command_buffer.mm.
References BLI_assert, get_active_compute_command_encoder(), get_active_render_command_encoder(), 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, and GPU_BARRIER_VERTEX_ATTRIB_ARRAY.
Referenced by blender::gpu::MTLStateManager::issue_barrier().
bool blender::gpu::MTLCommandBufferManager::is_inside_blit | ( | ) |
Definition at line 189 of file mtl_command_buffer.mm.
bool blender::gpu::MTLCommandBufferManager::is_inside_compute | ( | ) |
Definition at line 194 of file mtl_command_buffer.mm.
bool blender::gpu::MTLCommandBufferManager::is_inside_render_pass | ( | ) |
Definition at line 184 of file mtl_command_buffer.mm.
Referenced by blender::gpu::MTLContext::ensure_begin_render_pass(), get_active_framebuffer(), and get_render_pass_state().
void blender::gpu::MTLCommandBufferManager::pop_debug_group | ( | ) |
Definition at line 461 of file mtl_command_buffer.mm.
Referenced by blender::gpu::MTLContext::debug_group_end().
Definition at line 32 of file mtl_command_buffer.mm.
References blender::gpu::MTLRenderPassState::reset_state().
Referenced by blender::gpu::MTLContext::MTLContext().
void blender::gpu::MTLCommandBufferManager::push_debug_group | ( | const char * | name, |
int | index | ||
) |
Definition at line 453 of file mtl_command_buffer.mm.
Referenced by blender::gpu::MTLContext::debug_group_begin().
void blender::gpu::MTLCommandBufferManager::register_draw_counters | ( | int | vertex_submission | ) |
Definition at line 409 of file mtl_command_buffer.mm.
void blender::gpu::MTLCommandBufferManager::reset_counters | ( | ) |
Definition at line 417 of file mtl_command_buffer.mm.
Definition at line 82 of file mtl_command_buffer.mm.
References BLI_assert, blender::gpu::MTLSafeFreeList::decrement_reference(), blender::gpu::MTLContext::device, end_active_command_encoder(), error(), event_signal_val, blender::gpu::MTLScratchBufferManager::flush_active_scratch_buffer(), 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(), blender::gpu::MTLContext::memory_manager, num_active_cmd_bufs, usdtokens::out(), and sync_event.
|
friend |
Definition at line 467 of file mtl_context.hh.
|
static |
Definition at line 472 of file mtl_context.hh.
Referenced by submit().
|
static |
Definition at line 475 of file mtl_context.hh.
Referenced by submit().
|
static |
Definition at line 471 of file mtl_context.hh.
Referenced by submit().