Resource Management 8: placed resource sub-allocation.

- Adds d3d allocators (placed resource + heap).
- Support for heap tier 1 but only buffers.
- Suballocation optimization is enabled for allocations under 4MB.

BUG=dawn:27

Change-Id: I79177830670d1f322bbadf45f797415a3e9208d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5680
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This commit is contained in:
Bryan Bernhart
2019-10-17 17:25:28 +00:00
committed by Commit Bot service account
parent 8d000e0cc2
commit 154badfe2f
17 changed files with 415 additions and 167 deletions

View File

@@ -20,8 +20,7 @@ using namespace dawn_native;
class DummyMemoryAllocator : public MemoryAllocator {
public:
ResultOrError<std::unique_ptr<ResourceHeapBase>> Allocate(uint64_t size,
int memoryFlags = 0) override {
ResultOrError<std::unique_ptr<ResourceHeapBase>> Allocate(uint64_t size) override {
return std::make_unique<ResourceHeapBase>();
}
void Deallocate(std::unique_ptr<ResourceHeapBase> allocation) override {