Skip to content

Commit

Permalink
gsdx ogl: enable AMD driver blending workaround only on latest legacy…
Browse files Browse the repository at this point in the history
… 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)
  • Loading branch information
gregory38 committed May 28, 2016
1 parent 7682bf9 commit 179681e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions plugins/GSdx/GLLoader.cpp
Expand Up @@ -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"))
Expand Down
1 change: 1 addition & 0 deletions plugins/GSdx/GLLoader.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion plugins/GSdx/GSDeviceOGL.cpp
Expand Up @@ -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)
Expand Down

19 comments on commit 179681e

@mirh
Copy link

@mirh mirh commented on 179681e May 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehrm.. I never said this was the latest legacy driver
And for the moment being, it's not like this also doesn't affect those for newest hardware.

@gregory38
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Which driver is it?
Well it seems to work on latest driver. Even if I think it is still partially broken.

@mirh
Copy link

@mirh mirh commented on 179681e May 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??
Really? Folks told me it was still not working in 16.5.3 :
I mean, the test case at least.

@gregory38
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testcase or pcsx2? The former is still broken. Strangely latter seems to be fine.

@Nucleoprotein
Copy link

@Nucleoprotein Nucleoprotein commented on 179681e May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PCSX2 works with 16.5.2/16.5.3 fine on my poor R7 360.
PS: How should test look ?

@mirh
Copy link

@mirh mirh commented on 179681e May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test should look green. It's yellow instead.
And are you saying that override_GL_ARB_separate_shader_objects=1 works now?

@Nucleoprotein
Copy link

@Nucleoprotein Nucleoprotein commented on 179681e May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, override_GL_ARB_separate_shader_objects is removed, and GL_ARB_separate_shader_objects is required. I'm mean that GL_ARB_separate_shader_objects is working correctly with dual source blending in PCSX2 with 16.5.2/16.5.3 drivers.

Test is yellow, but I do not see any glitches related to GL_ARB_separate_shader_object bug.

@mirh
Copy link

@mirh mirh commented on 179681e May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.... I don't get what our problem has ever been then..
...
Besides, latest legacy drivers (for whatever @gregory38 needs) have string

GPU: AMD Radeon HD 5700 Series. Vendor: ATI Technologies Inc.. Driver: Core Profile Forward-Compatible Context 15.301.1901.0

@Nucleoprotein
Copy link

@Nucleoprotein Nucleoprotein commented on 179681e May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem was that second source in dual source blending was discarded/wrong when using GL_ARB_separate_shader_object, and that is causing numerus glitches in almost all games.

@mirh
Copy link

@mirh mirh commented on 179681e May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so what should I check in pcsx2 ?
Because with the former ini setting I do see lots of glitches, but I wouldn't know otherwise

@Nucleoprotein
Copy link

@Nucleoprotein Nucleoprotein commented on 179681e May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken blending effects, shadows etc. Here some examples: http://imgur.com/a/tquR8

@gregory38
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirh, @Tapcio
Do you have a string of a recent driver? Maybe I could blacklist all "15.301" drivers.

@gregory38
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First driver that seem to work with 16.5.2 (basically latest driver)

@Nucleoprotein
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 2016 drivers have 16.xxx. My current 16.5.3 driver is 16.200.1013.0

@gregory38
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. I will blacklist all drivers from 2015. I would need to blacklist the crimson driver that work on legacy GPU.

@mirh
Copy link

@mirh mirh commented on 179681e May 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the one I posted.. 16.2.1

@Nucleoprotein
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirh
String of OpenGL driver, like one in test console window, my one is "Supported Opengl version: 3.1.13440 Compatibility Profile/Debug Context 16.200.1013.0"

@Nucleoprotein
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirh
Copy link

@mirh mirh commented on 179681e Aug 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were discussing about this in #1508

Please sign in to comment.