dolphin icon indicating copy to clipboard operation
dolphin copied to clipboard

PixelShaderGen: only use dual-source if bpmem requires dual-src blending

Open ligfx opened this issue 6 years ago • 6 comments

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 calling glBindFragDataLocationIndexed: removing either one fixes the issue. Adding stronger dual source requirements to the fragment shader seemed like the cleaner option.

Before:

screen shot 2017-11-25 at 2 18 01 pm

After:

screen shot 2017-11-25 at 2 17 32 pm

ligfx avatar Nov 25 '17 22:11 ligfx

Seems fine to me but @stenzek or @degasus should give it a second look.

iwubcode avatar Nov 25 '17 22:11 iwubcode

This seems redundant, why not just add MacOS to the BUG_BROKEN_DUAL_SOURCE_BLENDING in the driver details and update the description to make it more general?

CrossVR avatar Nov 25 '17 23:11 CrossVR

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.

degasus avatar Nov 26 '17 10:11 degasus

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!

kemenaran avatar Dec 04 '17 11:12 kemenaran

This can help my issue (dark blue filter overlay)?

Screenshot_2021-12-26-10-21-12-121_org dolphinemu dolphinemu

Android 11 Vulkan Mali-G52

ghost avatar Dec 26 '21 02:12 ghost

@Gamemulatorer No.

JosJuice avatar Dec 26 '21 09:12 JosJuice