gsdx ogl: enable AMD driver blending workaround only on latest legacy driver

Legacy GPU:
Older driver will be broken.

Still supported GPU:
Please upgrade to the latest AMD driver 16.5.2 or 16.5.3 (and prey that future driver will still work)
This commit is contained in:
Gregory Hainaut 2016-05-28 18:43:55 +02:00
parent 7682bf9b49
commit 179681ef18
3 changed files with 4 additions and 1 deletions

View File

@ -247,6 +247,8 @@ namespace GLLoader {
// Name changed but driver is still bad!
if (strstr(vendor, "ATI") || strstr(vendor, "Advanced Micro Devices"))
fglrx_buggy_driver = true;
if (fglrx_buggy_driver && strstr((const char*)&s[v], "15.301.1801.1001")) // Latest legacy driver
legacy_fglrx_buggy_driver = true;
if (strstr(vendor, "NVIDIA Corporation"))
nvidia_buggy_driver = true;
if (strstr(vendor, "Intel"))

View File

@ -334,6 +334,7 @@ namespace GLLoader {
bool check_gl_supported_extension();
extern bool fglrx_buggy_driver;
extern bool legacy_fglrx_buggy_driver;
extern bool mesa_amd_buggy_driver;
extern bool nvidia_buggy_driver;
extern bool intel_buggy_driver;

View File

@ -1491,7 +1491,7 @@ void GSDeviceOGL::OMSetBlendState(uint8 blend_index, uint8 blend_factor, bool is
// AMD DRIVER SUCK
uint16 src = b.src;
uint16 dst = b.dst;
if (GLLoader::fglrx_buggy_driver) {
if (GLLoader::legacy_fglrx_buggy_driver) {
if (src == GL_SRC1_ALPHA)
src = GL_SRC_ALPHA;
else if (src == GL_ONE_MINUS_SRC1_ALPHA)