From 8314d25fdb0ccb323ef968092b50ac1ea4276f79 Mon Sep 17 00:00:00 2001 From: Panos Karabelas Date: Tue, 10 Dec 2024 17:13:01 +0000 Subject: [PATCH] [profiler] removed unused function --- runtime/Core/Engine.cpp | 1 - runtime/Profiling/Profiler.cpp | 24 ++++++++++++++++++------ runtime/Profiling/Profiler.h | 1 - 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/runtime/Core/Engine.cpp b/runtime/Core/Engine.cpp index 3da8f1bc5..f98905c3a 100644 --- a/runtime/Core/Engine.cpp +++ b/runtime/Core/Engine.cpp @@ -102,7 +102,6 @@ namespace Spartan ThreadPool::Shutdown(); Event::Shutdown(); Audio::Shutdown(); - Profiler::Shutdown(); Window::Shutdown(); ImageImporter::Shutdown(); FontImporter::Shutdown(); diff --git a/runtime/Profiling/Profiler.cpp b/runtime/Profiling/Profiler.cpp index 13988b44c..1fbe049e2 100644 --- a/runtime/Profiling/Profiler.cpp +++ b/runtime/Profiling/Profiler.cpp @@ -191,11 +191,6 @@ namespace Spartan cpu_name = get_cpu_name(); } - void Profiler::Shutdown() - { - ClearRhiMetrics(); - } - void Profiler::PostTick() { // compute timings @@ -263,6 +258,23 @@ namespace Spartan { DrawPerformanceMetrics(); } + + m_rhi_draw = 0; + m_rhi_timeblock_count = 0; + m_rhi_pipeline_bindings = 0; + m_rhi_pipeline_barriers = 0; + m_rhi_bindings_buffer_index = 0; + m_rhi_bindings_buffer_vertex = 0; + m_rhi_bindings_buffer_constant = 0; + m_rhi_bindings_buffer_structured = 0; + m_rhi_bindings_sampler = 0; + m_rhi_bindings_texture_sampled = 0; + m_rhi_bindings_shader_vertex = 0; + m_rhi_bindings_shader_pixel = 0; + m_rhi_bindings_shader_compute = 0; + m_rhi_bindings_render_target = 0; + m_rhi_bindings_texture_storage = 0; + m_rhi_bindings_descriptor_set = 0; } void Profiler::ReadTimeBlocks() @@ -344,7 +356,7 @@ namespace Spartan time_gpu_min = numeric_limits::max(); time_gpu_max = numeric_limits::lowest(); time_gpu_last = 0.0f; - } + } const vector& Profiler::GetTimeBlocks() { diff --git a/runtime/Profiling/Profiler.h b/runtime/Profiling/Profiler.h index f25923faa..4ec16ba38 100644 --- a/runtime/Profiling/Profiler.h +++ b/runtime/Profiling/Profiler.h @@ -43,7 +43,6 @@ namespace Spartan { public: static void Initialize(); - static void Shutdown(); static void PostTick(); static void TimeBlockStart(const char* func_name, TimeBlockType type, RHI_CommandList* cmd_list = nullptr);