Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_backend.mm
| Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | Batch *MTLBackend::batch_alloc() | ||||
| return new MTLBatch(); | return new MTLBatch(); | ||||
| }; | }; | ||||
| DrawList *MTLBackend::drawlist_alloc(int list_length) | DrawList *MTLBackend::drawlist_alloc(int list_length) | ||||
| { | { | ||||
| return new MTLDrawList(list_length); | return new MTLDrawList(list_length); | ||||
| }; | }; | ||||
| Fence *MTLBackend::fence_alloc() | |||||
| { | |||||
| return new MTLFence(); | |||||
| }; | |||||
| FrameBuffer *MTLBackend::framebuffer_alloc(const char *name) | FrameBuffer *MTLBackend::framebuffer_alloc(const char *name) | ||||
| { | { | ||||
| MTLContext *mtl_context = static_cast<MTLContext *>( | MTLContext *mtl_context = static_cast<MTLContext *>( | ||||
| reinterpret_cast<Context *>(GPU_context_active_get())); | reinterpret_cast<Context *>(GPU_context_active_get())); | ||||
| return new MTLFrameBuffer(mtl_context, name); | return new MTLFrameBuffer(mtl_context, name); | ||||
| }; | }; | ||||
| IndexBuf *MTLBackend::indexbuf_alloc() | IndexBuf *MTLBackend::indexbuf_alloc() | ||||
| { | { | ||||
| return new MTLIndexBuf(); | return new MTLIndexBuf(); | ||||
| }; | }; | ||||
| PixelBuffer *MTLBackend::pixelbuf_alloc(uint size) | |||||
| { | |||||
| return new MTLPixelBuffer(size); | |||||
| }; | |||||
| QueryPool *MTLBackend::querypool_alloc() | QueryPool *MTLBackend::querypool_alloc() | ||||
| { | { | ||||
| return new MTLQueryPool(); | return new MTLQueryPool(); | ||||
| }; | }; | ||||
| Shader *MTLBackend::shader_alloc(const char *name) | Shader *MTLBackend::shader_alloc(const char *name) | ||||
| { | { | ||||
| MTLContext *mtl_context = MTLContext::get(); | MTLContext *mtl_context = MTLContext::get(); | ||||
| ▲ Show 20 Lines • Show All 354 Lines • Show Last 20 Lines | |||||