Blender V4.3
gpu_debug.cc File Reference
#include "BKE_global.hh"
#include "BLI_string.h"
#include "gpu_context_private.hh"
#include "GPU_debug.hh"

Go to the source code of this file.

Functions

void GPU_debug_group_begin (const char *name)
 
void GPU_debug_group_end ()
 
void GPU_debug_get_groups_names (int name_buf_len, char *r_name_buf)
 
bool GPU_debug_group_match (const char *ref)
 
void GPU_debug_capture_begin (const char *title)
 
void GPU_debug_capture_end ()
 
void * GPU_debug_capture_scope_create (const char *name)
 
bool GPU_debug_capture_scope_begin (void *scope)
 
void GPU_debug_capture_scope_end (void *scope)
 

Detailed Description

Debug features of OpenGL.

Definition in file gpu_debug.cc.

Function Documentation

◆ GPU_debug_capture_begin()

void GPU_debug_capture_begin ( const char * title)

GPU Frame capture support.

Allows instantaneous frame capture of GPU calls between begin/end.

Parameters
titleOptional title to set for the frame capture.

Definition at line 78 of file gpu_debug.cc.

References blender::gpu::Context::debug_capture_begin(), blender::gpu::Context::debug_is_capturing, G, G_DEBUG_GPU, blender::gpu::Context::get(), and GPU_finish().

Referenced by blender::ed::greasepencil::image_render::image_render_begin(), and blender::gpu::GPUTest::SetUp().

◆ GPU_debug_capture_end()

◆ GPU_debug_capture_scope_begin()

bool GPU_debug_capture_scope_begin ( void * scope)

Used to declare the region within which GPU calls are captured when the scope is triggered.

Parameters
scopePointer to capture scope object created with GPU_debug_capture_scope_create.
Returns
True if the capture tool is actively capturing this scope when function is executed. Otherwise, False.

Definition at line 123 of file gpu_debug.cc.

References blender::gpu::Context::debug_capture_scope_begin(), blender::gpu::Context::debug_is_capturing, G, G_DEBUG_GPU, blender::gpu::Context::get(), and GPU_finish().

Referenced by blender::gpu::DebugScope::begin_capture(), and blender::gpu::DebugScope::ScopedCapture::ScopedCapture().

◆ GPU_debug_capture_scope_create()

void * GPU_debug_capture_scope_create ( const char * name)

GPU debug frame capture scopes.

Allows creation of a GPU frame capture scope that define a region within which an external GPU Frame capture tool can perform a deferred capture of GPU API calls within the boundary upon user request.

Parameters
nameUnique name of capture scope displayed within capture tool.
Returns
pointer wrapping an API-specific capture scope object.
Note
a capture scope should be created a single time and only used within one begin/end pair.

Definition at line 109 of file gpu_debug.cc.

References blender::gpu::Context::debug_capture_scope_create(), G, G_DEBUG_GPU, and blender::gpu::Context::get().

Referenced by blender::gpu::DebugScope::DebugScope().

◆ GPU_debug_capture_scope_end()

◆ GPU_debug_get_groups_names()

void GPU_debug_get_groups_names ( int name_buf_len,
char * r_name_buf )

Return a formatted string showing the current group hierarchy in this format: "Group1 > Group 2 > Group3 > ... > GroupN : "

Definition at line 43 of file gpu_debug.cc.

References BLI_snprintf_rlen(), blender::gpu::Context::debug_stack, blender::gpu::Context::get(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), and len.

Referenced by blender::gpu::debug::debug_callback().

◆ GPU_debug_group_begin()

◆ GPU_debug_group_end()

◆ GPU_debug_group_match()

bool GPU_debug_group_match ( const char * ref)

Return true if inside a debug group with the same name.

Definition at line 61 of file gpu_debug.cc.

References BLI_assert, blender::gpu::Context::debug_stack, G, G_DEBUG_GPU, and blender::gpu::Context::get().

Referenced by blender::gpu::debug::debug_callback().