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
Make sure blend is disabled if render target has integer format #5122
Conversation
Download the artifacts for this pull request: Experimental GUI (Avalonia)GUI-less (SDL2)Only for Developers
|
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.
lgtm
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.
That's sensible. Does this cause a validation error normally or is it just ignored?
Yes, it has this validation error:
|
Having blend enabled for integer formats is invalid. The most common case where this happens is when logic operations are enabled, and in this case the blend is ignored. Since Metal/MoltenVK does not support logical operations, it is never enabled there, and having blend enabled in this case causes a Metal assert and crash. To avoid this, this change forces blend to be disabled if the respective framebuffer attachment is using a integer format.
This should be safe to enable for all vendors, but here I'm enabling it only on MoltenVK just to be on the safe side. But I can enable it for all vendors too.
Fixes crashes on Xenoblade games, and should fix also fix some crashes on Luigi's Mansion 3 (on macOS). The Luigi's Mansion 3 crash would usually happen when entering the bathroom on Luigi's room for example.
Contributes to #4062.