BRE12
FenceManager.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 cfences
9 class FenceManager {
10 public:
11  FenceManager() = delete;
12  ~FenceManager() = delete;
13  FenceManager(const FenceManager&) = delete;
14  const FenceManager& operator=(const FenceManager&) = delete;
15  FenceManager(FenceManager&&) = delete;
16  FenceManager& operator=(FenceManager&&) = delete;
17 
18  static void EraseAll() noexcept;
19 
20  static ID3D12Fence& CreateFence(
21  const std::uint64_t fenceInitialValue,
22  const D3D12_FENCE_FLAGS& flags) noexcept;
23 
24 private:
26  static Fences mFences;
27 
28  static std::mutex mMutex;
29 };
30 }
31 
32 
Definition: Camera.cpp:8
Definition: concurrent_unordered_set.h:58
Definition: FenceManager.h:9