Skip to content

Commit

Permalink
Assume DUALSOURCE replace alpha means supported.
Browse files Browse the repository at this point in the history
We already check supports when generating this value, don't need to check
again when using it.
  • Loading branch information
unknownbrackets committed Mar 6, 2016
1 parent a8907cb commit 6b9b00a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GPU/Common/GPUStateUtils.cpp
Expand Up @@ -181,7 +181,7 @@ ReplaceAlphaType ReplaceAlphaWithStencil(ReplaceBlendType replaceBlend) {
if (nonAlphaSrcFactors[gstate.getBlendFuncA()] && nonAlphaDestFactors[gstate.getBlendFuncB()]) {
return REPLACE_ALPHA_YES;
} else {
if (gstate_c.featureFlags & GPU_SUPPORTS_DUALSOURCE_BLEND) {
if (gstate_c.Supports(GPU_SUPPORTS_DUALSOURCE_BLEND)) {
return REPLACE_ALPHA_DUALSOURCE;
} else {
return REPLACE_ALPHA_NO;
Expand Down Expand Up @@ -1039,7 +1039,7 @@ void ConvertBlendState(GenericBlendState &blendState, bool allowShaderBlend) {
}
}

if (replaceAlphaWithStencil == REPLACE_ALPHA_DUALSOURCE && gstate_c.Supports(GPU_SUPPORTS_DUALSOURCE_BLEND)) {
if (replaceAlphaWithStencil == REPLACE_ALPHA_DUALSOURCE) {
glBlendFuncA = toDualSource(glBlendFuncA);
glBlendFuncB = toDualSource(glBlendFuncB);
}
Expand Down

0 comments on commit 6b9b00a

Please sign in to comment.