BRE12
CommandAllocatorManager.h
1 #pragma once
2 
3 #include <d3d12.h>
4 #include <mutex>
5 #include <tbb/concurrent_unordered_set.h>
6 
7 namespace BRE {
8 // To create/get command allocators
10 public:
11  CommandAllocatorManager() = delete;
12  ~CommandAllocatorManager() = delete;
14  const CommandAllocatorManager& operator=(const CommandAllocatorManager&) = delete;
16  CommandAllocatorManager& operator=(CommandAllocatorManager&&) = delete;
17 
18  static void EraseAll() noexcept;
19 
20  static ID3D12CommandAllocator& CreateCommandAllocator(const D3D12_COMMAND_LIST_TYPE& commandListType) noexcept;
21 
22 private:
24  static CommandAllocators mCommandAllocators;
25 
26  static std::mutex mMutex;
27 };
28 }
Definition: Camera.cpp:8
Definition: concurrent_unordered_set.h:58
Definition: CommandAllocatorManager.h:9