GPU/HW: Use a larger epsilon for PowerVR
This commit is contained in:
parent
df26792c19
commit
f4242f390b
|
@ -91,10 +91,14 @@ std::string GPU_HW_ShaderGen::GenerateBatchVertexShader(bool textured)
|
||||||
// OpenGL seems to be off by one pixel in the Y direction due to lower-left origin, but only on
|
// OpenGL seems to be off by one pixel in the Y direction due to lower-left origin, but only on
|
||||||
// Intel and NVIDIA drivers. AMD is fine. V3D requires coordinates to be slightly offset even further.
|
// Intel and NVIDIA drivers. AMD is fine. V3D requires coordinates to be slightly offset even further.
|
||||||
#if API_OPENGL || API_OPENGL_ES
|
#if API_OPENGL || API_OPENGL_ES
|
||||||
#ifdef DRIVER_HACK_POS_EPSILON
|
#ifdef DRIVER_V3D
|
||||||
CONSTANT float POS_EPSILON = 0.0001;
|
CONSTANT float POS_EPSILON = 0.0001;
|
||||||
#else
|
#else
|
||||||
CONSTANT float POS_EPSILON = 0.00001;
|
#ifdef DRIVER_POWERVR
|
||||||
|
CONSTANT float POS_EPSILON = 0.001;
|
||||||
|
#else
|
||||||
|
CONSTANT float POS_EPSILON = 0.00001;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
)";
|
)";
|
||||||
|
|
|
@ -102,11 +102,14 @@ void ShaderGen::WriteHeader(std::stringstream& ss)
|
||||||
ss << "#extension GL_ARB_blend_func_extended : require\n";
|
ss << "#extension GL_ARB_blend_func_extended : require\n";
|
||||||
|
|
||||||
// Test for V3D driver - we have to fudge coordinates slightly.
|
// Test for V3D driver - we have to fudge coordinates slightly.
|
||||||
if ((std::strstr(reinterpret_cast<const char*>(glGetString(GL_VENDOR)), "Broadcom") &&
|
if (std::strstr(reinterpret_cast<const char*>(glGetString(GL_VENDOR)), "Broadcom") &&
|
||||||
std::strstr(reinterpret_cast<const char*>(glGetString(GL_RENDERER)), "V3D")) ||
|
std::strstr(reinterpret_cast<const char*>(glGetString(GL_RENDERER)), "V3D"))
|
||||||
std::strstr(reinterpret_cast<const char*>(glGetString(GL_RENDERER)), "PowerVR"))
|
|
||||||
{
|
{
|
||||||
ss << "#define DRIVER_HACK_POS_EPSILON 1\n";
|
ss << "#define DRIVER_V3D 1\n";
|
||||||
|
}
|
||||||
|
else if (std::strstr(reinterpret_cast<const char*>(glGetString(GL_RENDERER)), "PowerVR"))
|
||||||
|
{
|
||||||
|
ss << "#define DRIVER_POWERVR 1\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (m_render_api == HostDisplay::RenderAPI::OpenGL)
|
else if (m_render_api == HostDisplay::RenderAPI::OpenGL)
|
||||||
|
|
Loading…
Reference in New Issue