3 #include "d3d12_includes.h" 5 #include "util/string.h" 6 #include "util/weak_ptr.h" 8 #define BLOWBOX_DESCRIPTOR_ID_UNKNOWN ~(0u) 36 void Create(
const WString& name, D3D12_DESCRIPTOR_HEAP_TYPE heap_type, D3D12_DESCRIPTOR_HEAP_FLAGS flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, UINT descriptor_count = 4096U);
71 UINT
CreateUnorderedAccessView(ID3D12Resource* buffer, ID3D12Resource* counter_buffer, D3D12_UNORDERED_ACCESS_VIEW_DESC* desc);
UINT GetDescriptorsAllocated() const
Definition: descriptor_heap.h:104
const D3D12_DESCRIPTOR_HEAP_DESC & GetDesc()
Definition: descriptor_heap.h:95
UINT CreateRenderTargetView(ID3D12Resource *rtv_buffer, D3D12_RENDER_TARGET_VIEW_DESC *desc)
Creates a RenderTargetView (descriptor)
Definition: descriptor_heap.cc:51
Manages a ID3D12DescriptorHeap of a certain type.
Definition: descriptor_heap.h:21
void Clear()
Essentially resets the DescriptorHeap.
Definition: descriptor_heap.cc:126
UINT CreateShaderResourceView(ID3D12Resource *srv_buffer, D3D12_SHADER_RESOURCE_VIEW_DESC *desc)
Creates a ShaderResourceView (descriptor)
Definition: descriptor_heap.cc:73
UINT GetDescriptorHeapMaxAllocations() const
Definition: descriptor_heap.h:107
UINT GetDescriptorSize() const
Definition: descriptor_heap.h:101
ID3D12DescriptorHeap * Get()
Definition: descriptor_heap.h:92
UINT CreateConstantBufferView(D3D12_CONSTANT_BUFFER_VIEW_DESC *desc)
Creates a ConstantBufferView (descriptor)
Definition: descriptor_heap.cc:62
ID3D12DescriptorHeap * heap_
The underlying descriptor heap.
Definition: descriptor_heap.h:109
eastl::wstring WString
Typedef for wrapping the EASTL wstring.
Definition: string.h:20
D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorById(UINT id)
Get a gpu handle to a descriptor by its id.
Definition: descriptor_heap.cc:115
~DescriptorHeap()
Destructs the DescriptorHeap.
Definition: descriptor_heap.cc:19
UINT descriptor_size_
The size of a single descriptor.
Definition: descriptor_heap.h:114
UINT CreateSampler(D3D12_SAMPLER_DESC *desc)
Creates a sampler state (descriptor)
Definition: descriptor_heap.cc:95
The main Blowbox namespace.
Definition: image.cc:8
DescriptorHeap()
Constructs a DescriptorHeap.
Definition: descriptor_heap.cc:10
D3D12_DESCRIPTOR_HEAP_DESC heap_desc_
The description for the descriptor heap.
Definition: descriptor_heap.h:110
UINT CreateDepthStencilView(ID3D12Resource *dsv_buffer, D3D12_DEPTH_STENCIL_VIEW_DESC *desc)
Creates a DepthStencilView (descriptor)
Definition: descriptor_heap.cc:40
D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorById(UINT id)
Get a cpu handle to a descriptor by its id.
Definition: descriptor_heap.cc:106
UINT current_allocations_
The number of descriptors in the descriptor heap in active use.
Definition: descriptor_heap.h:113
void Create(const WString &name, D3D12_DESCRIPTOR_HEAP_TYPE heap_type, D3D12_DESCRIPTOR_HEAP_FLAGS flags=D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, UINT descriptor_count=4096U)
Creates the DescriptorHeap.
Definition: descriptor_heap.cc:25
UINT CreateUnorderedAccessView(ID3D12Resource *buffer, ID3D12Resource *counter_buffer, D3D12_UNORDERED_ACCESS_VIEW_DESC *desc)
Creates a UnorderedAccessView (descriptor)
Definition: descriptor_heap.cc:84