OGL: Drop BlendingState.dither

How GL_DITHER works is implementation-defined, and we handle the
non-blended case in the pixel shader.
This commit is contained in:
Stenzek 2017-04-18 21:45:03 +10:00
parent ddc5275071
commit fd896bd9e0
3 changed files with 5 additions and 12 deletions

View File

@ -1274,11 +1274,6 @@ void Renderer::SetBlendMode(bool forceUpdate)
glDisable(GL_COLOR_LOGIC_OP); glDisable(GL_COLOR_LOGIC_OP);
} }
if (state.dither)
glEnable(GL_DITHER);
else
glDisable(GL_DITHER);
glColorMask(state.colorupdate, state.colorupdate, state.colorupdate, state.alphaupdate); glColorMask(state.colorupdate, state.colorupdate, state.colorupdate, state.alphaupdate);
} }

View File

@ -61,7 +61,6 @@ void BlendingState::Generate(const BPMemory& bp)
bool target_has_alpha = bp.zcontrol.pixel_format == PEControl::RGBA6_Z24; bool target_has_alpha = bp.zcontrol.pixel_format == PEControl::RGBA6_Z24;
bool alpha_test_may_success = bp.alpha_test.TestResult() != AlphaTest::FAIL; bool alpha_test_may_success = bp.alpha_test.TestResult() != AlphaTest::FAIL;
dither = bp.blendmode.dither;
colorupdate = bp.blendmode.colorupdate && alpha_test_may_success; colorupdate = bp.blendmode.colorupdate && alpha_test_may_success;
alphaupdate = bp.blendmode.alphaupdate && target_has_alpha && alpha_test_may_success; alphaupdate = bp.blendmode.alphaupdate && target_has_alpha && alpha_test_may_success;
dstalpha = bp.dstalpha.enable && alphaupdate; dstalpha = bp.dstalpha.enable && alphaupdate;

View File

@ -16,17 +16,16 @@ union BlendingState
BitField<0, 1, u32> blendenable; BitField<0, 1, u32> blendenable;
BitField<1, 1, u32> logicopenable; BitField<1, 1, u32> logicopenable;
BitField<2, 1, u32> dstalpha; BitField<2, 1, u32> dstalpha;
BitField<3, 1, u32> dither; BitField<3, 1, u32> colorupdate;
BitField<4, 1, u32> colorupdate; BitField<4, 1, u32> alphaupdate;
BitField<5, 1, u32> alphaupdate; BitField<5, 1, u32> subtract;
BitField<6, 1, u32> subtract; BitField<6, 1, u32> subtractAlpha;
BitField<7, 1, u32> subtractAlpha; BitField<7, 1, u32> usedualsrc;
BitField<8, 3, BlendMode::BlendFactor> dstfactor; BitField<8, 3, BlendMode::BlendFactor> dstfactor;
BitField<11, 3, BlendMode::BlendFactor> srcfactor; BitField<11, 3, BlendMode::BlendFactor> srcfactor;
BitField<14, 3, BlendMode::BlendFactor> dstfactoralpha; BitField<14, 3, BlendMode::BlendFactor> dstfactoralpha;
BitField<17, 3, BlendMode::BlendFactor> srcfactoralpha; BitField<17, 3, BlendMode::BlendFactor> srcfactoralpha;
BitField<20, 4, BlendMode::LogicOp> logicmode; BitField<20, 4, BlendMode::LogicOp> logicmode;
BitField<24, 1, u32> usedualsrc;
u32 hex; u32 hex;
}; };