Remove Tegra support hacks

Signed-off-by: renderexpert <expert@renderconsulting.co.uk>
This commit is contained in:
renderexpert 2025-01-24 14:30:29 +00:00
parent bcab64f926
commit 824db45311
3 changed files with 2 additions and 20 deletions

View file

@ -23,26 +23,14 @@ GLGpuProgram::GLGpuProgram(std::string const & programName,
if (!GLFunctions::glLinkProgram(m_programID, errorLog))
LOG(LERROR, ("Program ", programName, " link error = ", errorLog));
// On Tegra3 glGetActiveUniform isn't work if you detach shaders after linking.
LoadUniformLocations();
// On Tegra2 we cannot detach shaders at all.
// https://devtalk.nvidia.com/default/topic/528941/alpha-blending-not-working-on-t20-and-t30-under-ice-cream-sandwich/
if (!SupportManager::Instance().IsTegraDevice())
{
GLFunctions::glDetachShader(m_programID, m_vertexShader->GetID());
GLFunctions::glDetachShader(m_programID, m_fragmentShader->GetID());
}
GLFunctions::glDetachShader(m_programID, m_vertexShader->GetID());
GLFunctions::glDetachShader(m_programID, m_fragmentShader->GetID());
}
GLGpuProgram::~GLGpuProgram()
{
if (SupportManager::Instance().IsTegraDevice())
{
GLFunctions::glDetachShader(m_programID, m_vertexShader->GetID());
GLFunctions::glDetachShader(m_programID, m_fragmentShader->GetID());
}
GLFunctions::glDeleteProgram(m_programID);
}

View file

@ -32,10 +32,6 @@ void SupportManager::Init(ref_ptr<GraphicsContext> context)
m_rendererVersion = context->GetRendererVersion();
LOG(LINFO, ("Renderer =", m_rendererName, "| Api =", context->GetApiVersion(), "| Version =", m_rendererVersion));
m_isTegra = (m_rendererName.find("Tegra") != std::string::npos);
if (m_isTegra)
LOG(LINFO, ("NVidia Tegra device detected."));
auto const apiVersion = context->GetApiVersion();
if (apiVersion == dp::ApiVersion::OpenGLES3)
{

View file

@ -26,7 +26,6 @@ public:
// reinitialization.
void Init(ref_ptr<GraphicsContext> context);
bool IsTegraDevice() const { return m_isTegra; }
bool IsAntialiasingEnabledByDefault() const { return m_isAntialiasingEnabledByDefault; }
float GetMaxLineWidth() const { return m_maxLineWidth; }
@ -48,7 +47,6 @@ private:
std::string m_rendererName;
std::string m_rendererVersion;
bool m_isTegra = false;
bool m_isAntialiasingEnabledByDefault = false;
float m_maxLineWidth = 1;