Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/drape
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2019-06-18 15:03:14 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2019-06-19 12:19:47 +0300
commit5fedb4350ff00e3859b347052fee1740f4a6c8f4 (patch)
treefcac2fc59b4a600eb5daa94fc819f66eab370050 /drape
parentc8df67d5b395991433b5551cf10991320e6435de (diff)
[vulkan] Some unsupported GPU/Driver combinations forbidden
Diffstat (limited to 'drape')
-rw-r--r--drape/support_manager.cpp27
-rw-r--r--drape/support_manager.hpp5
2 files changed, 32 insertions, 0 deletions
diff --git a/drape/support_manager.cpp b/drape/support_manager.cpp
index b9d0519acf..0876cf913c 100644
--- a/drape/support_manager.cpp
+++ b/drape/support_manager.cpp
@@ -109,6 +109,33 @@ bool SupportManager::IsVulkanForbidden() const
return forbidden;
}
+bool SupportManager::IsVulkanForbidden(std::string const & deviceName,
+ Version apiVersion, Version driverVersion) const
+{
+ // On these configurations we've detected fatal driver-specific Vulkan errors.
+ struct Configuration
+ {
+ std::string m_deviceName;
+ Version m_apiVersion;
+ Version m_driverVersion;
+ };
+ static std::vector<Configuration> const kBannedConfigurations = {
+ {"Adreno (TM) 506", {1, 0, 31}, {42, 264, 975}},
+ {"Adreno (TM) 506", {1, 1, 66}, {512, 313, 0}},
+ {"Adreno (TM) 530", {1, 1, 66}, {512, 313, 0}},
+ };
+
+ for (auto const & c : kBannedConfigurations)
+ {
+ if (c.m_deviceName == deviceName && c.m_apiVersion == apiVersion &&
+ c.m_driverVersion == driverVersion)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
SupportManager & SupportManager::Instance()
{
static SupportManager manager;
diff --git a/drape/support_manager.hpp b/drape/support_manager.hpp
index fb7b778afc..96e7b78267 100644
--- a/drape/support_manager.hpp
+++ b/drape/support_manager.hpp
@@ -5,6 +5,7 @@
#include "base/macros.hpp"
+#include <array>
#include <cstdint>
#include <mutex>
#include <string>
@@ -35,7 +36,11 @@ public:
// These functions can be used without manager initialization.
void ForbidVulkan();
+
+ using Version = std::array<uint32_t, 3>;
bool IsVulkanForbidden() const;
+ bool IsVulkanForbidden(std::string const & deviceName,
+ Version apiVersion, Version driverVersion) const;
private:
SupportManager() = default;