aboutsummaryrefslogtreecommitdiff
path: root/system/OpenglSystemCommon/HostConnection.cpp
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2022-01-14 15:29:51 -0800
committerGurchetan Singh <gurchetansingh@google.com>2022-01-18 16:28:14 -0800
commit2522b121a27a969a14a26f3d53c9b5711142b160 (patch)
tree6c017743929025241c63a2df130962a67bfca690 /system/OpenglSystemCommon/HostConnection.cpp
parent8fb06428b96301f31e26807f962c298a49c37113 (diff)
downloadgoldfish-opengl-2522b121a27a969a14a26f3d53c9b5711142b160.tar.gz
goldfish-opengl: use virtio-gpu address space on Linux
Probably is a requirement at this point. BUG=202552093 TEST=run vulkaninfo Change-Id: I369645a8be1e94dd4306aeaa3173895b0ad6e564
Diffstat (limited to 'system/OpenglSystemCommon/HostConnection.cpp')
-rw-r--r--system/OpenglSystemCommon/HostConnection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/OpenglSystemCommon/HostConnection.cpp b/system/OpenglSystemCommon/HostConnection.cpp
index d1cc78b4..c4124c7a 100644
--- a/system/OpenglSystemCommon/HostConnection.cpp
+++ b/system/OpenglSystemCommon/HostConnection.cpp
@@ -104,7 +104,7 @@ using goldfish_vk::VkEncoder;
static HostConnectionType getConnectionTypeFromProperty() {
#ifdef __Fuchsia__
return HOST_CONNECTION_ADDRESS_SPACE;
-#else
+#elif __ANDROID__
char transportValue[PROPERTY_VALUE_MAX] = "";
do {
@@ -127,6 +127,8 @@ static HostConnectionType getConnectionTypeFromProperty() {
if (!strcmp("virtio-gpu-asg", transportValue)) return HOST_CONNECTION_VIRTIO_GPU_ADDRESS_SPACE;
return HOST_CONNECTION_QEMU_PIPE;
+#else
+ return HOST_CONNECTION_VIRTIO_GPU_ADDRESS_SPACE;
#endif
}