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

@@ -42,6 +42,8 @@ class ValidationTest : public testing::Test {
bool EndExpectDeviceError();
std::string GetLastDeviceErrorMessage() const;
void WaitForAllOperations(const wgpu::Device& device) const;
// Helper functions to create objects to test validation.
struct DummyRenderPass : public wgpu::RenderPassDescriptor {