Resource Management 6: VK support for resource allocation.

Refactor existing memory allocators by using a common
memory type and handle.

BUG=dawn:27

Change-Id: Ieed4fa30a0bd8fedfb3a3c580920805f40b56fae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10680
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This commit is contained in:
Bryan Bernhart
2019-09-05 17:36:47 +00:00
committed by Commit Bot service account
parent a900ccebcf
commit 22c3ff73c1
14 changed files with 315 additions and 36 deletions

View File

@@ -41,12 +41,14 @@ namespace dawn_native {
ResourceMemoryAllocation();
ResourceMemoryAllocation(uint64_t offset,
ResourceHeapBase* resourceHeap,
AllocationMethod method);
AllocationMethod method,
uint8_t* mappedPointer = nullptr);
~ResourceMemoryAllocation() = default;
ResourceHeapBase* GetResourceHeap() const;
uint64_t GetOffset() const;
AllocationMethod GetAllocationMethod() const;
uint8_t* GetMappedPointer() const;
void Invalidate();
@@ -54,6 +56,7 @@ namespace dawn_native {
AllocationMethod mMethod;
uint64_t mOffset;
ResourceHeapBase* mResourceHeap;
uint8_t* mMappedPointer;
};
} // namespace dawn_native