Blender V4.3
blender::gpu::MTLBatch Class Reference

#include <mtl_batch.hh>

Inherits Batch.

Public Member Functions

 MTLBatch ()
 
 ~MTLBatch ()
 
void multi_draw_indirect (GPUStorageBuf *, int, intptr_t, intptr_t) override
 
MTLIndexBufelem_ () const
 
MTLVertBufverts_ (const int index) const
 
MTLVertBufinst_ (const int index) const
 
MTLShaderactive_shader_get () const
 

Creation & Deletion

void draw (int v_first, int v_count, int i_first, int i_count) override
 
void draw_indirect (GPUStorageBuf *indirect_buf, intptr_t offset) override
 
id< MTLRenderCommandEncoder > bind (uint v_count)
 
void unbind (id< MTLRenderCommandEncoder > rec)
 

Detailed Description

Definition at line 34 of file mtl_batch.hh.

Constructor & Destructor Documentation

◆ MTLBatch()

blender::gpu::MTLBatch::MTLBatch ( )
inline

Definition at line 81 of file mtl_batch.hh.

◆ ~MTLBatch()

blender::gpu::MTLBatch::~MTLBatch ( )
inline

Definition at line 82 of file mtl_batch.hh.

Member Function Documentation

◆ active_shader_get()

MTLShader * blender::gpu::MTLBatch::active_shader_get ( ) const
inline

Definition at line 112 of file mtl_batch.hh.

◆ bind()

id< MTLRenderCommandEncoder > blender::gpu::MTLBatch::bind ( uint v_count)

Definition at line 411 of file mtl_batch.mm.

References blender::gpu::MTLVertBuf::bind(), blender::gpu::MTLRenderPassState::bind_vertex_buffer(), BLI_assert, BLI_assert_msg, buffers, blender::gpu::MTLRenderPassState::cached_vertex_buffer_bindings, blender::gpu::MTLContext::ensure_begin_render_pass(), blender::gpu::MTLContext::ensure_render_pipeline_state(), blender::gpu::MTLVertBuf::flag_used(), G, G_DEBUG_GPU, blender::gpu::MTLContext::get(), blender::gpu::MTLCommandBufferManager::get_active_framebuffer(), blender::gpu::MTLFrameBuffer::get_dirty(), blender::gpu::MTLIndexBuf::get_index_buffer(), blender::gpu::MTLShader::get_interface(), blender::gpu::MTLShaderInterface::get_name(), blender::gpu::MTLContext::get_null_buffer(), blender::gpu::MTLCommandBufferManager::get_render_pass_state(), blender::gpu::MTLShader::get_uses_ssbo_vertex_fetch(), GPU_BATCH_VBO_MAX_LEN, blender::gpu::GPU_INDEX_U16, blender::gpu::gpu_prim_type_to_metal(), GPU_shader_uniform_int_ex(), blender::gpu::IndexBuf::index_base_, blender::gpu::IndexBuf::index_type_, int, blender::gpu::MTLShader::is_valid(), blender::gpu::MTLContext::main_command_buffer, blender::gpu::BufferBindingCached::metal_buffer, MTL_LOG_ERROR, MTL_SSBO_VERTEX_FETCH_IBO_INDEX, MTL_SSBO_VERTEX_FETCH_MAX_VBOS, NULL, blender::gpu::Context::shader, blender::gpu::MTLShader::ssbo_vertex_fetch_bind_attributes_end(), blender::gpu::MTLShader::uni_ssbo_index_base_loc, blender::gpu::MTLShader::uni_ssbo_input_prim_type_loc, blender::gpu::MTLShader::uni_ssbo_input_vert_count_loc, blender::gpu::MTLShader::uni_ssbo_uses_index_mode_u16, blender::gpu::MTLShader::uni_ssbo_uses_indexed_rendering, blender::gpu::MTLShader::uniform_int(), blender::gpu::MTLIndexBuf::upload_data(), and blender::gpu::wrap().

Referenced by blender::gpu::MTLDrawList::submit().

◆ draw()

void blender::gpu::MTLBatch::draw ( int v_first,
int v_count,
int i_first,
int i_count )
override

Definition at line 35 of file mtl_batch.mm.

References flag, and GPU_BATCH_INVALID.

◆ draw_indirect()

void blender::gpu::MTLBatch::draw_indirect ( GPUStorageBuf * indirect_buf,
intptr_t offset )
override

Definition at line 43 of file mtl_batch.mm.

References flag, and GPU_BATCH_INVALID.

◆ elem_()

MTLIndexBuf * blender::gpu::MTLBatch::elem_ ( ) const
inline

Definition at line 100 of file mtl_batch.hh.

Referenced by blender::gpu::MTLDrawList::append().

◆ inst_()

MTLVertBuf * blender::gpu::MTLBatch::inst_ ( const int index) const
inline

Definition at line 108 of file mtl_batch.hh.

◆ multi_draw_indirect()

void blender::gpu::MTLBatch::multi_draw_indirect ( GPUStorageBuf * ,
int ,
intptr_t ,
intptr_t  )
inlineoverride

Definition at line 86 of file mtl_batch.hh.

◆ unbind()

void blender::gpu::MTLBatch::unbind ( id< MTLRenderCommandEncoder > rec)

Definition at line 596 of file mtl_batch.mm.

References G, and G_DEBUG_GPU.

Referenced by blender::gpu::MTLDrawList::submit().

◆ verts_()

MTLVertBuf * blender::gpu::MTLBatch::verts_ ( const int index) const
inline

Definition at line 104 of file mtl_batch.hh.

References verts.

Referenced by blender::gpu::MTLDrawList::append().


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