Skip to content

Commit

Permalink
[profiler] removed unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Dec 10, 2024
1 parent 268dda2 commit 8314d25
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
1 change: 0 additions & 1 deletion runtime/Core/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ namespace Spartan
ThreadPool::Shutdown();
Event::Shutdown();
Audio::Shutdown();
Profiler::Shutdown();
Window::Shutdown();
ImageImporter::Shutdown();
FontImporter::Shutdown();
Expand Down
24 changes: 18 additions & 6 deletions runtime/Profiling/Profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ namespace Spartan
cpu_name = get_cpu_name();
}

void Profiler::Shutdown()
{
ClearRhiMetrics();
}

void Profiler::PostTick()
{
// compute timings
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -344,7 +356,7 @@ namespace Spartan
time_gpu_min = numeric_limits<float>::max();
time_gpu_max = numeric_limits<float>::lowest();
time_gpu_last = 0.0f;
}
}

const vector<TimeBlock>& Profiler::GetTimeBlocks()
{
Expand Down
1 change: 0 additions & 1 deletion runtime/Profiling/Profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8314d25

Please sign in to comment.