[D3D12] Pre-create EDRAM and shared memory buffer descriptors

This commit is contained in:
Triang3l
2019-01-17 16:39:51 +03:00
parent cf7c981991
commit b7bcdf3e8b
7 changed files with 177 additions and 50 deletions

View File

@@ -119,8 +119,8 @@ class SharedMemory {
TransitionBuffer(D3D12_RESOURCE_STATE_COPY_SOURCE);
}
void CreateSRV(D3D12_CPU_DESCRIPTOR_HANDLE handle);
void CreateRawUAV(D3D12_CPU_DESCRIPTOR_HANDLE handle);
void WriteRawSRVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle);
void WriteRawUAVDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE handle);
private:
bool AreTiledResourcesUsed() const;
@@ -159,6 +159,17 @@ class SharedMemory {
// Total physical page count.
uint32_t page_count_;
// Non-shader-visible buffer descriptor heap for faster binding (via copying
// rather than creation).
enum class BufferDescriptorIndex : uint32_t {
kRawSRV,
kRawUAV,
kCount,
};
ID3D12DescriptorHeap* buffer_descriptor_heap_ = nullptr;
D3D12_CPU_DESCRIPTOR_HANDLE buffer_descriptor_heap_start_;
// Handle of the physical memory write callback.
void* physical_write_watch_handle_ = nullptr;