mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-22 06:21:41 +00:00
34bd2492a1
fix: file name typo constant_propogation_pass.cpp fix typo from 'symbol_vitrual_addr' variable fix typo in emit_spirv_context_get_set.cpp fix typo from constant_propagation_pass.cpp in CMakeLists fix typo in these some config.cpp functions - setSliderPosition - setSliderPositionGrid - getSliderPosition - getSliderPositionGrid fix typo inside src\core\aerolib\stubs.cpp fix typo in a comment from src\core\file_format\pkg.cpp fix typo inside src\core\file_sys\fs.cpp + fs.h - NeedsCaseInsensiveSearch -> NeedsCaseInsensitiveSearch fix 2 function typos: sceAppContentAddcontEnqueueDownloadByEntitlemetId and sceAppContentAddcontMountByEntitlemetId fix typo on comment inside src\core\libraries\kernel\file_system.cpp fix typo on src\core\libraries\videoout\driver.cpp fix typo in src\core\memory.cpp fix typo from comment in src\qt_gui\game_list_utils.h fix typo in src\video_core\amdgpu\liverpool.h - window_offset_disble to window_offset_disable fix typo from comments in src\video_core\host_shaders\detile_m32x1.comp + detile_m32x2.comp - subotimal -> suboptimal fix typo from comment in src\video_core\renderer_vulkan\renderer_vulkan.cpp - dimentions -> dimensions fix typo from enum in src\common\debug.h and other files - MarkersPallete -> MarkersPalette fix last typo in src\video_core\amdgpu\pm4_opcodes.h - PremableCntl -> PreambleCntl
60 lines
2.6 KiB
C++
60 lines
2.6 KiB
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#ifdef _MSC_VER
|
|
#define BREAKPOINT __debugbreak
|
|
#elif defined(__GNUC__)
|
|
#define BREAKPOINT __builtin_trap
|
|
#else
|
|
#error What the fuck is this compiler
|
|
#endif
|
|
|
|
#include <tracy/Tracy.hpp>
|
|
|
|
static inline bool IsProfilerConnected() {
|
|
return tracy::GetProfiler().IsConnected();
|
|
}
|
|
|
|
#define CUSTOM_LOCK(type, varname) \
|
|
tracy::LockableCtx varname { \
|
|
[]() -> const tracy::SourceLocationData* { \
|
|
static constexpr tracy::SourceLocationData srcloc{nullptr, #type " " #varname, \
|
|
TracyFile, TracyLine, 0}; \
|
|
return &srcloc; \
|
|
}() \
|
|
}
|
|
|
|
#define TRACK_ALLOC(ptr, size, pool) TracyAllocN(std::bit_cast<void*>(ptr), (size), (pool))
|
|
#define TRACK_FREE(ptr, pool) TracyFreeN(std::bit_cast<void*>(ptr), (pool))
|
|
|
|
enum MarkersPalette : int {
|
|
EmulatorMarkerColor = 0x264653,
|
|
RendererMarkerColor = 0x2a9d8f,
|
|
HleMarkerColor = 0xe9c46a,
|
|
GpuMarkerColor = 0xf4a261,
|
|
Reserved1 = 0xe76f51,
|
|
};
|
|
|
|
#define EMULATOR_TRACE ZoneScopedC(EmulatorMarkerColor)
|
|
#define RENDERER_TRACE ZoneScopedC(RendererMarkerColor)
|
|
#define HLE_TRACE ZoneScopedC(HleMarkerColor)
|
|
|
|
#define TRACE_HINT(str) ZoneText(str.c_str(), str.size())
|
|
|
|
#define TRACE_WARN(msg) \
|
|
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::DarkOrange); }(msg);
|
|
#define TRACE_ERROR(msg) \
|
|
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::Red); }(msg)
|
|
#define TRACE_CRIT(msg) \
|
|
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::HotPink); }(msg)
|
|
|
|
#define GPU_SCOPE_LOCATION(name, color) \
|
|
tracy::SourceLocationData{name, TracyFunction, TracyFile, (uint32_t)TracyLine, color};
|
|
|
|
#define MUTEX_LOCATION(name) \
|
|
tracy::SourceLocationData{nullptr, name, TracyFile, (uint32_t)TracyLine, 0};
|
|
|
|
#define FRAME_END FrameMark
|