Don't rely on null::Queue::Submit resolving mapping operations.

In the validation tests, we relied on Queue.Submit(0, nullptr) to
resolve mapping operations. This is fragile so we replace it with a
FlushMappingOperations() function that uses device.Tick() instead.

This allows removing the mapSerial argument from
Buffer::MapRead/WriteAsyncImpl (which was the actual goal of this CL).

Bug: dawn:445
Change-Id: Id98822287370c371bebb83afb8e290e17f3c1b55
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24381
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2020-07-09 06:12:04 +00:00
committed by Commit Bot service account
parent d761d5a575
commit 1318c603d9
17 changed files with 92 additions and 109 deletions

View File

@@ -79,7 +79,7 @@ namespace dawn_native { namespace opengl {
return {};
}
MaybeError Buffer::MapReadAsyncImpl(uint32_t serial) {
MaybeError Buffer::MapReadAsyncImpl() {
const OpenGLFunctions& gl = ToBackend(GetDevice())->gl;
// TODO(cwallez@chromium.org): this does GPU->CPU synchronization, we could require a high
@@ -89,7 +89,7 @@ namespace dawn_native { namespace opengl {
return {};
}
MaybeError Buffer::MapWriteAsyncImpl(uint32_t serial) {
MaybeError Buffer::MapWriteAsyncImpl() {
const OpenGLFunctions& gl = ToBackend(GetDevice())->gl;
// TODO(cwallez@chromium.org): this does GPU->CPU synchronization, we could require a high

View File

@@ -34,8 +34,8 @@ namespace dawn_native { namespace opengl {
private:
~Buffer() override;
// Dawn API
MaybeError MapReadAsyncImpl(uint32_t serial) override;
MaybeError MapWriteAsyncImpl(uint32_t serial) override;
MaybeError MapReadAsyncImpl() override;
MaybeError MapWriteAsyncImpl() override;
void UnmapImpl() override;
void DestroyImpl() override;