8000 Fix bug in blue-to-alpha - alpha blending could be on when it shouldn't be. by hrydgard · Pull Request #15733 · hrydgard/ppsspp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix bug in blue-to-alpha - alpha blending could be on when it shouldn't be. #15733

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

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Common/Render/Text/draw_text_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ std::string TextDrawerAndroid::NormalizeString(std::string str) {
}

void TextDrawerAndroid::MeasureString(const char *str, size_t len, float *w, float *h) {
if (!str) {
*w = 0.0;
*h = 0.0;
return;
}

CacheKey key{ std::string(str, len), fontHash_ };
TextMeasureEntry *entry;
auto iter = sizeCache_.find(key);
Expand Down
6 changes: 5 additions & 1 deletion GPU/Common/GPUStateUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,26 +1089,30 @@ void ConvertBlendState(GenericBlendState &blendState, bool allowFramebufferRead,

case REPLACE_BLEND_BLUE_TO_ALPHA:
blueToAlpha = true;
blendState.enabled = gstate.isAlphaBlendEnabled();
// We'll later convert the color blend to blend in the alpha channel.
break;

case REPLACE_BLEND_COPY_FBO:
blendState.enabled = true;
blendState.applyFramebufferRead = true;
blendState.resetFramebufferRead = false;
blendState.replaceAlphaWithStencil = replaceAlphaWithStencil;
break;

case REPLACE_BLEND_PRE_SRC:
case REPLACE_BLEND_PRE_SRC_2X_ALPHA:
blendState.enabled = true;
usePreSrc = true;
break;

case REPLACE_BLEND_STANDARD:
case REPLACE_BLEND_2X_ALPHA:
case REPLACE_BLEND_2X_SRC:
blendState.enabled = true;
break;
}

blendState.enabled = true;
blendState.resetFramebufferRead = true;

const GEBlendMode blendFuncEq = gstate.getBlendEq();
Expand Down
1 change: 1 addition & 0 deletions assets/compat.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ NPEH00029 = true
ULUS10455 = true

[BlueToAlpha]
# Split/Second
ULES01402 = true
ULUS10513 = true
ULJM05812 = true
Expand Down
0