Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_backend.mm
| Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | |||||
| void MTLBackend::render_step() | void MTLBackend::render_step() | ||||
| { | { | ||||
| /* NOTE(Metal): Primarily called from main thread, but below data-structures | /* NOTE(Metal): Primarily called from main thread, but below data-structures | ||||
| * and operations are thread-safe, and GPUContext rendering coordination | * and operations are thread-safe, and GPUContext rendering coordination | ||||
| * is also thread-safe. */ | * is also thread-safe. */ | ||||
| /* Flush any MTLSafeFreeLists which have previously been released by any MTLContext. */ | /* Flush any MTLSafeFreeLists which have previously been released by any MTLContext. */ | ||||
| MTLContext::get_global_memory_manager().update_memory_pools(); | MTLContext::get_global_memory_manager()->update_memory_pools(); | ||||
| /* End existing MTLSafeFreeList and begin new list -- | /* End existing MTLSafeFreeList and begin new list -- | ||||
| * Buffers wont `free` until all associated in-flight command buffers have completed. | * Buffers wont `free` until all associated in-flight command buffers have completed. | ||||
| * Decrement final reference count for ensuring the previous list is certainly | * Decrement final reference count for ensuring the previous list is certainly | ||||
| * released. */ | * released. */ | ||||
| MTLSafeFreeList *cmd_free_buffer_list = | MTLSafeFreeList *cmd_free_buffer_list = | ||||
| MTLContext::get_global_memory_manager().get_current_safe_list(); | MTLContext::get_global_memory_manager()->get_current_safe_list(); | ||||
| MTLContext::get_global_memory_manager().begin_new_safe_list(); | MTLContext::get_global_memory_manager()->begin_new_safe_list(); | ||||
| cmd_free_buffer_list->decrement_reference(); | cmd_free_buffer_list->decrement_reference(); | ||||
| } | } | ||||
| bool MTLBackend::is_inside_render_boundary() | bool MTLBackend::is_inside_render_boundary() | ||||
| { | { | ||||
| return (g_autoreleasepool != nil); | return (g_autoreleasepool != nil); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines | |||||