-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stepanov Igor
committed
Dec 27, 2024
1 parent
c1b3de1
commit 52d48dc
Showing
2 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
#pragma once | ||
|
||
#if defined(VOXELENGINE_PROFILER) | ||
#if defined(VOXELENGINE_TRACY_PROFILER) | ||
#include <Tracy/Tracy.hpp> | ||
#if defined(VOXELENGINE_TRACY_PROFILER) | ||
#include <Tracy/Tracy.hpp> | ||
|
||
#define VOXELENGINE_PROFILE ZoneScoped | ||
#define VOXELENGINE_PROFILE_FRAME FrameMark | ||
#define VOXELENGINE_PROFILE_SECTION(name) ZoneScopedN(name) | ||
#define VOXELENGINE_PROFILE_TAG(tag) ZoneText(tag, strlen(tag)) | ||
#define VOXELENGINE_PROFILE_LOG(text) TracyMessage(text, strlen(text)) | ||
#define VOXELENGINE_PROFILE_VALUE(text, value) TracyPlot(text, value) | ||
/// @warning Tracy can capture only one context | ||
#define VOXELENGINE_GPU_CONTEXT TracyGpuContext | ||
#define VOXELENGINE_GPU_ZONE(name) TracyGpuZone(name) | ||
#else | ||
#error "No active profiler" | ||
#endif | ||
#define VOXELENGINE_PROFILE ZoneScoped | ||
#define VOXELENGINE_PROFILE_FRAME FrameMark | ||
#define VOXELENGINE_PROFILE_SECTION(name) ZoneScopedN(name) | ||
#define VOXELENGINE_PROFILE_TAG(tag) ZoneText(tag, strlen(tag)) | ||
#define VOXELENGINE_PROFILE_LOG(text) TracyMessage(text, strlen(text)) | ||
#define VOXELENGINE_PROFILE_VALUE(text, value) TracyPlot(text, value) | ||
/// @warning Tracy can capture only one context | ||
#define VOXELENGINE_GPU_CONTEXT TracyGpuContext | ||
#define VOXELENGINE_GPU_ZONE(name) TracyGpuZone(name) | ||
#else | ||
#error "No active profiler" | ||
#endif | ||
// You can implement any your profiler with adding VOXELENGINE_{NAME}_PROFILER | ||
// macros | ||
#else | ||
#define VOXELENGINE_PROFILE | ||
#define VOXELENGINE_PROFILE_FRAME | ||
#define VOXELENGINE_PROFILE_SECTION(name) | ||
#define VOXELENGINE_PROFILE_TAG(tag) | ||
#define VOXELENGINE_PROFILE_LOG(text) | ||
#define VOXELENGINE_PROFILE_VALUE(text, value) | ||
#define VOXELENGINE_GPU_CONTEXT | ||
#define VOXELENGINE_GPU_ZONE(name) | ||
#define VOXELENGINE_PROFILE | ||
#define VOXELENGINE_PROFILE_FRAME | ||
#define VOXELENGINE_PROFILE_SECTION(name) | ||
#define VOXELENGINE_PROFILE_TAG(tag) | ||
#define VOXELENGINE_PROFILE_LOG(text) | ||
#define VOXELENGINE_PROFILE_VALUE(text, value) | ||
#define VOXELENGINE_GPU_CONTEXT | ||
#define VOXELENGINE_GPU_ZONE(name) | ||
#endif |