From f7026cb17b9351a27dcbf88e5fd8a4a63d3193c2 Mon Sep 17 00:00:00 2001 From: DrChat Date: Fri, 2 Mar 2018 23:28:01 -0600 Subject: [PATCH] [Base] Add support for microprofile counters --- src/xenia/base/profiling.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/xenia/base/profiling.h b/src/xenia/base/profiling.h index 79d3338c7..d6cc42d41 100644 --- a/src/xenia/base/profiling.h +++ b/src/xenia/base/profiling.h @@ -88,6 +88,15 @@ namespace xe { MICROPROFILE_SCOPEGPUI(group_name, __FUNCTION__, \ xe::Profiler::GetColor(__FUNCTION__)) +// Adds a number to a counter +#define COUNT_profile_add(name, count) MICROPROFILE_COUNTER_ADD(name, count) + +// Subtracts a number to a counter +#define COUNT_profile_sub(name, count) MICROPROFILE_COUNTER_SUB(name, count) + +// Sets a counter's value +#define COUNT_profile_set(name, count) MICROPROFILE_COUNTER_SET(name, count) + // Tracks a CPU value counter. #define COUNT_profile_cpu(name, count) MICROPROFILE_META_CPU(name, count) @@ -118,6 +127,15 @@ namespace xe { #define SCOPE_profile_gpu_i(group_name, scope_name) \ do { \ } while (false) +#define COUNT_profile_add(name, count) \ + do { \ + } while (false) +#define COUNT_profile_sub(name, count) \ + do { \ + } while (false) +#define COUNT_profile_set(name, count) \ + do { \ + } while (false) #define COUNT_profile_cpu(name, count) \ do { \ } while (false)