-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PixelShaderGen: only use dual-source if bpmem requires dual-src blending #6219
base: master
Are you sure you want to change the base?
Conversation
This seems redundant, why not just add MacOS to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To summarize what was discussed on IRC. I'd rather not add new UID fields. Another solution is to get rid of the glBindFragDataLocationIndexed
calls by specifying the locations in the shader.
This requires OpenGL 3.3 however, so either we need to check if the relevant extension is supported or decide that OpenGL 3.3 is the minimum to run Dolphin. Also we need to check whether this is supported on OpenGL (ES) on Android.
always doing dual source blend was on purpose, as we want to use the color as blend factors with 24 bit accuracy and write the color with rgb565 accuracy. |
Just tested this PR on macOS 10.12: I can confirm this fixes issue Issue 9373 (Depth issues on Mario Kart Double Dash), and similar depth issues on Mario Kart Wii. @ligfx thank you so much for your work on this! |
@Gamemulatorer No. |
@JMC47 please close this per https://bugs.dolphin-emu.org/issues/9373#note-20 |
Was this ever actually fixed in macOS OpenGL though? |
I own this game and a mac, ill test and report back. |
Since the original image shows an Intel GPU, my above test may not be sufficient to confirm if it is resolved. Someone with an older mac with an Intel GPU would need to check. |
Issue 9373 was fixed by 5.0-16930, but on 2412 I still get the following block of warnings repeatedly when running the logs with a mid 2014 MacBook Pro, macOS 11.7.10, with an Intel Iris Pro GPU. Warnings:>VideoBackends/OGL/ProgramShaderCache.cpp:452 W[Video]: Program linked with warnings: WARNING: Could not find vertex shader attribute 'rawtex4' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawtangent' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawcolor0' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawtex2' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawtex6' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawtex3' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawbinormal' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawtex7' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawtex5' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawtex1' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawnormal' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'rawcolor1' to match BindAttributeLocation request. WARNING: Could not find vertex shader attribute 'posmtx' to match BindAttributeLocation request. WARNING: Could not find fragment shader output 'ocol1' to match FragDataBinding request.My mac is too old to build dolphin and there's no CI build for this PR due to merge conflicts, so I don't know if it would do anything about the warnings. |
I took a look at master vs this PR, the bool for using dual source is a lot more complex. |
This fixes Issue 9373: Depth issues on Mario Kart Double Dash.
There seems to be some interaction between having
ocol1
in the fragment shader and callingglBindFragDataLocationIndexed
: removing either one fixes the issue. Adding stronger dual source requirements to the fragment shader seemed like the cleaner option.Before:
After: