Remove Adreno 200 support hacks

Signed-off-by: renderexpert <expert@renderconsulting.co.uk>
This commit is contained in:
renderexpert 2025-01-24 14:19:32 +00:00
parent e5e9fc69ae
commit bcab64f926
4 changed files with 2 additions and 24 deletions

View file

@ -32,20 +32,6 @@ void SupportManager::Init(ref_ptr<GraphicsContext> 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<std::string_view, 5> 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."));

View file

@ -26,7 +26,6 @@ public:
// reinitialization.
void Init(ref_ptr<GraphicsContext> 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;

View file

@ -118,10 +118,6 @@ VertexArrayBuffer::VertexArrayBuffer(uint32_t indexBufferSize, uint32_t dataBuff
, m_batcherHash(batcherHash)
{
m_indexBuffer = make_unique_dp<IndexBuffer>(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<GraphicsContext> context)
{
if (!m_moveToGpuOnBuild)
PreflushImpl(context);
PreflushImpl(context);
}
void VertexArrayBuffer::PreflushImpl(ref_ptr<GraphicsContext> context)
@ -191,7 +186,7 @@ void VertexArrayBuffer::RenderRange(ref_ptr<GraphicsContext> context,
void VertexArrayBuffer::Build(ref_ptr<GraphicsContext> context, ref_ptr<GpuProgram> program)
{
if (m_moveToGpuOnBuild && !m_isPreflushed)
if (!m_isPreflushed)
PreflushImpl(context);
if (!HasBuffers())

View file

@ -124,7 +124,6 @@ private:
drape_ptr<IndexBuffer> m_indexBuffer;
bool m_isPreflushed = false;
bool m_moveToGpuOnBuild = false;
bool m_isChanged = false;
BindingInfoArray m_bindingInfo;
uint8_t m_bindingInfoCount = 0;