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
committed by Konstantin Pastbin
parent 897d7a253d
commit a406462549
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(); m_rendererVersion = context->GetRendererVersion();
LOG(LINFO, ("Renderer =", m_rendererName, "| Api =", context->GetApiVersion(), "| Version =", m_rendererVersion)); 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); m_isTegra = (m_rendererName.find("Tegra") != std::string::npos);
if (m_isTegra) if (m_isTegra)
LOG(LINFO, ("NVidia Tegra device detected.")); LOG(LINFO, ("NVidia Tegra device detected."));

View File

@@ -26,7 +26,6 @@ public:
// reinitialization. // reinitialization.
void Init(ref_ptr<GraphicsContext> context); void Init(ref_ptr<GraphicsContext> context);
bool IsAdreno200Device() const { return m_isAdreno200; }
bool IsTegraDevice() const { return m_isTegra; } bool IsTegraDevice() const { return m_isTegra; }
bool IsAntialiasingEnabledByDefault() const { return m_isAntialiasingEnabledByDefault; } bool IsAntialiasingEnabledByDefault() const { return m_isAntialiasingEnabledByDefault; }
@@ -50,7 +49,6 @@ private:
std::string m_rendererName; std::string m_rendererName;
std::string m_rendererVersion; std::string m_rendererVersion;
bool m_isAdreno200 = false;
bool m_isTegra = false; bool m_isTegra = false;
bool m_isAntialiasingEnabledByDefault = false; bool m_isAntialiasingEnabledByDefault = false;

View File

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

View File

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