mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -51,22 +51,22 @@ void SupportManager::Init(ref_ptr<GraphicsContext> context)
|
||||
m_maxLineWidth = std::max(props.limits.lineWidthRange[0], props.limits.lineWidthRange[1]);
|
||||
m_maxTextureSize = vulkanContext->GetGpuProperties().limits.maxImageDimension2D;
|
||||
}
|
||||
LOG(LINFO, ("Max line width =", m_maxLineWidth,"| Max texture size =", m_maxTextureSize));
|
||||
LOG(LINFO, ("Max line width =", m_maxLineWidth, "| Max texture size =", m_maxTextureSize));
|
||||
|
||||
// Set up default antialiasing value.
|
||||
// Turn off AA for a while by energy-saving issues.
|
||||
// bool val;
|
||||
// if (!settings::Get(kSupportedAntialiasing, val))
|
||||
// {
|
||||
//#ifdef OMIM_OS_ANDROID
|
||||
// std::vector<std::string> const models = {"Mali-G71", "Mali-T880", "Adreno (TM) 540",
|
||||
// "Adreno (TM) 530", "Adreno (TM) 430"};
|
||||
// m_isAntialiasingEnabledByDefault = base::IsExist(models, m_rendererName);
|
||||
//#else
|
||||
// m_isAntialiasingEnabledByDefault = true;
|
||||
//#endif
|
||||
// settings::Set(kSupportedAntialiasing, m_isAntialiasingEnabledByDefault);
|
||||
// }
|
||||
// bool val;
|
||||
// if (!settings::Get(kSupportedAntialiasing, val))
|
||||
// {
|
||||
// #ifdef OMIM_OS_ANDROID
|
||||
// std::vector<std::string> const models = {"Mali-G71", "Mali-T880", "Adreno (TM) 540",
|
||||
// "Adreno (TM) 530", "Adreno (TM) 430"};
|
||||
// m_isAntialiasingEnabledByDefault = base::IsExist(models, m_rendererName);
|
||||
// #else
|
||||
// m_isAntialiasingEnabledByDefault = true;
|
||||
// #endif
|
||||
// settings::Set(kSupportedAntialiasing, m_isAntialiasingEnabledByDefault);
|
||||
// }
|
||||
|
||||
m_isInitialized = true;
|
||||
}
|
||||
@@ -84,8 +84,8 @@ bool SupportManager::IsVulkanForbidden()
|
||||
return forbidden;
|
||||
}
|
||||
|
||||
bool SupportManager::IsVulkanForbidden(std::string const & deviceName, Version apiVersion,
|
||||
Version driverVersion, bool isCustomROM, int sdkVersion)
|
||||
bool SupportManager::IsVulkanForbidden(std::string const & deviceName, Version apiVersion, Version driverVersion,
|
||||
bool isCustomROM, int sdkVersion)
|
||||
{
|
||||
LOG(LINFO, ("Device =", deviceName, "API =", apiVersion, "Driver =", driverVersion, "SDK =", sdkVersion));
|
||||
|
||||
@@ -98,26 +98,26 @@ bool SupportManager::IsVulkanForbidden(std::string const & deviceName, Version a
|
||||
}
|
||||
|
||||
static char const * kBannedDevices[] = {
|
||||
/// @todo Should we ban all PowerVR Rogue devices?
|
||||
// https://github.com/organicmaps/organicmaps/issues/1379
|
||||
"PowerVR Rogue G6110", "PowerVR Rogue GE8100", "PowerVR Rogue GE8300",
|
||||
// https://github.com/organicmaps/organicmaps/issues/5539
|
||||
"Adreno (TM) 418",
|
||||
/// @todo Should we ban all PowerVR Rogue devices?
|
||||
// https://github.com/organicmaps/organicmaps/issues/1379
|
||||
"PowerVR Rogue G6110",
|
||||
"PowerVR Rogue GE8100",
|
||||
"PowerVR Rogue GE8300",
|
||||
// https://github.com/organicmaps/organicmaps/issues/5539
|
||||
"Adreno (TM) 418",
|
||||
};
|
||||
|
||||
for (auto const d : kBannedDevices)
|
||||
{
|
||||
if (d == deviceName)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isCustomROM)
|
||||
{
|
||||
// Crash on LineageOS, stock Android works ok (with same api = 1.0.82; driver = 28.0.0).
|
||||
// https://github.com/organicmaps/organicmaps/issues/2739
|
||||
// https://github.com/organicmaps/organicmaps/issues/9255
|
||||
// SM-G930F (S7, heroltexx, hero2ltexx). Crash on vkCreateSwapchainKHR and we don't even get to SupportManager::Init.
|
||||
// SM-G920F (S6)
|
||||
// SM-G930F (S7, heroltexx, hero2ltexx). Crash on vkCreateSwapchainKHR and we don't even get to
|
||||
// SupportManager::Init. SM-G920F (S6)
|
||||
if (deviceName.starts_with("Mali-T"))
|
||||
return true;
|
||||
}
|
||||
@@ -142,18 +142,14 @@ bool SupportManager::IsVulkanForbidden(std::string const & deviceName, Version a
|
||||
};
|
||||
|
||||
for (auto const & c : kBannedConfigurations)
|
||||
{
|
||||
if (c.m_deviceName == deviceName && c.m_apiVersion == apiVersion && c.m_driverVersion == driverVersion)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Finally, the result of this function is used in GraphicsContext::HasPartialTextureUpdates.
|
||||
bool SupportManager::IsVulkanTexturePartialUpdateBuggy(int sdkVersion,
|
||||
std::string const & deviceName,
|
||||
Version apiVersion,
|
||||
Version driverVersion)
|
||||
bool SupportManager::IsVulkanTexturePartialUpdateBuggy(int sdkVersion, std::string const & deviceName,
|
||||
Version apiVersion, Version driverVersion)
|
||||
{
|
||||
/// @todo Assume that all Android 10+ (API 29) doesn't support Vulkan partial texture updates.
|
||||
/// Can't say for sure is it right or not ..
|
||||
@@ -166,10 +162,8 @@ bool SupportManager::IsVulkanTexturePartialUpdateBuggy(int sdkVersion,
|
||||
};
|
||||
|
||||
for (auto const & c : kBadConfigurations)
|
||||
{
|
||||
if (c.m_deviceName == deviceName && c.m_apiVersion == apiVersion && c.m_driverVersion == driverVersion)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user