Residency 2: Create a d3d12::Heap During Direct Allocations

When creating a directly allocated resource in D3D12, also create a
dawn_native::d3d12::Heap to represent that allocation alongside the
ResourceHeapAllocation. This matches D3D12's allocation model when using
CreateCommittedResource and makes residency management much easier.

Bug: dawn:193
Change-Id: I2280863dcfca57bad72962a2b097f8f2d4cc7dad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/16381
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Brandon Jones
2020-03-09 15:53:19 +00:00
committed by Commit Bot service account
parent be6cd51888
commit f3bb4f4f32
9 changed files with 71 additions and 20 deletions

View File

@@ -31,6 +31,9 @@ namespace dawn_native {
// Memory sub-divided using one or more blocks of various sizes.
kSubAllocated,
// Memory was allocated outside of Dawn.
kExternal,
// Memory not allocated or freed.
kInvalid
};