Memory manager: buffer uploads (Metal+refactor) - Part 3

Manages a single persistently mapped GPU heap which is sub-allocated
inside of ring-buffer for uploads. To handle larger buffers without additional
unused heaps, ring buffers are created on-demand.

BUG=dawn:28
TEST=dawn_unittests

Change-Id: If4d3e717186895b1409502c1dea5ab751a4776b2
Reviewed-on: https://dawn-review.googlesource.com/c/4440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This commit is contained in:
Bryan Bernhart
2019-02-15 21:18:40 +00:00
committed by Commit Bot service account
parent 695b68d100
commit 67a73bd9fa
31 changed files with 147 additions and 190 deletions

View File

@@ -46,7 +46,7 @@ namespace dawn_native {
newMaxSize *= 2;
}
// TODO(b-brber): Fall-back to no sub-allocations should this fail.
// TODO(bryan.bernhart@intel.com): Fall-back to no sub-allocations should this fail.
DAWN_TRY(CreateAndAppendBuffer(newMaxSize));
largestRingBuffer = GetLargestBuffer();
uploadHandle = largestRingBuffer->SubAllocate(alignedSize);