Deprecate fences.

The are replaced by Queue::OnSubmittedWorkDone. Only Queue::CreateFence
is deprecated since all other fence-related calls require a fence to
work.

Also ports a number of uses of fences in test harness to use
Queue::OnSubmittedWorkDone instead.

Bug: chromium:1177476

Change-Id: I479415f72b08158a3484013e00db8facd11e6f33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42660
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
This commit is contained in:
Corentin Wallez
2021-02-25 21:47:15 +00:00
committed by Commit Bot service account
parent 7124cc4e5d
commit 4165c1cd9c
11 changed files with 97 additions and 70 deletions

View File

@@ -149,7 +149,8 @@ TEST_F(ErrorScopeValidationTest, EnclosedQueueSubmit) {
device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory);
queue.Submit(0, nullptr);
wgpu::Fence fence = queue.CreateFence();
wgpu::Fence fence;
EXPECT_DEPRECATION_WARNING(fence = queue.CreateFence());
queue.Signal(fence, 1);
testing::Sequence seq;
@@ -174,7 +175,8 @@ TEST_F(ErrorScopeValidationTest, EnclosedQueueSubmitNested) {
device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory);
queue.Submit(0, nullptr);
wgpu::Fence fence = queue.CreateFence();
wgpu::Fence fence;
EXPECT_DEPRECATION_WARNING(fence = queue.CreateFence());
queue.Signal(fence, 1);
testing::Sequence seq;