vulkan: select the same GPU which is used by GL

For the GPU hang and crashes, I found all those boxes have two GPUs.
One is discrete NVIDIA GPU and one is integrated INTEL GPU. Chrome uses
the discrete NVIDIA GPU for GL, but chooses INTEL GPU for vulkan. Since
all hangs and crashes have the same configuration. So I think the hang
and crash could be related. Try to fix the hang by using the same GPU
for both GL and Vulkan.

Bug: 1082095,1072413
Change-Id: I20a191b03c23e10d1617098c305e0ccf9c9142c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2200153
Reviewed-by: Vasiliy Telezhnikov <[email protected]>
Commit-Queue: Peng Huang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#768863}
diff --git a/gpu/vulkan/vulkan_implementation.cc b/gpu/vulkan/vulkan_implementation.cc
index 2dde313..cc892c58 100644
--- a/gpu/vulkan/vulkan_implementation.cc
+++ b/gpu/vulkan/vulkan_implementation.cc
@@ -22,7 +22,8 @@
 
 std::unique_ptr<VulkanDeviceQueue> CreateVulkanDeviceQueue(
     VulkanImplementation* vulkan_implementation,
-    uint32_t option) {
+    uint32_t option,
+    const GPUInfo* gpu_info) {
   auto device_queue = std::make_unique<VulkanDeviceQueue>(
       vulkan_implementation->GetVulkanInstance()->vk_instance(),
       vulkan_implementation->enforce_protected_memory());
@@ -34,7 +35,8 @@
   std::vector<const char*> optional_extensions =
       vulkan_implementation->GetOptionalDeviceExtensions();
   if (!device_queue->Initialize(
-          option, vulkan_implementation->GetVulkanInstance()->vulkan_info(),
+          option, gpu_info,
+          vulkan_implementation->GetVulkanInstance()->vulkan_info(),
           std::move(required_extensions), std::move(optional_extensions),
           vulkan_implementation->allow_protected_memory(), callback)) {
     device_queue->Destroy();