Destroy mMonolithicPipelineCache before VkDevice

PipelineCache needs to use the VkDevice to destroy the VkPipelineCache.

Bug: 370343334
Change-Id: Ia987b741ca390f84ae2f079e5551f1a7bcf6bbaf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/215194
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@google.com>
diff --git a/src/dawn/native/vulkan/DeviceVk.cpp b/src/dawn/native/vulkan/DeviceVk.cpp
index c88d294..6fc69c7 100644
--- a/src/dawn/native/vulkan/DeviceVk.cpp
+++ b/src/dawn/native/vulkan/DeviceVk.cpp
@@ -927,6 +927,9 @@
     // to them are guaranteed to be finished executing.
     mRenderPassCache = nullptr;
 
+    // Destroy the VkPipelineCache before VkDevice.
+    mMonolithicPipelineCache = nullptr;
+
     // Delete all the remaining VkDevice child objects immediately since the GPU timeline is
     // finished.
     GetFencedDeleter()->Tick(kMaxExecutionSerial);