Blender V5.0
blender::gpu::MTLBackend Class Reference

#include <mtl_backend.hh>

Inherits blender::gpu::GPUBackend.

Public Member Functions

 ~MTLBackend () override
void shader_cache_dir_clear_old () override
Metal Backend
void init_resources () override
void delete_resources () override
void samplers_update () override
Contextcontext_alloc (void *ghost_window, void *ghost_context) override
Batch * batch_alloc () override
Fencefence_alloc () override
FrameBufferframebuffer_alloc (const char *name) override
IndexBufindexbuf_alloc () override
PixelBufferpixelbuf_alloc (size_t size) override
QueryPoolquerypool_alloc () override
Shadershader_alloc (const char *name) override
Texturetexture_alloc (const char *name) override
UniformBufuniformbuf_alloc (size_t size, const char *name) override
StorageBufstoragebuf_alloc (size_t size, GPUUsageType usage, const char *name) override
VertBufvertbuf_alloc () override
void render_begin () override
void render_end () override
void render_step (bool force_resource_release=false) override
bool is_inside_render_boundary ()
Compute dispatch.
void compute_dispatch (int groups_x_len, int groups_y_len, int groups_z_len) override
void compute_dispatch_indirect (StorageBuf *indirect_buf) override
Public Member Functions inherited from blender::gpu::GPUBackend
virtual ~GPUBackend ()=default
ShaderCompilerget_compiler ()

Static Public Member Functions

static MTLCapabilitiesget_capabilities ()
static MTLBackendget ()
Static Public Member Functions inherited from blender::gpu::GPUBackend
static GPUBackendget ()

Friends

class MTLContext

Capabilities

static MTLCapabilities capabilities = {}
static bool metal_is_supported ()

Additional Inherited Members

Protected Attributes inherited from blender::gpu::GPUBackend
ShaderCompilercompiler_

Detailed Description

Definition at line 27 of file mtl_backend.hh.

Constructor & Destructor Documentation

◆ ~MTLBackend()

blender::gpu::MTLBackend::~MTLBackend ( )
inlineoverride

Definition at line 39 of file mtl_backend.hh.

Member Function Documentation

◆ batch_alloc()

Batch * blender::gpu::MTLBackend::batch_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 65 of file mtl_backend.mm.

◆ compute_dispatch()

void blender::gpu::MTLBackend::compute_dispatch ( int groups_x_len,
int groups_y_len,
int groups_z_len )
overridevirtual

◆ compute_dispatch_indirect()

void blender::gpu::MTLBackend::compute_dispatch_indirect ( StorageBuf * indirect_buf)
overridevirtual

◆ context_alloc()

Context * blender::gpu::MTLBackend::context_alloc ( void * ghost_window,
void * ghost_context )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 60 of file mtl_backend.mm.

References MTLContext.

◆ delete_resources()

void blender::gpu::MTLBackend::delete_resources ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 51 of file mtl_backend.mm.

References blender::gpu::GPUBackend::compiler_.

◆ fence_alloc()

Fence * blender::gpu::MTLBackend::fence_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 70 of file mtl_backend.mm.

◆ framebuffer_alloc()

FrameBuffer * blender::gpu::MTLBackend::framebuffer_alloc ( const char * name)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 75 of file mtl_backend.mm.

References blender::gpu::MTLContext::get(), and name.

◆ get()

◆ get_capabilities()

◆ indexbuf_alloc()

IndexBuf * blender::gpu::MTLBackend::indexbuf_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 80 of file mtl_backend.mm.

◆ init_resources()

void blender::gpu::MTLBackend::init_resources ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 46 of file mtl_backend.mm.

References blender::gpu::GPUBackend::compiler_.

◆ is_inside_render_boundary()

bool blender::gpu::MTLBackend::is_inside_render_boundary ( )

Definition at line 173 of file mtl_backend.mm.

References blender::gpu::g_autoreleasepool.

◆ metal_is_supported()

bool blender::gpu::MTLBackend::metal_is_supported ( )
static

◆ pixelbuf_alloc()

PixelBuffer * blender::gpu::MTLBackend::pixelbuf_alloc ( size_t size)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 85 of file mtl_backend.mm.

References size().

◆ querypool_alloc()

QueryPool * blender::gpu::MTLBackend::querypool_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 90 of file mtl_backend.mm.

◆ render_begin()

void blender::gpu::MTLBackend::render_begin ( )
overridevirtual

◆ render_end()

void blender::gpu::MTLBackend::render_end ( )
overridevirtual

◆ render_step()

◆ samplers_update()

void blender::gpu::MTLBackend::samplers_update ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 56 of file mtl_backend.mm.

◆ shader_alloc()

Shader * blender::gpu::MTLBackend::shader_alloc ( const char * name)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 95 of file mtl_backend.mm.

References blender::gpu::MTLContext::get(), and name.

◆ shader_cache_dir_clear_old()

void blender::gpu::MTLBackend::shader_cache_dir_clear_old ( )
inlineoverridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 72 of file mtl_backend.hh.

◆ storagebuf_alloc()

StorageBuf * blender::gpu::MTLBackend::storagebuf_alloc ( size_t size,
GPUUsageType usage,
const char * name )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 110 of file mtl_backend.mm.

References name, and size().

◆ texture_alloc()

Texture * blender::gpu::MTLBackend::texture_alloc ( const char * name)
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 100 of file mtl_backend.mm.

References name.

◆ uniformbuf_alloc()

UniformBuf * blender::gpu::MTLBackend::uniformbuf_alloc ( size_t size,
const char * name )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 105 of file mtl_backend.mm.

References name, and size().

◆ vertbuf_alloc()

VertBuf * blender::gpu::MTLBackend::vertbuf_alloc ( )
overridevirtual

Implements blender::gpu::GPUBackend.

Definition at line 115 of file mtl_backend.mm.

◆ MTLContext

friend class MTLContext
friend

Definition at line 28 of file mtl_backend.hh.

References MTLContext.

Referenced by compute_dispatch(), compute_dispatch_indirect(), context_alloc(), and MTLContext.

Member Data Documentation

◆ capabilities


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