Skip to content
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

Fix alpha/stencil replace on Adreno when color masked #16379

Merged
merged 3 commits into from
Nov 13, 2022

Conversation

unknownbrackets
Copy link
Collaborator

@unknownbrackets unknownbrackets commented Nov 13, 2022

Fixes #13391, fixes #13886 (at least for the frame dumps.) The workaround in #10421 was activating, but didn't care about replacing alpha with stencil. This makes it blend based on the mask.

While looking for why, I noticed that we set uniformMask to 0x7FFFFFFF when games use 5551 and specify everything but alpha masked, which is a bit wrong. Better to write FF not 80. In theory, could do this for 4444 as well, but I don't think it's as important there.

-[Unknown]

When masking via uniform, we don't care about the lower bits of alpha.
Games often use 7F / 80 to control writes of FF/00.
Playing it safe for 5xx devices and assuming they are still affected.
Copy link
Owner

@hrydgard hrydgard left a comment

Choose a reason for hiding this comment

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

Nice catches!

@hrydgard hrydgard merged commit 1ae6047 into hrydgard:master Nov 13, 2022
@unknownbrackets unknownbrackets deleted the stencil-android branch November 13, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants