Remove duplicate interop support variable
.. from the FrameBffer, it can be retrieved and used from
the emulation objects.
Bug: N/A
Test: build
Change-Id: I4f78d2794868de796a6cee69d656a702d11588d6
diff --git a/host/FrameBuffer.cpp b/host/FrameBuffer.cpp
index 4dc0898..c8cdcaa 100644
--- a/host/FrameBuffer.cpp
+++ b/host/FrameBuffer.cpp
@@ -463,16 +463,13 @@
}
#endif
}
- // TODO: 0-copy gl interop on swiftshader vk
+
if (android::base::getEnvironmentVariable("ANDROID_EMU_VK_ICD") == "lavapipe"
|| android::base::getEnvironmentVariable("ANDROID_EMU_VK_ICD") == "swiftshader") {
vulkanInteropSupported = false;
GL_LOG("vk icd software rendering, disable interop");
}
- fb->m_vulkanInteropSupported = vulkanInteropSupported;
- GL_LOG("interop? %d", fb->m_vulkanInteropSupported);
-
#if GFXSTREAM_ENABLE_HOST_GLES
if (vulkanInteropSupported && fb->m_emulationGl && fb->m_emulationGl->isMesa()) {
// Mesa currently expects dedicated allocations for external memory sharing
@@ -481,8 +478,8 @@
}
#endif
- GL_LOG("glvk interop final: %d", fb->m_vulkanInteropSupported);
- vkEmulationFeatures.glInteropSupported = fb->m_vulkanInteropSupported;
+ GL_LOG("glvk interop final: %d", vulkanInteropSupported);
+ vkEmulationFeatures.glInteropSupported = vulkanInteropSupported;
if (fb->m_emulationVk && fb->m_features.Vulkan.enabled) {
fb->m_emulationVk->initFeatures(std::move(vkEmulationFeatures));
diff --git a/host/FrameBuffer.h b/host/FrameBuffer.h
index 3f40aba..dba4535 100644
--- a/host/FrameBuffer.h
+++ b/host/FrameBuffer.h
@@ -411,7 +411,6 @@
void registerVulkanInstance(uint64_t id, const char* appName) const;
void unregisterVulkanInstance(uint64_t id) const;
- bool isVulkanInteropSupported() const { return m_vulkanInteropSupported; }
bool isVulkanEnabled() const { return m_vulkanEnabled; }
// Saves a screenshot of the previous frame.
@@ -860,7 +859,6 @@
android::base::WorkerProcessingResult postWorkerFunc(Post& post);
std::future<void> sendPostWorkerCmd(Post post);
- bool m_vulkanInteropSupported = false;
bool m_vulkanEnabled = false;
// Whether the guest manages ColorBuffer lifetime
// so we don't need refcounting on the host side.