Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
TracyVkContextManager.h
Go to the documentation of this file.
1#pragma once
2
3#include "TracyMacros.hpp"
4
5#ifdef ENABLE_TRACY
6
7#include <string>
8#include <vector>
9#include <vulkan/vulkan_core.h>
10
11namespace Engine::Debug::Tracy {
12
19 class TracyVkContextManager
20 {
21 public:
22 TracyVkContextManager() = default;
23 ~TracyVkContextManager();
24
25 TracyVkContextManager( const TracyVkContextManager & ) = delete;
26 TracyVkContextManager & operator=( const TracyVkContextManager & ) = delete;
27
38 void create(
39 VkPhysicalDevice physicalDevice,
40 VkDevice device,
41 VkQueue graphicsQueue,
42 VkQueue transferQueue,
43 const std::vector<VkCommandBuffer> & graphicsCommandBuffers,
44 const std::vector<VkCommandBuffer> & transferCommandBuffers
45 );
46
53 void reset(
54 VkPhysicalDevice physicalDevice,
55 VkDevice device,
56 VkQueue graphicsQueue,
57 VkQueue transferQueue,
58 const std::vector<VkCommandBuffer> & graphicsCommandBuffers,
59 const std::vector<VkCommandBuffer> & transferCommandBuffers
60 );
61
62 [[nodiscard]] TracyVkCtx getGraphicsContext( uint32_t frameIndex ) const;
63 [[nodiscard]] TracyVkCtx getTransferContext( uint32_t frameIndex ) const;
64
71 void destroy();
72
73 private:
74 std::vector<TracyVkCtx> graphicsContexts_;
75 std::vector<TracyVkCtx> transferContexts_;
76 };
77
78} // namespace EngineCore
79
80#endif // ENABLE_TRACY