Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
TracyVkContextManager.h
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 const std::vector<VkCommandBuffer> & graphicsCommandBuffers,
55 const std::vector<VkCommandBuffer> & transferCommandBuffers
56 );
57
58 [[nodiscard]] TracyVkCtx getGraphicsContext( uint32_t frameIndex ) const;
59 [[nodiscard]] TracyVkCtx getTransferContext( uint32_t frameIndex ) const;
60
67 void destroy();
68
69 private:
70 std::vector<TracyVkCtx> graphicsContexts_;
71 std::vector<TracyVkCtx> transferContexts_;
72 };
73
74} // namespace EngineCore
75
76#endif // ENABLE_TRACY