mirror of
https://github.com/Vita3K/Vita3K-Android.git
synced 2024-12-03 19:10:41 +00:00
tracy: Workaround for commands not compiling in MSVC
This commit is contained in:
parent
660425bd93
commit
021e62a073
@ -23,6 +23,10 @@
|
||||
#include <sstream>
|
||||
#include <util/log.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4003) // This warning is SUPER annoying, shut the warning up c:
|
||||
#endif
|
||||
|
||||
// universal to string converters for module specific types (usually enums)
|
||||
template <typename T>
|
||||
std::string to_debug_str(const MemState &mem, T data) {
|
||||
@ -105,13 +109,11 @@ inline std::string to_debug_str(const MemState &mem) {
|
||||
|
||||
// TODO: Support more stuff for commands, like arguments
|
||||
#define __TRACY_FUNC_COMMANDS(name) \
|
||||
static_assert(std::basic_string_view(__FUNCTION__) == "cmd_" #name); \
|
||||
bool _tracy_activation_state = config::is_tracy_advanced_profiling_active_for_module(config.tracy_advanced_profiling_modules, "Renderer commands"); \
|
||||
ZoneNamedN(___tracy_scoped_zone, #name, _tracy_activation_state);
|
||||
|
||||
// TODO: Support more stuff for commands, like arguments
|
||||
#define __TRACY_FUNC_COMMANDS_SET_STATE(name) \
|
||||
static_assert(std::basic_string_view(__FUNCTION__) == "cmd_set_state_" #name); \
|
||||
bool _tracy_activation_state = config::is_tracy_advanced_profiling_active_for_module(config.tracy_advanced_profiling_modules, "Renderer commands"); \
|
||||
ZoneNamedN(___tracy_scoped_zone, #name, _tracy_activation_state);
|
||||
|
||||
@ -133,4 +135,4 @@ inline std::string to_debug_str(const MemState &mem) {
|
||||
#define TRACY_FUNC_M(module_name_var, name, ...)
|
||||
#define TRACY_FUNC_COMMANDS(name)
|
||||
#define TRACY_FUNC_COMMANDS_SET_STATE(name)
|
||||
#endif // TRACY_ENABLE
|
||||
#endif // TRACY_ENABLE
|
||||
|
Loading…
Reference in New Issue
Block a user