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
VideoCommon: Clear blend configuration if color/alpha update disabled #11406
Conversation
|
Not sure what's happening with smg-mmg on osx. I do see that they're using an RGBA6666 framebuffer and drawing the shadows in the alpha channel, and then they do something complicated to actually draw the shadows. I did a quick investigation into how the shadows work. First, with depth testing enabled, they draw the shadow texture across all possible floor triangles, setting alpha to 0xff where the shadow can exist and to 0 where it would be blocked by the depth test (I think). The step that actually draws the shadows involves setting the dest factor to
That said, the difference seems to be a change of 1 on the red and blue channels on one pixel and on the green channel on another. This probably isn't that important, but it might be a good idea to do some further testing of the shadows in Mario Galaxy on an apple machine (which I don't have access to). |
277bca9
to
0cbfcbc
Compare
|
Based on #11412 it doesn't seem like the differences on M1 are it switching between the fbfetch blend path and the regular blend path (fbfetch blend is used on one of the crystals on M1, but not on the shadow). Theoretically that could happen because So, I'm not sure where the M1 difference is coming from, and if it's just another driver quirk or something else. That said... a difference of 1 is a problem, as the whole reason why we use dual source blend is (to my understanding) to emulate the quantization that happens when writing to an RGBA6666 framebuffer (and more specifically the blend factor not being quantized). If a difference of 1 can exist, something's wrong with that quantization. (I'm pretty sure that fifoci isn't using force 24 bit color). But I suspect that this is a more general issue and not a reason to hold this PR back. EDIT: I read a bit more, and according to the old post about D3D9 removal dual source blending is mainly needed for |
|
I went to look at what the difference might be from, but I couldn't reproduce it on my M1 MacBook Pro (before and after were identical on both Metal and MVK) Though my computer is outputting the frames at 1280x720 instead of the CI's 808x456, so I can't compare to the CI's results to see which matches closer |
|
Try enabling graphics -> advanced -> frame dumping -> dump at internal resolution (which also affects screenshots). You'll also want to use native/1x internal resolution. Though I'd expect the difference to be visible without those settings too. Intel confirmed the bug over at IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT#214 but it'll be a few months before it'll actually be fixed (and included in a release). |
|
Probably it's fine to not worry about the difference, then. |
0cbfcbc
to
3e92a4a
Compare
3e92a4a
to
84b8d9b
Compare
This works around an Intel driver bug where, on D3D12 only, dual-source blending behaves incorrectly if the second source is unused on. This bug is visible in skyboxes in Super Mario Sunshine, which first draw clouds and sun flare in greyscale and then draw the sky afterwards with a source factor of 1 and a dest factor of 1-src_color (this results in the clouds being tinted blue). This process is done on an RGB888 framebuffer, so alpha update is disabled. (Color update is enabled; note that if you look at this in Dolphin's fifo analyzer, it won't be enabled because they use the BP mask functionality to only change the blending functions and not alpha/color update, for whatever reason.)
84b8d9b
to
4f6ce51
Compare
|
FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system: automated-fifoci-reporter |


This works around an Intel driver bug where, on D3D12 only, dual-source blending behaves incorrectly if the second source is unused on. This bug is visible in skyboxes in Super Mario Sunshine, which first draw clouds and sun flare in greyscale and then draw the sky afterwards with a source factor of 1 and a dest factor of 1-src_color (this results in the clouds being tinted blue). This process is done on an RGB888 framebuffer, so alpha update is disabled. (Color update is enabled; note that if you look at this in Dolphin's fifo analyzer, it won't be enabled because they use the BP mask functionality to only change the blending functions and not alpha/color update.)
Here are some examples of how this renders (SMSSkyFifologs.zip):
SMSSky.dff
SMSTitle.dff
MarioSunshineWater.dff (sms-water on fifoci)