diff options
| author | Lingfeng Yang <lfy@google.com> | 2020-02-04 07:04:57 -0800 |
|---|---|---|
| committer | Lingfeng Yang <lfy@google.com> | 2020-02-04 10:12:57 -0800 |
| commit | fc179c51f03aa2b577e5d26594ad78cf3bea764b (patch) | |
| tree | 12f15723d1aa7eee4a61179d8af7fd18c6d113ca /system/OpenglSystemCommon | |
| parent | d90cefdc5fdcece6f107ccbd1f139e5659c96bb8 (diff) | |
| download | device_generic_goldfish-opengl-fc179c51f03aa2b577e5d26594ad78cf3bea764b.tar.gz device_generic_goldfish-opengl-fc179c51f03aa2b577e5d26594ad78cf3bea764b.tar.bz2 device_generic_goldfish-opengl-fc179c51f03aa2b577e5d26594ad78cf3bea764b.zip | |
Put handle ignoring behind a flag
bug: 145153816
Change-Id: If64ce16415b4eb4f49a2628c98c252b9fdda2d2e
Diffstat (limited to 'system/OpenglSystemCommon')
| -rw-r--r-- | system/OpenglSystemCommon/EmulatorFeatureInfo.h | 5 | ||||
| -rw-r--r-- | system/OpenglSystemCommon/HostConnection.cpp | 8 | ||||
| -rw-r--r-- | system/OpenglSystemCommon/HostConnection.h | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/system/OpenglSystemCommon/EmulatorFeatureInfo.h b/system/OpenglSystemCommon/EmulatorFeatureInfo.h index 13bd8ad8..e20c129e 100644 --- a/system/OpenglSystemCommon/EmulatorFeatureInfo.h +++ b/system/OpenglSystemCommon/EmulatorFeatureInfo.h @@ -88,6 +88,9 @@ static const char kVulkanNullOptionalStrings[] = "ANDROID_EMU_vulkan_null_option // Vulkan create resources with requirements static const char kVulkanCreateResourcesWithRequirements[] = "ANDROID_EMU_vulkan_create_resources_with_requirements"; +// Vulkan ignored handles +static const char kVulkanIgnoredHandles[] = "ANDROID_EMU_vulkan_ignored_handles"; + // YUV host cache static const char kYUVCache[] = "ANDROID_EMU_YUV_Cache"; @@ -107,6 +110,7 @@ struct EmulatorFeatureInfo { hasDeferredVulkanCommands(false), hasVulkanNullOptionalStrings(false), hasVulkanCreateResourcesWithRequirements(false), + hasVulkanIgnoredHandles(false), hasYUVCache (false), hasAsyncUnmapBuffer (false) { } @@ -119,6 +123,7 @@ struct EmulatorFeatureInfo { bool hasDeferredVulkanCommands; bool hasVulkanNullOptionalStrings; bool hasVulkanCreateResourcesWithRequirements; + bool hasVulkanIgnoredHandles; bool hasYUVCache; bool hasAsyncUnmapBuffer; }; diff --git a/system/OpenglSystemCommon/HostConnection.cpp b/system/OpenglSystemCommon/HostConnection.cpp index b72bc8c1..f69b1d5f 100644 --- a/system/OpenglSystemCommon/HostConnection.cpp +++ b/system/OpenglSystemCommon/HostConnection.cpp @@ -610,6 +610,7 @@ ExtendedRCEncoderContext *HostConnection::rcEncoder() queryAndSetDeferredVulkanCommandsSupport(m_rcEnc); queryAndSetVulkanNullOptionalStringsSupport(m_rcEnc); queryAndSetVulkanCreateResourcesWithRequirementsSupport(m_rcEnc); + queryAndSetVulkanIgnoredHandles(m_rcEnc); queryAndSetYUVCache(m_rcEnc); queryAndSetAsyncUnmapBuffer(m_rcEnc); if (m_processPipe) { @@ -788,6 +789,13 @@ void HostConnection::queryAndSetVulkanCreateResourcesWithRequirementsSupport(Ext } } +void HostConnection::queryAndSetVulkanIgnoredHandles(ExtendedRCEncoderContext* rcEnc) { + std::string glExtensions = queryGLExtensions(rcEnc); + if (glExtensions.find(kVulkanIgnoredHandles) != std::string::npos) { + rcEnc->featureInfo()->hasVulkanIgnoredHandles = true; + } +} + void HostConnection::queryAndSetYUVCache(ExtendedRCEncoderContext* rcEnc) { std::string glExtensions = queryGLExtensions(rcEnc); if (glExtensions.find(kYUVCache) != std::string::npos) { diff --git a/system/OpenglSystemCommon/HostConnection.h b/system/OpenglSystemCommon/HostConnection.h index 501c254b..0f262a3b 100644 --- a/system/OpenglSystemCommon/HostConnection.h +++ b/system/OpenglSystemCommon/HostConnection.h @@ -200,6 +200,7 @@ private: void queryAndSetDeferredVulkanCommandsSupport(ExtendedRCEncoderContext *rcEnc); void queryAndSetVulkanNullOptionalStringsSupport(ExtendedRCEncoderContext *rcEnc); void queryAndSetVulkanCreateResourcesWithRequirementsSupport(ExtendedRCEncoderContext *rcEnc); + void queryAndSetVulkanIgnoredHandles(ExtendedRCEncoderContext *rcEnc); void queryAndSetYUVCache(ExtendedRCEncoderContext *mrcEnc); void queryAndSetAsyncUnmapBuffer(ExtendedRCEncoderContext *rcEnc); |
