Blender V4.5
blender::gpu::MTLCommandBufferManager Class Reference

#include <mtl_context.hh>

Public Member Functions

 MTLCommandBufferManager (MTLContext &context)
 
MTLRenderPassStateget_render_pass_state ()
 
MTLComputeStateget_compute_state ()
 
void inc_active_command_buffer_count ()
 
void dec_active_command_buffer_count ()
 
int get_active_command_buffer_count ()
 
void wait_until_active_command_buffers_complete ()
 
Render Command Encoder Utility and management functions.
bool is_inside_render_pass ()
 
bool is_inside_blit ()
 
bool is_inside_compute ()
 
id< MTLRenderCommandEncoder > get_active_render_command_encoder ()
 
id< MTLBlitCommandEncoder > get_active_blit_command_encoder ()
 
id< MTLComputeCommandEncoder > get_active_compute_command_encoder ()
 
MTLFrameBufferget_active_framebuffer ()
 
bool end_active_command_encoder (bool retain_framebuffers=false)
 
id< MTLRenderCommandEncoder > ensure_begin_render_command_encoder (MTLFrameBuffer *ctx_framebuffer, bool force_begin, bool *r_new_pass)
 
id< MTLBlitCommandEncoder > ensure_begin_blit_encoder ()
 
id< MTLComputeCommandEncoder > ensure_begin_compute_encoder ()
 
Command buffer heuristics.
void register_draw_counters (int vertex_submission)
 
void reset_counters ()
 
bool do_break_submission ()
 

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 (eGPUBarrier barrier_bits, eGPUStageBarrierBits before_stages, eGPUStageBarrierBits 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 ()
 

Detailed Description

Definition at line 545 of file mtl_context.hh.

Constructor & Destructor Documentation

◆ MTLCommandBufferManager()

blender::gpu::MTLCommandBufferManager::MTLCommandBufferManager ( MTLContext & context)
inline

Definition at line 597 of file mtl_context.hh.

Member Function Documentation

◆ dec_active_command_buffer_count()

void blender::gpu::MTLCommandBufferManager::dec_active_command_buffer_count ( )
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(), and submit().

◆ do_break_submission()

bool blender::gpu::MTLCommandBufferManager::do_break_submission ( )

◆ encode_signal_event()

void blender::gpu::MTLCommandBufferManager::encode_signal_event ( id< MTLEvent > event,
uint64_t value )

◆ encode_wait_for_event()

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, end_active_command_encoder(), and value.

Referenced by blender::gpu::MTLFence::wait().

◆ end_active_command_encoder()

◆ ensure_begin_blit_encoder()

◆ ensure_begin_compute_encoder()

◆ ensure_begin_render_command_encoder()

◆ get_active_blit_command_encoder()

id< MTLBlitCommandEncoder > blender::gpu::MTLCommandBufferManager::get_active_blit_command_encoder ( )

Definition at line 209 of file mtl_command_buffer.mm.

◆ get_active_command_buffer_count()

int blender::gpu::MTLCommandBufferManager::get_active_command_buffer_count ( )
inline

Definition at line 668 of file mtl_context.hh.

Referenced by wait_until_active_command_buffers_complete().

◆ get_active_compute_command_encoder()

◆ get_active_framebuffer()

◆ get_active_render_command_encoder()

◆ get_compute_state()

◆ get_render_pass_state()

◆ inc_active_command_buffer_count()

void blender::gpu::MTLCommandBufferManager::inc_active_command_buffer_count ( )
inline

Definition at line 655 of file mtl_context.hh.

References num_active_cmd_bufs_in_system.

Referenced by blender::gpu::present().

◆ insert_memory_barrier()

◆ is_inside_blit()

bool blender::gpu::MTLCommandBufferManager::is_inside_blit ( )

Definition at line 193 of file mtl_command_buffer.mm.

◆ is_inside_compute()

bool blender::gpu::MTLCommandBufferManager::is_inside_compute ( )

Definition at line 198 of file mtl_command_buffer.mm.

Referenced by get_compute_state().

◆ is_inside_render_pass()

bool blender::gpu::MTLCommandBufferManager::is_inside_render_pass ( )

◆ pop_debug_group()

void blender::gpu::MTLCommandBufferManager::pop_debug_group ( )

◆ prepare()

void blender::gpu::MTLCommandBufferManager::prepare ( bool supports_render = true)

◆ push_debug_group()

void blender::gpu::MTLCommandBufferManager::push_debug_group ( const char * name,
int index )

◆ register_draw_counters()

void blender::gpu::MTLCommandBufferManager::register_draw_counters ( int vertex_submission)

Definition at line 462 of file mtl_command_buffer.mm.

Referenced by blender::gpu::MTLImmediate::end().

◆ reset_counters()

void blender::gpu::MTLCommandBufferManager::reset_counters ( )

Definition at line 470 of file mtl_command_buffer.mm.

◆ submit()

◆ wait_until_active_command_buffers_complete()

void blender::gpu::MTLCommandBufferManager::wait_until_active_command_buffers_complete ( )
inline

Definition at line 673 of file mtl_context.hh.

References get_active_command_buffer_count().

Referenced by submit(), and blender::gpu::MTLContext::~MTLContext().

Friends And Related Symbol Documentation

◆ MTLContext

friend class MTLContext
friend

Definition at line 546 of file mtl_context.hh.

Member Data Documentation

◆ num_active_cmd_bufs_in_system

volatile std::atomic< int > blender::gpu::MTLCommandBufferManager::num_active_cmd_bufs_in_system = 0
static

The documentation for this class was generated from the following files: