Blender V5.0
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.

Namespaces

namespace  blender
namespace  blender::gpu

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)
void blender::gpu::debug_validate_binding_image_format ()

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::SetUpTestSuite().

◆ 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, blender::gpu::Context::get(), and name.

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(), len, and name.

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

◆ GPU_debug_group_begin()

void GPU_debug_group_begin ( const char * name)

Definition at line 22 of file gpu_debug.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::gpu::Context::debug_group_begin(), blender::gpu::Context::debug_stack, G, G_DEBUG_GPU, blender::gpu::Context::get(), name, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().

Referenced by blender::gpu::ShaderCompiler::compile(), blender::draw::View::compute_procedural_bounds(), blender::draw::View::compute_visibility(), blender::draw::DebugDraw::display_to_view(), blender::draw::overlay::MeshUVs::draw(), blender::workbench::DofPass::draw(), blender::draw::overlay::Meshes::draw_color_only(), blender::draw::overlay::Meshes::draw_line(), blender::draw::overlay::Outline::draw_line_only_ex(), blender::eevee::VolumeModule::draw_prepass(), DRW_draw_region_info(), blender::draw::Manager::end_sync(), blender::eevee::MaterialModule::end_sync(), DRWContext::engines_draw_scene(), blender::compositor::NodeOperation::evaluate(), blender::compositor::ShaderOperation::execute(), blender::draw::command::DrawMultiBuf::generate_commands(), gpu_select_pick_begin(), gpu_select_query_begin(), blender::eevee::DeferredPipeline::render(), blender::eevee::DeferredProbePipeline::render(), blender::eevee::DepthOfField::render(), blender::eevee::ForwardPipeline::render(), blender::eevee::LookdevView::render(), blender::eevee::MotionBlurModule::render(), blender::eevee::PlanarProbePipeline::render(), blender::eevee::RayTraceModule::render(), blender::eevee::ShadingView::render(), blender::eevee::CaptureView::render_probes(), blender::eevee::CaptureView::render_world(), blender::ed::vse::sequencer_draw_scopes(), blender::eevee::ShadowModule::set_view(), blender::gpu::GPUTest::SetUp(), blender::draw::detail::PassBase< DrawCommandBufType >::submit(), blender::eevee::IrradianceBake::surfels_create(), blender::draw::detail::PassBase< DrawCommandBufType >::warm_shader_specialization(), wm_draw_area_offscreen(), wm_draw_window_offscreen(), and wm_draw_window_onscreen().

◆ GPU_debug_group_end()

void GPU_debug_group_end ( )

Definition at line 33 of file gpu_debug.cc.

References blender::gpu::Context::debug_group_end(), blender::gpu::Context::debug_stack, G, G_DEBUG_GPU, blender::gpu::Context::get(), and blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last().

Referenced by blender::gpu::ShaderCompiler::compile(), blender::draw::View::compute_procedural_bounds(), blender::draw::View::compute_visibility(), blender::draw::DebugDraw::display_to_view(), blender::draw::overlay::MeshUVs::draw(), blender::workbench::DofPass::draw(), blender::draw::overlay::Meshes::draw_color_only(), blender::draw::overlay::Meshes::draw_line(), blender::draw::overlay::Outline::draw_line_only_ex(), blender::eevee::VolumeModule::draw_prepass(), DRW_draw_region_info(), blender::draw::Manager::end_sync(), DRWContext::engines_draw_scene(), blender::compositor::NodeOperation::evaluate(), blender::compositor::ShaderOperation::execute(), blender::draw::command::DrawMultiBuf::generate_commands(), gpu_select_pick_end(), gpu_select_query_end(), blender::eevee::DeferredPipeline::render(), blender::eevee::DeferredProbePipeline::render(), blender::eevee::DepthOfField::render(), blender::eevee::ForwardPipeline::render(), blender::eevee::LookdevView::render(), blender::eevee::MotionBlurModule::render(), blender::eevee::PlanarProbePipeline::render(), blender::eevee::RayTraceModule::render(), blender::eevee::ShadingView::render(), blender::eevee::CaptureView::render_probes(), blender::eevee::CaptureView::render_world(), blender::ed::vse::sequencer_draw_scopes(), blender::eevee::ShadowModule::set_view(), blender::draw::detail::PassBase< DrawCommandBufType >::submit(), blender::eevee::IrradianceBake::surfels_create(), blender::gpu::GPUTest::TearDown(), blender::draw::detail::PassBase< DrawCommandBufType >::warm_shader_specialization(), wm_draw_area_offscreen(), wm_draw_window_offscreen(), and wm_draw_window_onscreen().

◆ 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, blender::gpu::Context::get(), and name.

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