Blender  V3.3
mtl_debug.mm
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
9 #include "BLI_compiler_attrs.h"
10 #include "BLI_string.h"
11 #include "BLI_system.h"
12 #include "BLI_utildefines.h"
13 
14 #include "BKE_global.h"
15 
16 #include "GPU_debug.h"
17 #include "GPU_platform.h"
18 
19 #include "mtl_context.hh"
20 #include "mtl_debug.hh"
21 
22 #include "CLG_log.h"
23 
24 #include <utility>
25 
26 namespace blender::gpu::debug {
27 
28 CLG_LogRef LOG = {"gpu.debug.metal"};
29 
31 {
32  CLOG_ENSURE(&LOG);
33 }
34 
35 } // namespace blender::gpu::debug
36 
37 namespace blender::gpu {
38 
39 /* -------------------------------------------------------------------- */
46 void MTLContext::debug_group_begin(const char *name, int index)
47 {
48  if (G.debug & G_DEBUG_GPU) {
49  this->main_command_buffer.push_debug_group(name, index);
50  }
51 }
52 
54 {
55  if (G.debug & G_DEBUG_GPU) {
57  }
58 }
59 
62 } // namespace blender::gpu
@ G_DEBUG_GPU
Definition: BKE_global.h:193
#define CLOG_ENSURE(clg_ref)
Definition: CLG_log.h:148
void push_debug_group(const char *name, int index)
void debug_group_begin(const char *name, int index) override
Definition: mtl_debug.mm:46
MTLCommandBufferManager main_command_buffer
Definition: mtl_context.hh:611
void debug_group_end() override
Definition: mtl_debug.mm:53
#define G(x, y, z)
CLG_LogRef LOG
Definition: mtl_debug.mm:28