Skip to content

Commit

Permalink
VideoCommon: Remove dstalpha from BlendingState
Browse files Browse the repository at this point in the history
It's not supported by any PC graphics API, and therefore completely unused
  • Loading branch information
TellowKrinkle committed Jul 15, 2022
1 parent 9910241 commit fb56485
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Source/Core/VideoCommon/RenderState.cpp
Expand Up @@ -120,12 +120,12 @@ void BlendingState::Generate(const BPMemory& bp)
// Start with everything disabled.
hex = 0;

bool target_has_alpha = bp.zcontrol.pixel_format == PixelFormat::RGBA6_Z24;
bool alpha_test_may_succeed = bp.alpha_test.TestResult() != AlphaTestResult::Fail;
const bool target_has_alpha = bp.zcontrol.pixel_format == PixelFormat::RGBA6_Z24;
const bool alpha_test_may_succeed = bp.alpha_test.TestResult() != AlphaTestResult::Fail;

colorupdate = bp.blendmode.colorupdate && alpha_test_may_succeed;
alphaupdate = bp.blendmode.alphaupdate && target_has_alpha && alpha_test_may_succeed;
dstalpha = bp.dstalpha.enable && alphaupdate;
const bool dstalpha = bp.dstalpha.enable && alphaupdate;
usedualsrc = true;

// The subtract bit has the highest priority
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoCommon/RenderState.h
Expand Up @@ -130,7 +130,6 @@ union BlendingState

BitField<0, 1, u32> blendenable;
BitField<1, 1, u32> logicopenable;
BitField<2, 1, u32> dstalpha;
BitField<3, 1, u32> colorupdate;
BitField<4, 1, u32> alphaupdate;
BitField<5, 1, u32> subtract;
Expand Down

0 comments on commit fb56485

Please sign in to comment.