BRE12
BRE
CommandManager
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
9
class
CommandAllocatorManager
{
10
public
:
11
CommandAllocatorManager
() =
delete
;
12
~
CommandAllocatorManager
() =
delete
;
13
CommandAllocatorManager
(
const
CommandAllocatorManager
&) =
delete
;
14
const
CommandAllocatorManager
& operator=(
const
CommandAllocatorManager
&) =
delete
;
15
CommandAllocatorManager
(
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
:
23
using
CommandAllocators
=
tbb::concurrent_unordered_set<ID3D12CommandAllocator*>
;
24
static
CommandAllocators
mCommandAllocators;
25
26
static
std::mutex mMutex;
27
};
28
}
BRE
Definition:
Camera.cpp:8
tbb::interface5::concurrent_unordered_set
Definition:
concurrent_unordered_set.h:58
BRE::CommandAllocatorManager
Definition:
CommandAllocatorManager.h:9
Generated by
1.8.12