[fuchsia] Connect to devices using /loader-gpu-devices

/loader-gpu-devices is proxied by the vulkan loader to the loader
service, and includes all GPU devices required by ICDs. This helps
ensure applications don't accidentally block a service that they need to
operate.

Bug: fuchsia:75671
Change-Id: I33bdbff75389ce2b8225ea89c29869aec040a134
diff --git a/BUILD.gn b/BUILD.gn
index f372452..ac0b14a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -179,8 +179,8 @@
     ]
 
     defines += [
-      "QEMU_PIPE_PATH=\"/dev/class/goldfish-pipe/000\"",
-      "GOLDFISH_ADDRESS_SPACE_DEVICE_NAME=\"/dev/class/goldfish-address-space/000\"",
+      "QEMU_PIPE_PATH=\"/loader-gpu-devices/class/goldfish-pipe/000\"",
+      "GOLDFISH_ADDRESS_SPACE_DEVICE_NAME=\"/loader-gpu-devices/class/goldfish-address-space/000\"",
     ]
   }
 }
diff --git a/system/vulkan_enc/ResourceTracker.cpp b/system/vulkan_enc/ResourceTracker.cpp
index bab8b7f..9447dae 100644
--- a/system/vulkan_enc/ResourceTracker.cpp
+++ b/system/vulkan_enc/ResourceTracker.cpp
@@ -987,7 +987,7 @@
 #ifdef VK_USE_PLATFORM_FUCHSIA
         if (mFeatureInfo->hasVulkan) {
             fidl::ClientEnd<fuchsia_hardware_goldfish::ControlDevice> channel{
-                zx::channel(GetConnectToServiceFunction()("/dev/class/goldfish-control/000"))};
+                zx::channel(GetConnectToServiceFunction()("/loader-gpu-devices/class/goldfish-control/000"))};
             if (!channel) {
                 ALOGE("failed to open control device");
                 abort();
OSZAR »