Blender
V3.3
|
#include "BLI_listbase.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BKE_global.h"
#include "BLF_api.h"
#include "MEM_guardedalloc.h"
#include "draw_manager.h"
#include "GPU_debug.h"
#include "GPU_texture.h"
#include "UI_resources.h"
#include "draw_manager_profiling.h"
Go to the source code of this file.
Classes | |
struct | DRWTimer |
struct | DRWTimerPool |
Macros | |
#define | MAX_TIMER_NAME 32 |
#define | MAX_NESTED_TIMER 8 |
#define | MIM_RANGE_LEN 8 |
#define | GPU_TIMER_FALLOFF 0.1 |
Typedefs | |
typedef struct DRWTimer | DRWTimer |
Functions | |
void | DRW_stats_free (void) |
void | DRW_stats_begin (void) |
static DRWTimer * | drw_stats_timer_get (void) |
static void | drw_stats_timer_start_ex (const char *name, const bool is_query) |
void | DRW_stats_group_start (const char *name) |
void | DRW_stats_group_end (void) |
void | DRW_stats_query_start (const char *name) |
void | DRW_stats_query_end (void) |
void | DRW_stats_reset (void) |
static void | draw_stat_5row (const rcti *rect, int u, int v, const char *txt, const int size) |
static void | draw_stat (const rcti *rect, int u, int v, const char *txt, const int size) |
void | DRW_stats_draw (const rcti *rect) |
Variables | |
static struct DRWTimerPool | DTP = {NULL} |
#define GPU_TIMER_FALLOFF 0.1 |
Definition at line 30 of file draw_manager_profiling.c.
#define MAX_NESTED_TIMER 8 |
Definition at line 28 of file draw_manager_profiling.c.
#define MAX_TIMER_NAME 32 |
Definition at line 27 of file draw_manager_profiling.c.
#define MIM_RANGE_LEN 8 |
Definition at line 29 of file draw_manager_profiling.c.
Definition at line 201 of file draw_manager_profiling.c.
References BLF_draw_default(), size(), v, rcti::xmin, and rcti::ymax.
Referenced by DRW_stats_draw().
|
static |
Definition at line 192 of file draw_manager_profiling.c.
References BLF_draw_default(), size(), v, rcti::xmin, and rcti::ymax.
Referenced by DRW_stats_draw().
Definition at line 62 of file draw_manager_profiling.c.
References DRWTimerPool::chunk_count, DRW_stats_free(), DTP, DRWTimerPool::end_increment, G, DRWTimerPool::is_querying, DRWTimerPool::is_recording, MEM_callocN, MIM_RANGE_LEN, NULL, DRWTimerPool::timer_count, DRWTimerPool::timer_increment, and DRWTimerPool::timers.
Referenced by DRW_draw_render_loop_2d_ex(), and DRW_draw_render_loop_ex().
Definition at line 207 of file draw_manager_profiling.c.
References BLF_batch_draw_begin(), BLF_batch_draw_end(), BLF_default(), BLF_disable(), BLF_enable(), BLF_shadow(), BLF_SHADOW, BLF_shadow_offset(), BLI_assert, BLI_snprintf(), BLI_strncpy(), data, double(), draw_stat(), draw_stat_5row(), DRW_ENABLED_ENGINE_ITER, DRW_view_data_cache_time_get(), DST, DTP, G, GPU_texture_memory_usage_get(), GPU_vertbuf_get_memory_usage(), if(), DRWTimer::lvl, MAX_NESTED_TIMER, MIN2, DRWTimer::name, NULL, TH_TEXT_HI, DRWTimer::time_average, DRWTimerPool::timer_increment, DRWTimerPool::timers, UI_FontThemeColor(), v, and DRWManager::view_data_active.
Referenced by DRW_draw_callbacks_post_scene(), and DRW_draw_render_loop_2d_ex().
Definition at line 50 of file draw_manager_profiling.c.
References DTP, MEM_freeN, NULL, and DRWTimerPool::timers.
Referenced by DRW_engines_free(), and DRW_stats_begin().
Definition at line 124 of file draw_manager_profiling.c.
References BLI_assert, DTP, DRWTimerPool::end_increment, GPU_debug_group_end(), DRWTimerPool::is_querying, and DRWTimerPool::is_recording.
Referenced by drw_engines_draw_scene(), EEVEE_create_minmax_buffer(), EEVEE_depth_of_field_draw(), EEVEE_downsample_cube_buffer(), eevee_draw_scene(), EEVEE_effects_downsample_radiance_buffer(), EEVEE_lightbake_filter_planar(), EEVEE_lookdev_draw(), EEVEE_occlusion_compute(), EEVEE_occlusion_draw_debug(), EEVEE_reflection_compute(), EEVEE_shadows_draw(), EEVEE_subsurface_compute(), EEVEE_volumes_compute(), gpencil_draw_mask(), GPENCIL_draw_object(), lightbake_render_scene_reflected(), OVERLAY_outline_draw(), blender::eevee::ShadingView::render(), blender::eevee::ForwardPipeline::render(), and workbench_dof_draw_pass().
void DRW_stats_group_start | ( | const char * | name | ) |
Use this to group the queries. It does NOT keep track of the time, it only sum what the queries inside it.
Definition at line 117 of file draw_manager_profiling.c.
References drw_stats_timer_start_ex(), and GPU_debug_group_begin().
Referenced by drw_engines_draw_scene(), EEVEE_create_minmax_buffer(), EEVEE_depth_of_field_draw(), EEVEE_downsample_cube_buffer(), eevee_draw_scene(), EEVEE_effects_downsample_radiance_buffer(), EEVEE_lightbake_filter_planar(), EEVEE_lookdev_draw(), EEVEE_occlusion_compute(), EEVEE_occlusion_draw_debug(), EEVEE_reflection_compute(), EEVEE_shadows_draw(), EEVEE_subsurface_compute(), EEVEE_volumes_compute(), gpencil_draw_mask(), GPENCIL_draw_object(), lightbake_render_scene_reflected(), OVERLAY_outline_draw(), blender::eevee::ShadingView::render(), blender::eevee::ForwardPipeline::render(), and workbench_dof_draw_pass().
Definition at line 139 of file draw_manager_profiling.c.
References BLI_assert, DTP, DRWTimerPool::end_increment, GPU_debug_group_end(), DRWTimerPool::is_querying, and DRWTimerPool::is_recording.
Referenced by drw_draw_pass_ex().
void DRW_stats_query_start | ( | const char * | name | ) |
Definition at line 133 of file draw_manager_profiling.c.
References drw_stats_timer_start_ex(), and GPU_debug_group_begin().
Referenced by drw_draw_pass_ex().
Definition at line 150 of file draw_manager_profiling.c.
References BLI_assert, DTP, DRWTimerPool::end_increment, GPU_TIMER_FALLOFF, DRWTimer::is_query, DRWTimerPool::is_recording, DRWTimer::lvl, MAX_NESTED_TIMER, MIN2, DRWTimer::query, SWAP, time, DRWTimer::time_average, DRWTimerPool::timer_increment, and DRWTimerPool::timers.
Referenced by DRW_draw_render_loop_2d_ex(), and DRW_draw_render_loop_ex().
Definition at line 82 of file draw_manager_profiling.c.
References DRWTimerPool::chunk_count, DTP, MEM_recallocN, MIM_RANGE_LEN, DRWTimerPool::timer_count, DRWTimerPool::timer_increment, DRWTimerPool::timers, and UNLIKELY.
Referenced by drw_stats_timer_start_ex().
Definition at line 94 of file draw_manager_profiling.c.
References BLI_assert, BLI_strncpy(), drw_stats_timer_get(), DTP, DRWTimerPool::end_increment, DRWTimer::is_query, DRWTimerPool::is_querying, DRWTimerPool::is_recording, DRWTimer::lvl, MAX_TIMER_NAME, DRWTimer::name, DRWTimer::query, and DRWTimerPool::timer_increment.
Referenced by DRW_stats_group_start(), and DRW_stats_query_start().
|
static |