SpiecsEngine
 
Loading...
Searching...
No Matches
NvidiaToolExtensionLibrary.hpp
Go to the documentation of this file.
1/**
2* @file NvidiaToolExtensionLibrary.hpp file.
3* @brief The NvidiaToolExtensionLibrary Class Definitions.
4* @author Spices.
5* @see https://nvidia.github.io/NVTX/doxygen-cpp/index.html .
6*/
7
8#pragma once
9#include "Core/Core.h"
10
11#include <nvtx3/nvtx3.hpp>
12
13namespace Spices {
14
15 /**
16 * @brief Define a custom domain tag type.
17 */
19 {
20 static constexpr char const* name{ "SpicesEngine Domain" };
21 };
22
23 /**
24 * @brief Define a named category tag type.
25 */
27 {
28 static constexpr char const* name{ "SpicesEngine Category" };
29 static constexpr uint32_t id{ 42 };
30 };
31
32 /**
33 * @brief Define a registered string tag type.
34 */
36 {
37 static constexpr char const* message{ "SpicesEngine Message" };
38 };
39
40#ifdef SPICES_DEBUG
41
42#define NVTX_FUNCTION NVTX3_FUNC_RANGE()
43#define NVTX_MARK(...) { nvtx3::mark(__VA_ARGS__); }
44#define NVTX_RANGE(str)
45 auto& cat_##str = nvtx3::named_category_in<SpicesEngineDomain>::get<SpicesEngineCategory>();
46 nvtx3::scoped_range_in<SpicesEngineDomain> r_##str{ nvtx3::rgb{255, 255, 0}, #str, cat_##str, nvtx3::payload{42} };
47
48#endif
49
50#ifdef SPICES_RELEASE
51
52#define NVTX_FUNCTION
53#define NVTX_MARK(...)
54#define NVTX_RANGE(str)
55
56#endif
57
58}
int main()
Main Function.
Definition EntryPoint.h:15
#define PROCESS_INSTANCE_ENTRY
Macros of modify Process instance state.
#define PROCESS_INSTANCE_EXIT
#define SPICES_PROFILE_ZONE
Application()
Constructor Function.
static void Run()
Run Our World.
Application Class. Our Engine Start here.
Definition Application.h:20
static TracyGPUContext & Get()
Get this Single Instance.
static std::shared_ptr< TracyGPUContext > m_TracyGPUContext
This Single Instance.
virtual ~TracyGPUContext()=default
Destructor Function.
tracy::VkCtx * m_Context
Tracy Vulkan Context.
TracyGPUContext(VulkanState &state)
Constructor Function.
VulkanState & m_VulkanState
VulkanState.
tracy::VkCtx *& GetContext()
Get Context.
static void CreateInstance(VulkanState &state)
Create this Single Instance.
Wapper of Tracy GPU collect features.
World Class. This class defines the basic behaves of World. When we create an new world,...
Definition World.h:41
static const char * memoryPoolNames[3]
MemoryPool's name.
Definition Core.h:43
std::shared_ptr< World > CreateWorld()
extern WorldCreation definition in Game.
Definition EntryPoint.cpp:6
static constexpr char const * name
Define a named category tag type.
static constexpr char const * name
Define a custom domain tag type.
static constexpr char const * message
Define a registered string tag type.
This struct contains all Vulkan object in used global.
Definition VulkanUtils.h:74