Remove deviceBase::SubmitMode and device->GetPendingCommandList

Bug: dawn:1413
Change-Id: Iebad395d123d34a430db0c04d8566c7564b25e69
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/170562
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
diff --git a/src/dawn/native/Device.h b/src/dawn/native/Device.h
index ca7cfb6..f29482b 100644
--- a/src/dawn/native/Device.h
+++ b/src/dawn/native/Device.h
@@ -458,9 +458,6 @@
     // DAWN_ASSERT(device.IsLockedByCurrentThread())
     bool IsLockedByCurrentThreadIfNeeded() const;
 
-    // TODO(dawn:1413): remove this enum forwarding once no longer necessary.
-    using SubmitMode = ExecutionQueueBase::SubmitMode;
-
   protected:
     // Constructor used only for mocking and testing.
     DeviceBase();
diff --git a/src/dawn/native/d3d11/BufferD3D11.cpp b/src/dawn/native/d3d11/BufferD3D11.cpp
index 50eb886..2bc8118 100644
--- a/src/dawn/native/d3d11/BufferD3D11.cpp
+++ b/src/dawn/native/d3d11/BufferD3D11.cpp
@@ -39,6 +39,7 @@
 #include "dawn/native/DynamicUploader.h"
 #include "dawn/native/d3d/D3DError.h"
 #include "dawn/native/d3d11/DeviceD3D11.h"
+#include "dawn/native/d3d11/QueueD3D11.h"
 #include "dawn/native/d3d11/UtilsD3D11.h"
 #include "dawn/platform/DawnPlatform.h"
 #include "dawn/platform/tracing/TraceEvent.h"
@@ -227,8 +228,8 @@
                 DAWN_TRY(ClearInternal(commandContext, 1u));
             } else {
                 auto tmpCommandContext =
-                    ToBackend(GetDevice())
-                        ->GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+                    ToBackend(GetDevice()->GetQueue())
+                        ->GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
                 DAWN_TRY(ClearInternal(&tmpCommandContext, 1u));
             }
         }
@@ -244,8 +245,8 @@
 
                 } else {
                     auto tmpCommandContext =
-                        ToBackend(GetDevice())
-                            ->GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+                        ToBackend(GetDevice()->GetQueue())
+                            ->GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
                     DAWN_TRY(ClearInternal(&tmpCommandContext, 0, clearOffset, clearSize));
                 }
             }
@@ -287,16 +288,16 @@
 
 MaybeError Buffer::MapAtCreationImpl() {
     DAWN_ASSERT(IsMappable(GetUsage()));
-    auto commandContext =
-        ToBackend(GetDevice())->GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+    auto commandContext = ToBackend(GetDevice()->GetQueue())
+                              ->GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
     return MapInternal(&commandContext);
 }
 
 MaybeError Buffer::MapAsyncImpl(wgpu::MapMode mode, size_t offset, size_t size) {
     DAWN_ASSERT(mD3d11NonConstantBuffer);
 
-    auto commandContext =
-        ToBackend(GetDevice())->GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+    auto commandContext = ToBackend(GetDevice()->GetQueue())
+                              ->GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
 
     // TODO(dawn:1705): make sure the map call is not blocked by the GPU operations.
     DAWN_TRY(MapInternal(&commandContext));
@@ -309,8 +310,8 @@
 void Buffer::UnmapImpl() {
     DAWN_ASSERT(mD3d11NonConstantBuffer);
     DAWN_ASSERT(mMappedData);
-    auto commandContext =
-        ToBackend(GetDevice())->GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+    auto commandContext = ToBackend(GetDevice()->GetQueue())
+                              ->GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
     UnmapInternal(&commandContext);
 }
 
diff --git a/src/dawn/native/d3d11/DeviceD3D11.cpp b/src/dawn/native/d3d11/DeviceD3D11.cpp
index f41fce9..d129479 100644
--- a/src/dawn/native/d3d11/DeviceD3D11.cpp
+++ b/src/dawn/native/d3d11/DeviceD3D11.cpp
@@ -148,15 +148,6 @@
     return mD3d11Device5.Get();
 }
 
-ScopedCommandRecordingContext Device::GetScopedPendingCommandContext(SubmitMode submitMode) {
-    return ToBackend(GetQueue())->GetScopedPendingCommandContext(submitMode);
-}
-
-ScopedSwapStateCommandRecordingContext Device::GetScopedSwapStatePendingCommandContext(
-    SubmitMode submitMode) {
-    return ToBackend(GetQueue())->GetScopedSwapStatePendingCommandContext(submitMode);
-}
-
 MaybeError Device::TickImpl() {
     // Check for debug layer messages before executing the command context in case we encounter an
     // error during execution and early out as a result.
@@ -308,7 +299,8 @@
     // D3D11 requires that buffers are unmapped before being used in a copy.
     DAWN_TRY(source->Unmap());
 
-    auto commandContext = GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+    auto commandContext =
+        ToBackend(GetQueue())->GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
     return Buffer::Copy(&commandContext, ToBackend(source), sourceOffset, size,
                         ToBackend(destination), destinationOffset);
 }
diff --git a/src/dawn/native/d3d11/DeviceD3D11.h b/src/dawn/native/d3d11/DeviceD3D11.h
index 0121444..67795f8 100644
--- a/src/dawn/native/d3d11/DeviceD3D11.h
+++ b/src/dawn/native/d3d11/DeviceD3D11.h
@@ -52,11 +52,6 @@
     ID3D11Device* GetD3D11Device() const;
     ID3D11Device5* GetD3D11Device5() const;
 
-    // TODO(dawn:1413): Remove these proxy method in favor of using the Queue directly.
-    ScopedCommandRecordingContext GetScopedPendingCommandContext(SubmitMode submitMode);
-    ScopedSwapStateCommandRecordingContext GetScopedSwapStatePendingCommandContext(
-        SubmitMode submitMode);
-
     const DeviceInfo& GetDeviceInfo() const;
 
     void ReferenceUntilUnused(ComPtr<IUnknown> object);
diff --git a/src/dawn/native/d3d11/QueueD3D11.cpp b/src/dawn/native/d3d11/QueueD3D11.cpp
index 2ecc372..6dfb10f 100644
--- a/src/dawn/native/d3d11/QueueD3D11.cpp
+++ b/src/dawn/native/d3d11/QueueD3D11.cpp
@@ -129,7 +129,8 @@
     // context.
     TRACE_EVENT_BEGIN0(GetDevice()->GetPlatform(), Recording, "CommandBufferD3D11::Execute");
     {
-        auto commandContext = GetScopedSwapStatePendingCommandContext(Device::SubmitMode::Normal);
+        auto commandContext =
+            GetScopedSwapStatePendingCommandContext(QueueBase::SubmitMode::Normal);
         for (uint32_t i = 0; i < commandCount; ++i) {
             DAWN_TRY(ToBackend(commands[i])->Execute(&commandContext));
         }
@@ -149,7 +150,7 @@
         return {};
     }
 
-    auto commandContext = GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+    auto commandContext = GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
     return ToBackend(buffer)->Write(&commandContext, bufferOffset, data, size);
 }
 
@@ -162,8 +163,7 @@
         return {};
     }
 
-    Device* device = ToBackend(GetDevice());
-    auto commandContext = device->GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+    auto commandContext = GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
     TextureCopy textureCopy;
     textureCopy.texture = destination.texture;
     textureCopy.mipLevel = destination.mipLevel;
diff --git a/src/dawn/native/d3d11/TextureD3D11.cpp b/src/dawn/native/d3d11/TextureD3D11.cpp
index 23d818f..4edaeb1 100644
--- a/src/dawn/native/d3d11/TextureD3D11.cpp
+++ b/src/dawn/native/d3d11/TextureD3D11.cpp
@@ -45,6 +45,7 @@
 #include "dawn/native/d3d/UtilsD3D.h"
 #include "dawn/native/d3d11/DeviceD3D11.h"
 #include "dawn/native/d3d11/Forward.h"
+#include "dawn/native/d3d11/QueueD3D11.h"
 #include "dawn/native/d3d11/SharedFenceD3D11.h"
 #include "dawn/native/d3d11/SharedTextureMemoryD3D11.h"
 #include "dawn/native/d3d11/UtilsD3D11.h"
@@ -348,7 +349,8 @@
     // Staging texture is used internally, so we don't need to clear it.
     if (device->IsToggleEnabled(Toggle::NonzeroClearResourcesOnCreationForTesting) &&
         mKind == Kind::Normal) {
-        auto commandContext = device->GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+        auto commandContext = ToBackend(device->GetQueue())
+                                  ->GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
         DAWN_TRY(Clear(&commandContext, GetAllSubresources(), TextureBase::ClearValue::NonZero));
     }
 
@@ -370,8 +372,8 @@
     ComPtr<ID3D11Resource> d3d11Texture;
     DAWN_TRY(CheckHRESULT(d3dTexture.As(&d3d11Texture), "Query ID3D11Resource from IUnknown"));
 
-    Device* device = ToBackend(GetDevice());
-    auto commandContext = device->GetScopedPendingCommandContext(Device::SubmitMode::Normal);
+    auto commandContext = ToBackend(GetDevice()->GetQueue())
+                              ->GetScopedPendingCommandContext(QueueBase::SubmitMode::Normal);
     for (const auto& fence : waitFences) {
         DAWN_TRY(CheckHRESULT(
             commandContext.Wait(ToBackend(fence.object)->GetD3DFence(), fence.signaledValue),
diff --git a/src/dawn/native/d3d12/BufferD3D12.cpp b/src/dawn/native/d3d12/BufferD3D12.cpp
index 0a9f81d..ab01e77 100644
--- a/src/dawn/native/d3d12/BufferD3D12.cpp
+++ b/src/dawn/native/d3d12/BufferD3D12.cpp
@@ -41,6 +41,7 @@
 #include "dawn/native/d3d12/CommandRecordingContext.h"
 #include "dawn/native/d3d12/DeviceD3D12.h"
 #include "dawn/native/d3d12/HeapD3D12.h"
+#include "dawn/native/d3d12/QueueD3D12.h"
 #include "dawn/native/d3d12/ResidencyManagerD3D12.h"
 #include "dawn/native/d3d12/UtilsD3D12.h"
 #include "dawn/platform/DawnPlatform.h"
@@ -192,7 +193,7 @@
         !mappedAtCreation) {
         CommandRecordingContext* commandRecordingContext;
         DAWN_TRY_ASSIGN(commandRecordingContext,
-                        ToBackend(GetDevice())->GetPendingCommandContext());
+                        ToBackend(GetDevice()->GetQueue())->GetPendingCommandContext());
 
         DAWN_TRY(ClearBuffer(commandRecordingContext, uint8_t(1u)));
     }
@@ -203,7 +204,7 @@
         if (paddingBytes > 0) {
             CommandRecordingContext* commandRecordingContext;
             DAWN_TRY_ASSIGN(commandRecordingContext,
-                            ToBackend(GetDevice())->GetPendingCommandContext());
+                            ToBackend(GetDevice()->GetQueue())->GetPendingCommandContext());
 
             uint32_t clearSize = paddingBytes;
             uint64_t clearOffset = GetSize();
@@ -447,7 +448,8 @@
     // Skip the unnecessary GetPendingCommandContext() call saves an extra fence.
     if (NeedsInitialization()) {
         CommandRecordingContext* commandContext;
-        DAWN_TRY_ASSIGN(commandContext, ToBackend(GetDevice())->GetPendingCommandContext());
+        DAWN_TRY_ASSIGN(commandContext,
+                        ToBackend(GetDevice()->GetQueue())->GetPendingCommandContext());
         DAWN_TRY(EnsureDataInitialized(commandContext));
     }
 
diff --git a/src/dawn/native/d3d12/DeviceD3D12.cpp b/src/dawn/native/d3d12/DeviceD3D12.cpp
index e5c8761..0391d38 100644
--- a/src/dawn/native/d3d12/DeviceD3D12.cpp
+++ b/src/dawn/native/d3d12/DeviceD3D12.cpp
@@ -223,12 +223,6 @@
     return *mResidencyManager;
 }
 
-ResultOrError<CommandRecordingContext*> Device::GetPendingCommandContext(
-    Device::SubmitMode submitMode) {
-    // TODO(dawn:1413): Make callers of this method use the queue directly.
-    return ToBackend(GetQueue())->GetPendingCommandContext(submitMode);
-}
-
 MaybeError Device::CreateZeroBuffer() {
     BufferDescriptor zeroBufferDescriptor;
     zeroBufferDescriptor.usage = wgpu::BufferUsage::CopySrc | wgpu::BufferUsage::CopyDst;
@@ -418,7 +412,9 @@
                                                uint64_t destinationOffset,
                                                uint64_t size) {
     CommandRecordingContext* commandRecordingContext;
-    DAWN_TRY_ASSIGN(commandRecordingContext, GetPendingCommandContext(Device::SubmitMode::Passive));
+    DAWN_TRY_ASSIGN(
+        commandRecordingContext,
+        ToBackend(GetQueue())->GetPendingCommandContext(QueueBase::SubmitMode::Passive));
 
     Buffer* dstBuffer = ToBackend(destination);
 
@@ -454,7 +450,9 @@
                                                 const TextureCopy& dst,
                                                 const Extent3D& copySizePixels) {
     CommandRecordingContext* commandContext;
-    DAWN_TRY_ASSIGN(commandContext, GetPendingCommandContext(Device::SubmitMode::Passive));
+    DAWN_TRY_ASSIGN(
+        commandContext,
+        ToBackend(GetQueue())->GetPendingCommandContext(QueueBase::SubmitMode::Passive));
     Texture* texture = ToBackend(dst.texture.Get());
 
     SubresourceRange range = GetSubresourcesAffectedByCopy(dst, copySizePixels);
diff --git a/src/dawn/native/d3d12/DeviceD3D12.h b/src/dawn/native/d3d12/DeviceD3D12.h
index 614fcc6..12f37fa 100644
--- a/src/dawn/native/d3d12/DeviceD3D12.h
+++ b/src/dawn/native/d3d12/DeviceD3D12.h
@@ -85,9 +85,6 @@
 
     const PlatformFunctions* GetFunctions() const;
 
-    ResultOrError<CommandRecordingContext*> GetPendingCommandContext(
-        Device::SubmitMode submitMode = Device::SubmitMode::Normal);
-
     MaybeError ClearBufferToZero(CommandRecordingContext* commandContext,
                                  BufferBase* destination,
                                  uint64_t destinationOffset,
diff --git a/src/dawn/native/d3d12/TextureD3D12.cpp b/src/dawn/native/d3d12/TextureD3D12.cpp
index 5753552..6e9c693 100644
--- a/src/dawn/native/d3d12/TextureD3D12.cpp
+++ b/src/dawn/native/d3d12/TextureD3D12.cpp
@@ -324,7 +324,7 @@
     if (applyForceClearCopyableDepthStencilTextureOnCreationToggle ||
         device->IsToggleEnabled(Toggle::NonzeroClearResourcesOnCreationForTesting)) {
         CommandRecordingContext* commandContext;
-        DAWN_TRY_ASSIGN(commandContext, device->GetPendingCommandContext());
+        DAWN_TRY_ASSIGN(commandContext, ToBackend(device->GetQueue())->GetPendingCommandContext());
         ClearValue clearValue =
             device->IsToggleEnabled(Toggle::NonzeroClearResourcesOnCreationForTesting)
                 ? ClearValue::NonZero
diff --git a/src/dawn/native/metal/BufferMTL.mm b/src/dawn/native/metal/BufferMTL.mm
index 5cc2263..d9d0eb4 100644
--- a/src/dawn/native/metal/BufferMTL.mm
+++ b/src/dawn/native/metal/BufferMTL.mm
@@ -34,6 +34,7 @@
 #include "dawn/native/CommandBuffer.h"
 #include "dawn/native/metal/CommandRecordingContext.h"
 #include "dawn/native/metal/DeviceMTL.h"
+#include "dawn/native/metal/QueueMTL.h"
 #include "dawn/native/metal/UtilsMetal.h"
 
 #include <limits>
@@ -129,7 +130,7 @@
     if (GetDevice()->IsToggleEnabled(Toggle::NonzeroClearResourcesOnCreationForTesting) &&
         !mappedAtCreation) {
         CommandRecordingContext* commandContext =
-            ToBackend(GetDevice())->GetPendingCommandContext();
+            ToBackend(GetDevice()->GetQueue())->GetPendingCommandContext();
         ClearBuffer(commandContext, uint8_t(1u));
     }
 
@@ -141,7 +142,7 @@
             uint64_t clearOffset = GetAllocatedSize() - clearSize;
 
             CommandRecordingContext* commandContext =
-                ToBackend(GetDevice())->GetPendingCommandContext();
+                ToBackend(GetDevice()->GetQueue())->GetPendingCommandContext();
             ClearBuffer(commandContext, 0, clearOffset, clearSize);
         }
     }
@@ -196,7 +197,8 @@
 }
 
 MaybeError Buffer::MapAsyncImpl(wgpu::MapMode mode, size_t offset, size_t size) {
-    CommandRecordingContext* commandContext = ToBackend(GetDevice())->GetPendingCommandContext();
+    CommandRecordingContext* commandContext =
+        ToBackend(GetDevice()->GetQueue())->GetPendingCommandContext();
     EnsureDataInitialized(commandContext);
 
     return {};
diff --git a/src/dawn/native/metal/DeviceMTL.h b/src/dawn/native/metal/DeviceMTL.h
index 0bfa76d..fa40bbb 100644
--- a/src/dawn/native/metal/DeviceMTL.h
+++ b/src/dawn/native/metal/DeviceMTL.h
@@ -62,10 +62,6 @@
 
     id<MTLDevice> GetMTLDevice() const;
 
-    // TODO(dawn:1413) Use the metal::Queue directly instead of this proxy method.
-    CommandRecordingContext* GetPendingCommandContext(
-        Device::SubmitMode submitMode = Device::SubmitMode::Normal);
-
     MaybeError CopyFromStagingToBufferImpl(BufferBase* source,
                                            uint64_t sourceOffset,
                                            BufferBase* destination,
diff --git a/src/dawn/native/metal/DeviceMTL.mm b/src/dawn/native/metal/DeviceMTL.mm
index 0f10c8c..2ac4c5f 100644
--- a/src/dawn/native/metal/DeviceMTL.mm
+++ b/src/dawn/native/metal/DeviceMTL.mm
@@ -315,10 +315,6 @@
     return mMtlDevice.Get();
 }
 
-CommandRecordingContext* Device::GetPendingCommandContext(Device::SubmitMode submitMode) {
-    return ToBackend(GetQueue())->GetPendingCommandContext(submitMode);
-}
-
 MaybeError Device::CopyFromStagingToBufferImpl(BufferBase* source,
                                                uint64_t sourceOffset,
                                                BufferBase* destination,
@@ -330,12 +326,13 @@
 
     ToBackend(destination)
         ->EnsureDataInitializedAsDestination(
-            GetPendingCommandContext(DeviceBase::SubmitMode::Passive), destinationOffset, size);
+            ToBackend(GetQueue())->GetPendingCommandContext(QueueBase::SubmitMode::Passive),
+            destinationOffset, size);
 
     id<MTLBuffer> uploadBuffer = ToBackend(source)->GetMTLBuffer();
     Buffer* buffer = ToBackend(destination);
     buffer->TrackUsage();
-    [GetPendingCommandContext(DeviceBase::SubmitMode::Passive)->EnsureBlit()
+    [ToBackend(GetQueue())->GetPendingCommandContext(QueueBase::SubmitMode::Passive)->EnsureBlit()
            copyFromBuffer:uploadBuffer
              sourceOffset:sourceOffset
                  toBuffer:buffer->GetMTLBuffer()
@@ -352,14 +349,16 @@
                                                 const TextureCopy& dst,
                                                 const Extent3D& copySizePixels) {
     Texture* texture = ToBackend(dst.texture.Get());
-    texture->SynchronizeTextureBeforeUse(GetPendingCommandContext());
+    texture->SynchronizeTextureBeforeUse(ToBackend(GetQueue())->GetPendingCommandContext());
     DAWN_TRY(EnsureDestinationTextureInitialized(
-        GetPendingCommandContext(DeviceBase::SubmitMode::Passive), texture, dst, copySizePixels));
+        ToBackend(GetQueue())->GetPendingCommandContext(QueueBase::SubmitMode::Passive), texture,
+        dst, copySizePixels));
 
-    RecordCopyBufferToTexture(GetPendingCommandContext(DeviceBase::SubmitMode::Passive),
-                              ToBackend(source)->GetMTLBuffer(), source->GetSize(),
-                              dataLayout.offset, dataLayout.bytesPerRow, dataLayout.rowsPerImage,
-                              texture, dst.mipLevel, dst.origin, dst.aspect, copySizePixels);
+    RecordCopyBufferToTexture(
+        ToBackend(GetQueue())->GetPendingCommandContext(QueueBase::SubmitMode::Passive),
+        ToBackend(source)->GetMTLBuffer(), source->GetSize(), dataLayout.offset,
+        dataLayout.bytesPerRow, dataLayout.rowsPerImage, texture, dst.mipLevel, dst.origin,
+        dst.aspect, copySizePixels);
     return {};
 }
 
diff --git a/src/dawn/native/metal/TextureMTL.mm b/src/dawn/native/metal/TextureMTL.mm
index 853e67d..86616d1 100644
--- a/src/dawn/native/metal/TextureMTL.mm
+++ b/src/dawn/native/metal/TextureMTL.mm
@@ -309,11 +309,11 @@
     DAWN_TRY(texture->InitializeAsInternalTexture(descriptor));
 
     if (device->IsToggleEnabled(Toggle::NonzeroClearResourcesOnCreationForTesting)) {
-        DAWN_TRY(texture->ClearTexture(device->GetPendingCommandContext(),
+        DAWN_TRY(texture->ClearTexture(ToBackend(device->GetQueue())->GetPendingCommandContext(),
                                        texture->GetAllSubresources(),
                                        TextureBase::ClearValue::NonZero));
     } else if (texture->ShouldKeepInitialized()) {
-        DAWN_TRY(texture->ClearTexture(device->GetPendingCommandContext(),
+        DAWN_TRY(texture->ClearTexture(ToBackend(device->GetQueue())->GetPendingCommandContext(),
                                        texture->GetAllSubresources(),
                                        TextureBase::ClearValue::Zero));
     }
diff --git a/src/dawn/native/vulkan/DeviceVk.cpp b/src/dawn/native/vulkan/DeviceVk.cpp
index 136f16d..151b123 100644
--- a/src/dawn/native/vulkan/DeviceVk.cpp
+++ b/src/dawn/native/vulkan/DeviceVk.cpp
@@ -568,7 +568,7 @@
     DAWN_ASSERT(size != 0);
 
     CommandRecordingContext* recordingContext =
-        ToBackend(GetQueue())->GetPendingRecordingContext(DeviceBase::SubmitMode::Passive);
+        ToBackend(GetQueue())->GetPendingRecordingContext(Queue::SubmitMode::Passive);
 
     ToBackend(destination)
         ->EnsureDataInitializedAsDestination(recordingContext, destinationOffset, size);
@@ -601,7 +601,7 @@
     // does an implicit availability, visibility and domain operation.
 
     CommandRecordingContext* recordingContext =
-        ToBackend(GetQueue())->GetPendingRecordingContext(DeviceBase::SubmitMode::Passive);
+        ToBackend(GetQueue())->GetPendingRecordingContext(Queue::SubmitMode::Passive);
 
     VkBufferImageCopy region = ComputeBufferImageCopyRegion(src, dst, copySizePixels);
     VkImageSubresourceLayers subresource = region.imageSubresource;
diff --git a/src/dawn/native/vulkan/QueueVk.cpp b/src/dawn/native/vulkan/QueueVk.cpp
index f25231c..44e2976 100644
--- a/src/dawn/native/vulkan/QueueVk.cpp
+++ b/src/dawn/native/vulkan/QueueVk.cpp
@@ -228,9 +228,9 @@
     return {};
 }
 
-CommandRecordingContext* Queue::GetPendingRecordingContext(Device::SubmitMode submitMode) {
+CommandRecordingContext* Queue::GetPendingRecordingContext(SubmitMode submitMode) {
     DAWN_ASSERT(mRecordingContext.commandBuffer != VK_NULL_HANDLE);
-    mRecordingContext.needsSubmit |= (submitMode == DeviceBase::SubmitMode::Normal);
+    mRecordingContext.needsSubmit |= (submitMode == SubmitMode::Normal);
     mRecordingContext.used = true;
     return &mRecordingContext;
 }
diff --git a/src/dawn/native/vulkan/QueueVk.h b/src/dawn/native/vulkan/QueueVk.h
index a4b5b22..51ee2a0 100644
--- a/src/dawn/native/vulkan/QueueVk.h
+++ b/src/dawn/native/vulkan/QueueVk.h
@@ -50,8 +50,7 @@
 
     VkQueue GetVkQueue() const;
 
-    CommandRecordingContext* GetPendingRecordingContext(
-        DeviceBase::SubmitMode submitMode = DeviceBase::SubmitMode::Normal);
+    CommandRecordingContext* GetPendingRecordingContext(SubmitMode submitMode = SubmitMode::Normal);
     MaybeError SplitRecordingContext(CommandRecordingContext* recordingContext);
     MaybeError SubmitPendingCommands();