Implement Buffer::MapAsync

MapAsync in dawn_native is fully implemented and only missing
a couple cleanups that can be done once MapRead/WriteAsync are
removed.

MapAsync in dawn_wire is left as a pure shim on top of
MapRead/WriteAsync and will be transitioned to its own commands
in follow-ups.

All MapRead/WriteAsync end2end and validation tests are duplicated
for MapAsync.

Bug: dawn:445

Change-Id: Ib1430b9257149917be19a84f13e0ddd2a8eccc32
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24260
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Corentin Wallez
2020-07-14 12:30:14 +00:00
committed by Commit Bot service account
parent 92f501dbfd
commit 0d52f800a1
22 changed files with 1032 additions and 48 deletions

View File

@@ -312,6 +312,10 @@ namespace dawn_native { namespace null {
return {};
}
MaybeError Buffer::MapAsyncImpl(wgpu::MapMode mode, size_t offset, size_t size) {
return {};
}
void* Buffer::GetMappedPointerImpl() {
return mBackingData.get();
}

View File

@@ -201,6 +201,7 @@ namespace dawn_native { namespace null {
// Dawn API
MaybeError MapReadAsyncImpl() override;
MaybeError MapWriteAsyncImpl() override;
MaybeError MapAsyncImpl(wgpu::MapMode mode, size_t offset, size_t size) override;
void UnmapImpl() override;
void DestroyImpl() override;