mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
Rename function to performance_counter_init
This commit is contained in:
parent
f5bc75c640
commit
281a33d61f
@ -536,7 +536,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
if (!audio_driver_data.data)
|
||||
return false;
|
||||
|
||||
rarch_perf_init(&audio_convert_s16, "audio_convert_s16");
|
||||
performance_counter_init(&audio_convert_s16, "audio_convert_s16");
|
||||
performance_counter_start(&audio_convert_s16);
|
||||
audio_convert_s16_to_float(audio_driver_data.data, data, samples,
|
||||
audio_driver_data.volume_gain);
|
||||
@ -550,7 +550,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
|
||||
if (audio_driver_data.dsp)
|
||||
{
|
||||
rarch_perf_init(&audio_dsp, "audio_dsp");
|
||||
performance_counter_init(&audio_dsp, "audio_dsp");
|
||||
performance_counter_start(&audio_dsp);
|
||||
rarch_dsp_filter_process(audio_driver_data.dsp, &dsp_data);
|
||||
performance_counter_stop(&audio_dsp);
|
||||
@ -579,7 +579,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
|
||||
if (!audio_driver_data.use_float)
|
||||
{
|
||||
rarch_perf_init(&audio_convert_float, "audio_convert_float");
|
||||
performance_counter_init(&audio_convert_float, "audio_convert_float");
|
||||
performance_counter_start(&audio_convert_float);
|
||||
audio_convert_float_to_s16(audio_driver_data.output_samples.conv_buf,
|
||||
(const float*)output_data, output_frames * 2);
|
||||
@ -836,7 +836,7 @@ bool audio_driver_init_resampler(void)
|
||||
|
||||
void audio_driver_process_resampler(struct resampler_data *data)
|
||||
{
|
||||
rarch_perf_init(&resampler_proc, "resampler_proc");
|
||||
performance_counter_init(&resampler_proc, "resampler_proc");
|
||||
performance_counter_start(&resampler_proc);
|
||||
rarch_resampler_process(audio_driver_resampler,
|
||||
audio_driver_resampler_data, data);
|
||||
|
@ -169,7 +169,7 @@ static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size)
|
||||
(void)samples_played;
|
||||
(void)current_tick;
|
||||
|
||||
rarch_perf_init(&ctraudio_f, "ctraudio_f");
|
||||
performance_counter_init(&ctraudio_f, "ctraudio_f");
|
||||
performance_counter_start(&ctraudio_f);
|
||||
|
||||
ctr_csnd_audio_update_playpos(ctr);
|
||||
|
@ -116,7 +116,7 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size)
|
||||
}
|
||||
}
|
||||
|
||||
rarch_perf_init(&ctraudio_dsp_f, "ctraudio_dsp_f");
|
||||
performance_counter_init(&ctraudio_dsp_f, "ctraudio_dsp_f");
|
||||
performance_counter_start(&ctraudio_dsp_f);
|
||||
|
||||
pos = ctr->pos << 2;
|
||||
|
@ -70,7 +70,7 @@ static void process_image(video4linux_t *v4l, const uint8_t *buffer_yuv)
|
||||
{
|
||||
static struct retro_perf_counter yuv_convert_direct = {0};
|
||||
|
||||
rarch_perf_init(&yuv_convert_direct, "yuv_convert_direct");
|
||||
performance_counter_init(&yuv_convert_direct, "yuv_convert_direct");
|
||||
performance_counter_start(&yuv_convert_direct);
|
||||
scaler_ctx_scale(&v4l->scaler, v4l->buffer_output, buffer_yuv);
|
||||
performance_counter_stop(&yuv_convert_direct);
|
||||
|
@ -1447,7 +1447,7 @@ static bool d3d_frame(void *data, const void *frame,
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
rarch_perf_init(&d3d_frame, "d3d_frame");
|
||||
performance_counter_init(&d3d_frame, "d3d_frame");
|
||||
performance_counter_start(&d3d_frame);
|
||||
|
||||
/* We cannot recover in fullscreen. */
|
||||
|
@ -1504,7 +1504,7 @@ static bool cg_d3d9_renderchain_read_viewport(void *data, uint8_t *buffer)
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
rarch_perf_init(&d3d_read_viewport, "d3d_read_viewport");
|
||||
performance_counter_init(&d3d_read_viewport, "d3d_read_viewport");
|
||||
performance_counter_start(&d3d_read_viewport);
|
||||
|
||||
(void)data;
|
||||
|
@ -619,7 +619,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
#endif
|
||||
fflush(stdout);
|
||||
|
||||
rarch_perf_init(&ctrframe_f, "ctrframe_f");
|
||||
performance_counter_init(&ctrframe_f, "ctrframe_f");
|
||||
performance_counter_start(&ctrframe_f);
|
||||
|
||||
if (ctr->should_resize)
|
||||
|
@ -1469,7 +1469,7 @@ static INLINE void gl_copy_frame(gl_t *gl, const void *frame,
|
||||
{
|
||||
static struct retro_perf_counter copy_frame = {0};
|
||||
|
||||
rarch_perf_init(©_frame, "copy_frame");
|
||||
performance_counter_init(©_frame, "copy_frame");
|
||||
performance_counter_start(©_frame);
|
||||
|
||||
#if defined(HAVE_OPENGLES2)
|
||||
@ -1660,7 +1660,7 @@ static void gl_pbo_async_readback(gl_t *gl)
|
||||
video_pixel_get_alignment(gl->vp.width * sizeof(uint32_t)));
|
||||
|
||||
/* Read asynchronously into PBO buffer. */
|
||||
rarch_perf_init(&async_readback, "async_readback");
|
||||
performance_counter_init(&async_readback, "async_readback");
|
||||
performance_counter_start(&async_readback);
|
||||
glReadBuffer(GL_BACK);
|
||||
#ifdef HAVE_OPENGLES3
|
||||
@ -1770,7 +1770,7 @@ static bool gl_frame(void *data, const void *frame,
|
||||
gl_t *gl = (gl_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
rarch_perf_init(&frame_run, "frame_run");
|
||||
performance_counter_init(&frame_run, "frame_run");
|
||||
performance_counter_start(&frame_run);
|
||||
|
||||
if (!gl)
|
||||
@ -2022,7 +2022,7 @@ static bool gl_frame(void *data, const void *frame,
|
||||
{
|
||||
static struct retro_perf_counter gl_fence = {0};
|
||||
|
||||
rarch_perf_init(&gl_fence, "gl_fence");
|
||||
performance_counter_init(&gl_fence, "gl_fence");
|
||||
performance_counter_start(&gl_fence);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
gl->fences[gl->fence_count++] =
|
||||
@ -3137,7 +3137,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
|
||||
|
||||
context_bind_hw_render(false);
|
||||
|
||||
rarch_perf_init(&read_viewport, "read_viewport");
|
||||
performance_counter_init(&read_viewport, "read_viewport");
|
||||
performance_counter_start(&read_viewport);
|
||||
|
||||
num_pixels = gl->vp.width * gl->vp.height;
|
||||
|
@ -1437,7 +1437,7 @@ static bool gx_frame(void *data, const void *frame,
|
||||
u8 clear_efb = GX_FALSE;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
rarch_perf_init(&gx_frame, "gx_frame");
|
||||
performance_counter_init(&gx_frame, "gx_frame");
|
||||
performance_counter_start(&gx_frame);
|
||||
|
||||
if(!gx || (!frame && !gx->menu_texture_enable))
|
||||
@ -1473,7 +1473,7 @@ static bool gx_frame(void *data, const void *frame,
|
||||
{
|
||||
static struct retro_perf_counter gx_frame_convert = {0};
|
||||
|
||||
rarch_perf_init(&gx_frame_convert, "gx_frame_convert");
|
||||
performance_counter_init(&gx_frame_convert, "gx_frame_convert");
|
||||
performance_counter_start(&gx_frame_convert);
|
||||
|
||||
if (gx->rgb32)
|
||||
|
@ -526,7 +526,7 @@ static bool psp_frame(void *data, const void *frame,
|
||||
|
||||
psp->draw_buffer = FROM_GU_POINTER(sceGuSwapBuffers());
|
||||
|
||||
rarch_perf_init(&psp_frame_run, "psp_frame_run");
|
||||
performance_counter_init(&psp_frame_run, "psp_frame_run");
|
||||
performance_counter_start(&psp_frame_run);
|
||||
|
||||
if (psp->should_resize)
|
||||
|
@ -347,7 +347,7 @@ static void sdl_refresh_input_size(sdl2_video_t *vid, bool menu, bool rgb32,
|
||||
|
||||
sdl_tex_zero(target);
|
||||
|
||||
rarch_perf_init(&sdl_create_texture, "sdl_create_texture");
|
||||
performance_counter_init(&sdl_create_texture, "sdl_create_texture");
|
||||
performance_counter_start(&sdl_create_texture);
|
||||
|
||||
if (menu)
|
||||
@ -511,7 +511,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
|
||||
sdl_refresh_input_size(vid, false, vid->video.rgb32, width, height, pitch);
|
||||
|
||||
rarch_perf_init(&sdl_copy_frame, "sdl_copy_frame");
|
||||
performance_counter_init(&sdl_copy_frame, "sdl_copy_frame");
|
||||
performance_counter_start(&sdl_copy_frame);
|
||||
|
||||
SDL_UpdateTexture(vid->frame.tex, NULL, frame, pitch);
|
||||
@ -626,7 +626,7 @@ static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer)
|
||||
sdl2_video_t *vid = (sdl2_video_t*)data;
|
||||
static struct retro_perf_counter sdl2_gfx_read_viewport = {0};
|
||||
|
||||
rarch_perf_init(&sdl2_gfx_read_viewport, "sdl2_gfx_read_viewport");
|
||||
performance_counter_init(&sdl2_gfx_read_viewport, "sdl2_gfx_read_viewport");
|
||||
performance_counter_start(&sdl2_gfx_read_viewport);
|
||||
|
||||
video_driver_cached_frame_render();
|
||||
@ -702,7 +702,7 @@ static void sdl2_poke_set_texture_frame(void *data, const void *frame, bool rgb3
|
||||
sdl_refresh_input_size(vid, true, rgb32, width, height,
|
||||
width * (rgb32 ? 4 : 2));
|
||||
|
||||
rarch_perf_init(©_texture_frame, "copy_texture_frame");
|
||||
performance_counter_init(©_texture_frame, "copy_texture_frame");
|
||||
performance_counter_start(©_texture_frame);
|
||||
|
||||
SDL_UpdateTexture(vid->menu.tex, NULL, frame, vid->menu.pitch);
|
||||
|
@ -342,7 +342,7 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
if (SDL_MUSTLOCK(vid->screen))
|
||||
SDL_LockSurface(vid->screen);
|
||||
|
||||
rarch_perf_init(&sdl_scale, "sdl_scale");
|
||||
performance_counter_init(&sdl_scale, "sdl_scale");
|
||||
performance_counter_start(&sdl_scale);
|
||||
|
||||
video_frame_scale(
|
||||
|
@ -374,7 +374,7 @@ static bool vg_frame(void *data, const void *frame,
|
||||
static struct retro_perf_counter vg_fr = {0};
|
||||
static struct retro_perf_counter vg_image = {0};
|
||||
|
||||
rarch_perf_init(&vg_fr, "vg_fr");
|
||||
performance_counter_init(&vg_fr, "vg_fr");
|
||||
performance_counter_start(&vg_fr);
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
@ -401,7 +401,7 @@ static bool vg_frame(void *data, const void *frame,
|
||||
vgClear(0, 0, width, height);
|
||||
vgSeti(VG_SCISSORING, VG_TRUE);
|
||||
|
||||
rarch_perf_init(&vg_image, "vg_image");
|
||||
performance_counter_init(&vg_image, "vg_image");
|
||||
performance_counter_start(&vg_image);
|
||||
vg_copy_frame(vg, frame, frame_width, frame_height, pitch);
|
||||
performance_counter_stop(&vg_image);
|
||||
|
@ -1456,13 +1456,13 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
unsigned frame_index =
|
||||
vk->context->current_swapchain_index;
|
||||
|
||||
rarch_perf_init(&frame_run, "frame_run");
|
||||
rarch_perf_init(©_frame, "copy_frame");
|
||||
rarch_perf_init(&swapbuffers, "swapbuffers");
|
||||
rarch_perf_init(&queue_submit, "queue_submit");
|
||||
rarch_perf_init(&begin_cmd, "begin_command");
|
||||
rarch_perf_init(&build_cmd, "build_command");
|
||||
rarch_perf_init(&end_cmd, "end_command");
|
||||
performance_counter_init(&frame_run, "frame_run");
|
||||
performance_counter_init(©_frame, "copy_frame");
|
||||
performance_counter_init(&swapbuffers, "swapbuffers");
|
||||
performance_counter_init(&queue_submit, "queue_submit");
|
||||
performance_counter_init(&begin_cmd, "begin_command");
|
||||
performance_counter_init(&build_cmd, "build_command");
|
||||
performance_counter_init(&end_cmd, "end_command");
|
||||
performance_counter_start(&frame_run);
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
@ -2076,7 +2076,7 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer)
|
||||
if (staging->memory == VK_NULL_HANDLE)
|
||||
return false;
|
||||
|
||||
rarch_perf_init(&stream_readback, "stream_readback");
|
||||
performance_counter_init(&stream_readback, "stream_readback");
|
||||
performance_counter_start(&stream_readback);
|
||||
|
||||
buffer += 3 * (vk->vp.height - 1) * vk->vp.width;
|
||||
|
@ -1059,7 +1059,7 @@ static bool video_driver_frame_filter(const void *data,
|
||||
static struct retro_perf_counter softfilter_process = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
rarch_perf_init(&softfilter_process, "softfilter_process");
|
||||
performance_counter_init(&softfilter_process, "softfilter_process");
|
||||
|
||||
if (!video_driver_state.filter.filter || !data)
|
||||
return false;
|
||||
@ -2052,7 +2052,7 @@ static bool video_pixel_frame_scale(const void *data,
|
||||
{
|
||||
static struct retro_perf_counter video_frame_conv = {0};
|
||||
|
||||
rarch_perf_init(&video_frame_conv, "video_frame_conv");
|
||||
performance_counter_init(&video_frame_conv, "video_frame_conv");
|
||||
|
||||
if ( !data
|
||||
|| video_driver_get_pixel_format() != RETRO_PIXEL_FORMAT_0RGB1555)
|
||||
|
@ -670,7 +670,7 @@ static bool video_thread_frame(void *data, const void *frame_,
|
||||
return false;
|
||||
}
|
||||
|
||||
rarch_perf_init(&thr_frame, "thr_frame");
|
||||
performance_counter_init(&thr_frame, "thr_frame");
|
||||
performance_counter_start(&thr_frame);
|
||||
|
||||
copy_stride = width * (thr->info.rgb32
|
||||
|
@ -572,7 +572,7 @@ recheckcapacity:;
|
||||
goto recheckcapacity;
|
||||
}
|
||||
|
||||
rarch_perf_init(&gen_deltas, "gen_deltas");
|
||||
performance_counter_init(&gen_deltas, "gen_deltas");
|
||||
performance_counter_start(&gen_deltas);
|
||||
|
||||
oldb = state->thisblock;
|
||||
@ -760,7 +760,7 @@ void state_manager_check_rewind(bool pressed)
|
||||
|
||||
state_manager_push_where(rewind_state.state, &state);
|
||||
|
||||
rarch_perf_init(&rewind_serialize, "rewind_serialize");
|
||||
performance_counter_init(&rewind_serialize, "rewind_serialize");
|
||||
performance_counter_start(&rewind_serialize);
|
||||
|
||||
serial_info.data = state;
|
||||
|
@ -121,7 +121,7 @@ void retro_perf_log(void)
|
||||
log_counters(perf_counters_libretro, perf_ptr_libretro);
|
||||
}
|
||||
|
||||
int rarch_perf_init(struct retro_perf_counter *perf, const char *name)
|
||||
int performance_counter_init(struct retro_perf_counter *perf, const char *name)
|
||||
{
|
||||
perf->ident = name;
|
||||
|
||||
|
@ -57,7 +57,7 @@ void retro_perf_log(void);
|
||||
|
||||
void rarch_perf_log(void);
|
||||
|
||||
int rarch_perf_init(struct retro_perf_counter *perf, const char *name);
|
||||
int performance_counter_init(struct retro_perf_counter *perf, const char *name);
|
||||
|
||||
/**
|
||||
* performance_counter_start:
|
||||
|
Loading…
x
Reference in New Issue
Block a user