diff options
Diffstat (limited to 'source/blender/gpu/metal/mtl_debug.mm')
-rw-r--r-- | source/blender/gpu/metal/mtl_debug.mm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/gpu/metal/mtl_debug.mm b/source/blender/gpu/metal/mtl_debug.mm index 9d67a1f4f04..8ca4a0cc6e3 100644 --- a/source/blender/gpu/metal/mtl_debug.mm +++ b/source/blender/gpu/metal/mtl_debug.mm @@ -46,20 +46,14 @@ namespace blender::gpu { void MTLContext::debug_group_begin(const char *name, int index) { if (G.debug & G_DEBUG_GPU) { - id<MTLCommandBuffer> cmd = this->get_active_command_buffer(); - if (cmd != nil) { - [cmd pushDebugGroup:[NSString stringWithFormat:@"%s_%d", name, index]]; - } + this->main_command_buffer.push_debug_group(name, index); } } void MTLContext::debug_group_end() { if (G.debug & G_DEBUG_GPU) { - id<MTLCommandBuffer> cmd = this->get_active_command_buffer(); - if (cmd != nil) { - [cmd popDebugGroup]; - } + this->main_command_buffer.pop_debug_group(); } } |