GPU/OpenGL: Work around rasterization/interplation issue on V3D/Pi4

This commit is contained in:
Connor McLaughlin
2020-12-01 15:14:23 +10:00
parent a2666de7c8
commit 7e944103c2
2 changed files with 24 additions and 6 deletions

View File

@ -91,6 +91,13 @@ void ShaderGen::WriteHeader(std::stringstream& ss)
ss << "#extension GL_EXT_blend_func_extended : require\n";
if (GLAD_GL_ARB_blend_func_extended)
ss << "#extension GL_ARB_blend_func_extended : require\n";
// Test for V3D driver - we have to fudge coordinates slightly.
if (std::strstr(reinterpret_cast<const char*>(glGetString(GL_VENDOR)), "Broadcom") &&
std::strstr(reinterpret_cast<const char*>(glGetString(GL_RENDERER)), "V3D"))
{
ss << "#define DRIVER_V3D 1\n";
}
}
else if (m_render_api == HostDisplay::RenderAPI::OpenGL)
{