From bcab64f926d0899f637be09ee078b5ce53816919 Mon Sep 17 00:00:00 2001 From: renderexpert Date: Fri, 24 Jan 2025 14:19:32 +0000 Subject: [PATCH] Remove Adreno 200 support hacks Signed-off-by: renderexpert --- drape/support_manager.cpp | 14 -------------- drape/support_manager.hpp | 2 -- drape/vertex_array_buffer.cpp | 9 ++------- drape/vertex_array_buffer.hpp | 1 - 4 files changed, 2 insertions(+), 24 deletions(-) diff --git a/drape/support_manager.cpp b/drape/support_manager.cpp index a2e8b739a2..cc71c30010 100644 --- a/drape/support_manager.cpp +++ b/drape/support_manager.cpp @@ -32,20 +32,6 @@ void SupportManager::Init(ref_ptr context) m_rendererVersion = context->GetRendererVersion(); LOG(LINFO, ("Renderer =", m_rendererName, "| Api =", context->GetApiVersion(), "| Version =", m_rendererVersion)); - if (m_rendererName.find("Adreno") != std::string::npos) - { - std::array constexpr models = { "200", "203", "205", "220", "225" }; - for (auto const & model : models) - { - if (m_rendererName.find(model) != std::string::npos) - { - LOG(LINFO, ("Adreno 200 device detected.")); - m_isAdreno200 = true; - break; - } - } - } - m_isTegra = (m_rendererName.find("Tegra") != std::string::npos); if (m_isTegra) LOG(LINFO, ("NVidia Tegra device detected.")); diff --git a/drape/support_manager.hpp b/drape/support_manager.hpp index 8ed4d9fc2d..e2e8e09aa0 100644 --- a/drape/support_manager.hpp +++ b/drape/support_manager.hpp @@ -26,7 +26,6 @@ public: // reinitialization. void Init(ref_ptr context); - bool IsAdreno200Device() const { return m_isAdreno200; } bool IsTegraDevice() const { return m_isTegra; } bool IsAntialiasingEnabledByDefault() const { return m_isAntialiasingEnabledByDefault; } @@ -49,7 +48,6 @@ private: std::string m_rendererName; std::string m_rendererVersion; - bool m_isAdreno200 = false; bool m_isTegra = false; bool m_isAntialiasingEnabledByDefault = false; diff --git a/drape/vertex_array_buffer.cpp b/drape/vertex_array_buffer.cpp index 17f528d3f0..8c417bfcde 100644 --- a/drape/vertex_array_buffer.cpp +++ b/drape/vertex_array_buffer.cpp @@ -118,10 +118,6 @@ VertexArrayBuffer::VertexArrayBuffer(uint32_t indexBufferSize, uint32_t dataBuff , m_batcherHash(batcherHash) { m_indexBuffer = make_unique_dp(indexBufferSize); - - // Adreno 200 GPUs aren't able to share OpenGL resources between 2 OGL-contexts correctly, - // so we have to create and destroy VBO on one context. - m_moveToGpuOnBuild = SupportManager::Instance().IsAdreno200Device(); } VertexArrayBuffer::~VertexArrayBuffer() @@ -134,8 +130,7 @@ VertexArrayBuffer::~VertexArrayBuffer() void VertexArrayBuffer::Preflush(ref_ptr context) { - if (!m_moveToGpuOnBuild) - PreflushImpl(context); + PreflushImpl(context); } void VertexArrayBuffer::PreflushImpl(ref_ptr context) @@ -191,7 +186,7 @@ void VertexArrayBuffer::RenderRange(ref_ptr context, void VertexArrayBuffer::Build(ref_ptr context, ref_ptr program) { - if (m_moveToGpuOnBuild && !m_isPreflushed) + if (!m_isPreflushed) PreflushImpl(context); if (!HasBuffers()) diff --git a/drape/vertex_array_buffer.hpp b/drape/vertex_array_buffer.hpp index 34a7277049..bc4f69fccc 100644 --- a/drape/vertex_array_buffer.hpp +++ b/drape/vertex_array_buffer.hpp @@ -124,7 +124,6 @@ private: drape_ptr m_indexBuffer; bool m_isPreflushed = false; - bool m_moveToGpuOnBuild = false; bool m_isChanged = false; BindingInfoArray m_bindingInfo; uint8_t m_bindingInfoCount = 0;