mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Remove Tegra support hacks
Signed-off-by: renderexpert <expert@renderconsulting.co.uk>
This commit is contained in:
committed by
Konstantin Pastbin
parent
a406462549
commit
9b3507211f
@@ -23,26 +23,14 @@ GLGpuProgram::GLGpuProgram(std::string const & programName,
|
|||||||
if (!GLFunctions::glLinkProgram(m_programID, errorLog))
|
if (!GLFunctions::glLinkProgram(m_programID, errorLog))
|
||||||
LOG(LERROR, ("Program ", programName, " link error = ", errorLog));
|
LOG(LERROR, ("Program ", programName, " link error = ", errorLog));
|
||||||
|
|
||||||
// On Tegra3 glGetActiveUniform isn't work if you detach shaders after linking.
|
|
||||||
LoadUniformLocations();
|
LoadUniformLocations();
|
||||||
|
|
||||||
// On Tegra2 we cannot detach shaders at all.
|
GLFunctions::glDetachShader(m_programID, m_vertexShader->GetID());
|
||||||
// https://devtalk.nvidia.com/default/topic/528941/alpha-blending-not-working-on-t20-and-t30-under-ice-cream-sandwich/
|
GLFunctions::glDetachShader(m_programID, m_fragmentShader->GetID());
|
||||||
if (!SupportManager::Instance().IsTegraDevice())
|
|
||||||
{
|
|
||||||
GLFunctions::glDetachShader(m_programID, m_vertexShader->GetID());
|
|
||||||
GLFunctions::glDetachShader(m_programID, m_fragmentShader->GetID());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GLGpuProgram::~GLGpuProgram()
|
GLGpuProgram::~GLGpuProgram()
|
||||||
{
|
{
|
||||||
if (SupportManager::Instance().IsTegraDevice())
|
|
||||||
{
|
|
||||||
GLFunctions::glDetachShader(m_programID, m_vertexShader->GetID());
|
|
||||||
GLFunctions::glDetachShader(m_programID, m_fragmentShader->GetID());
|
|
||||||
}
|
|
||||||
|
|
||||||
GLFunctions::glDeleteProgram(m_programID);
|
GLFunctions::glDeleteProgram(m_programID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,10 +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));
|
||||||
|
|
||||||
m_isTegra = (m_rendererName.find("Tegra") != std::string::npos);
|
|
||||||
if (m_isTegra)
|
|
||||||
LOG(LINFO, ("NVidia Tegra device detected."));
|
|
||||||
|
|
||||||
auto const apiVersion = context->GetApiVersion();
|
auto const apiVersion = context->GetApiVersion();
|
||||||
if (apiVersion == dp::ApiVersion::OpenGLES3)
|
if (apiVersion == dp::ApiVersion::OpenGLES3)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ public:
|
|||||||
// reinitialization.
|
// reinitialization.
|
||||||
void Init(ref_ptr<GraphicsContext> context);
|
void Init(ref_ptr<GraphicsContext> context);
|
||||||
|
|
||||||
bool IsTegraDevice() const { return m_isTegra; }
|
|
||||||
bool IsAntialiasingEnabledByDefault() const { return m_isAntialiasingEnabledByDefault; }
|
bool IsAntialiasingEnabledByDefault() const { return m_isAntialiasingEnabledByDefault; }
|
||||||
|
|
||||||
float GetMaxLineWidth() const { return m_maxLineWidth; }
|
float GetMaxLineWidth() const { return m_maxLineWidth; }
|
||||||
@@ -49,7 +48,6 @@ private:
|
|||||||
|
|
||||||
std::string m_rendererName;
|
std::string m_rendererName;
|
||||||
std::string m_rendererVersion;
|
std::string m_rendererVersion;
|
||||||
bool m_isTegra = false;
|
|
||||||
bool m_isAntialiasingEnabledByDefault = false;
|
bool m_isAntialiasingEnabledByDefault = false;
|
||||||
|
|
||||||
float m_maxLineWidth = 1;
|
float m_maxLineWidth = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user