Tracy profiler setup(disabled by default)

In order to enable it pass -DTRACY_ENABLE:BOOL:ON to the generator. E.g:
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DTRACY_ENABLE:BOOL=ON ..
This commit is contained in:
Vladyslav Baranovskyi
2024-05-31 13:34:30 +03:00
parent f23be3057b
commit dbe062fef4
3 changed files with 6 additions and 1 deletions

View File

@@ -17,6 +17,8 @@ if(LINUX)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
option(TRACY_ENABLE "Enable Tracy Profiler" OFF)
add_subdirectory(3rdParty)
project (openVulkanoCpp VERSION 1.0 LANGUAGES C CXX)

View File

@@ -17,6 +17,8 @@
#include "Base/EngineConfiguration.hpp"
#include "Controller/FreeCamCameraController.hpp"
#include <tracy/Tracy.hpp>
#pragma clang diagnostic push
#pragma ide diagnostic ignored "cert-msc50-cpp"
#pragma ide diagnostic ignored "cppcoreguidelines-narrowing-conversions"
@@ -44,6 +46,7 @@ namespace OpenVulkano
public:
void Init() override
{
ZoneScoped;
auto engineConfig = OpenVulkano::EngineConfiguration::GetEngineConfiguration();
engineConfig->SetNumThreads(4);
engineConfig->SetPreferFramebufferFormatSRGB(false);
@@ -82,6 +85,7 @@ namespace OpenVulkano
void Tick() override
{
ZoneScoped;
for (uint32_t i = 0; i < DYNAMIC; i++)
{
nodesPool[i].SetMatrix(glm::translate(glm::mat4x4(1), glm::vec3((std::rand() % 10000) / 1000.0f - 5, (std::rand() % 10000) / 1000.0f - 5, (std::rand() % 10000) / 1000.0f - 5)));

View File

@@ -25,7 +25,6 @@
# include <dbghelp.h>
#endif
namespace OpenVulkano
{