From fb5648541ce93cf4938dd58e635f7c2d1a3a1569 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Mon, 13 Jun 2022 18:24:57 -0500 Subject: [PATCH] VideoCommon: Remove dstalpha from BlendingState It's not supported by any PC graphics API, and therefore completely unused --- Source/Core/VideoCommon/RenderState.cpp | 6 +++--- Source/Core/VideoCommon/RenderState.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp index a997c654f20e..7df51a1503cb 100644 --- a/Source/Core/VideoCommon/RenderState.cpp +++ b/Source/Core/VideoCommon/RenderState.cpp @@ -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 diff --git a/Source/Core/VideoCommon/RenderState.h b/Source/Core/VideoCommon/RenderState.h index 992c70fb0410..49590d55b5ef 100644 --- a/Source/Core/VideoCommon/RenderState.h +++ b/Source/Core/VideoCommon/RenderState.h @@ -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;