Replace constant buffer with D3D12Buffer wrapper
This commit is contained in:
@@ -15,7 +15,7 @@ public:
|
||||
D3D12Buffer();
|
||||
~D3D12Buffer();
|
||||
|
||||
bool Initialize(ID3D12Device* device, uint64_t size, D3D12_RESOURCE_STATES initialState = D3D12_RESOURCE_STATE_COMMON);
|
||||
bool Initialize(ID3D12Device* device, uint64_t size, D3D12_RESOURCE_STATES initialState = D3D12_RESOURCE_STATE_COMMON, D3D12_HEAP_TYPE heapType = D3D12_HEAP_TYPE_DEFAULT);
|
||||
bool InitializeFromExisting(ID3D12Resource* resource);
|
||||
void Shutdown();
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ D3D12Buffer::~D3D12Buffer() {
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
bool D3D12Buffer::Initialize(ID3D12Device* device, uint64_t size, D3D12_RESOURCE_STATES initialState) {
|
||||
bool D3D12Buffer::Initialize(ID3D12Device* device, uint64_t size, D3D12_RESOURCE_STATES initialState, D3D12_HEAP_TYPE heapType) {
|
||||
D3D12_HEAP_PROPERTIES heapProperties = {};
|
||||
heapProperties.Type = D3D12_HEAP_TYPE_DEFAULT;
|
||||
heapProperties.Type = heapType;
|
||||
heapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
|
||||
heapProperties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
|
||||
heapProperties.CreationNodeMask = 0;
|
||||
|
||||
Reference in New Issue
Block a user