GS-ogl: Remove device, driver checks in GLLoader.

Duplicate, it is already handled elsewhere.

Also cleanup some stuff.
This commit is contained in:
lightningterror 2021-11-07 04:47:16 +01:00
parent 4312bf711c
commit 7f1e416d31
2 changed files with 3 additions and 31 deletions

View File

@ -146,7 +146,6 @@ namespace GLLoader
bool s_first_load = true;
bool amd_legacy_buggy_driver = false;
bool vendor_id_amd = false;
bool vendor_id_nvidia = false;
bool vendor_id_intel = false;
@ -208,46 +207,20 @@ namespace GLLoader
void check_gl_version(int major, int minor)
{
const GLubyte* s = glGetString(GL_VERSION);
if (s == NULL)
{
fprintf(stderr, "Error: GLLoader failed to get GL version\n");
throw GSRecoverableError();
}
GLuint v = 1;
while (s[v] != '\0' && s[v - 1] != ' ')
v++;
const char* vendor = (const char*)glGetString(GL_VENDOR);
fprintf_once(stdout, "OpenGL information. GPU: %s. Vendor: %s. Driver: %s\n", glGetString(GL_RENDERER), vendor, &s[v]);
// Name changed but driver is still bad!
if (strstr(vendor, "Advanced Micro Devices") || strstr(vendor, "ATI Technologies Inc.") || strstr(vendor, "ATI"))
vendor_id_amd = true;
/*if (vendor_id_amd && (
strstr((const char*)&s[v], " 10.") || // Blacklist all 2010 AMD drivers.
strstr((const char*)&s[v], " 11.") || // Blacklist all 2011 AMD drivers.
strstr((const char*)&s[v], " 12.") || // Blacklist all 2012 AMD drivers.
strstr((const char*)&s[v], " 13.") || // Blacklist all 2013 AMD drivers.
strstr((const char*)&s[v], " 14.") || // Blacklist all 2014 AMD drivers.
strstr((const char*)&s[v], " 15.") || // Blacklist all 2015 AMD drivers.
strstr((const char*)&s[v], " 16.") || // Blacklist all 2016 AMD drivers.
strstr((const char*)&s[v], " 17.") // Blacklist all 2017 AMD drivers for now.
))
amd_legacy_buggy_driver = true;
*/
if (strstr(vendor, "NVIDIA Corporation"))
else if (strstr(vendor, "NVIDIA Corporation"))
vendor_id_nvidia = true;
#ifdef _WIN32
if (strstr(vendor, "Intel"))
else if (strstr(vendor, "Intel"))
vendor_id_intel = true;
#else
// On linux assumes the free driver if it isn't nvidia or amd pro driver
mesa_driver = !vendor_id_nvidia && !vendor_id_amd;
#endif
// As of 2019 SSO is still broken on intel (Kaby Lake confirmed).
buggy_sso_dual_src = vendor_id_intel || vendor_id_amd /*|| amd_legacy_buggy_driver*/;
buggy_sso_dual_src = vendor_id_intel || vendor_id_amd;
if (theApp.GetConfigI("override_geometry_shader") != -1)
{

View File

@ -35,7 +35,6 @@ namespace GLLoader
extern bool vendor_id_amd;
extern bool vendor_id_nvidia;
extern bool vendor_id_intel;
extern bool amd_legacy_buggy_driver;
extern bool mesa_driver;
extern bool buggy_sso_dual_src;
extern bool in_replayer;