mirror of https://github.com/PCSX2/pcsx2.git
GS: Remove fm_mask parameter from TryAlphaTest.
Not used, we get the value locally instead.
This commit is contained in:
parent
83da1773b5
commit
d9bdb0d7e1
|
@ -3912,7 +3912,7 @@ void GSState::CalcAlphaMinMax(const int tex_alpha_min, const int tex_alpha_max)
|
||||||
m_vt.m_alpha.valid = true;
|
m_vt.m_alpha.valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSState::TryAlphaTest(u32& fm, const u32 fm_mask, u32& zm)
|
bool GSState::TryAlphaTest(u32& fm, u32& zm)
|
||||||
{
|
{
|
||||||
// Shortcut for the easy case
|
// Shortcut for the easy case
|
||||||
if (m_context->TEST.ATST == ATST_ALWAYS)
|
if (m_context->TEST.ATST == ATST_ALWAYS)
|
||||||
|
|
|
@ -193,7 +193,7 @@ protected:
|
||||||
u8 uses_boundary; ///< Whether or not the usage touches the left, top, right, or bottom edge (and therefore needs wrap modes preserved)
|
u8 uses_boundary; ///< Whether or not the usage touches the left, top, right, or bottom edge (and therefore needs wrap modes preserved)
|
||||||
};
|
};
|
||||||
TextureMinMaxResult GetTextureMinMax(GIFRegTEX0 TEX0, GIFRegCLAMP CLAMP, bool linear, bool clamp_to_tsize);
|
TextureMinMaxResult GetTextureMinMax(GIFRegTEX0 TEX0, GIFRegCLAMP CLAMP, bool linear, bool clamp_to_tsize);
|
||||||
bool TryAlphaTest(u32& fm, const u32 fm_mask, u32& zm);
|
bool TryAlphaTest(u32& fm, u32& zm);
|
||||||
bool IsOpaque();
|
bool IsOpaque();
|
||||||
bool IsMipMapDraw();
|
bool IsMipMapDraw();
|
||||||
bool IsMipMapActive();
|
bool IsMipMapActive();
|
||||||
|
|
|
@ -831,8 +831,8 @@ bool GSHwHack::GSC_MetalGearSolid3(GSRendererHW& r, int& skip)
|
||||||
// For some reason, instead of being sensible and masking Z, they set up AFAIL instead.
|
// For some reason, instead of being sensible and masking Z, they set up AFAIL instead.
|
||||||
if (!RZMSK)
|
if (!RZMSK)
|
||||||
{
|
{
|
||||||
u32 fm = 0, fm_mask = 0, zm = 0;
|
u32 fm = 0, zm = 0;
|
||||||
if (!r.m_cached_ctx.TEST.ATE || !r.TryAlphaTest(fm, fm_mask, zm) || zm == 0)
|
if (!r.m_cached_ctx.TEST.ATE || !r.TryAlphaTest(fm, zm) || zm == 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1758,7 +1758,7 @@ void GSRendererHW::Draw()
|
||||||
m_mem.m_clut.Read32(m_cached_ctx.TEX0, env.TEXA);
|
m_mem.m_clut.Read32(m_cached_ctx.TEX0, env.TEXA);
|
||||||
|
|
||||||
// Test if we can optimize Alpha Test as a NOP
|
// Test if we can optimize Alpha Test as a NOP
|
||||||
m_cached_ctx.TEST.ATE = m_cached_ctx.TEST.ATE && !GSRenderer::TryAlphaTest(fm, fm_mask, zm);
|
m_cached_ctx.TEST.ATE = m_cached_ctx.TEST.ATE && !GSRenderer::TryAlphaTest(fm, zm);
|
||||||
|
|
||||||
// Need to fix the alpha test, since the alpha will be fixed to 1.0 if ABE is disabled and AA1 is enabled
|
// Need to fix the alpha test, since the alpha will be fixed to 1.0 if ABE is disabled and AA1 is enabled
|
||||||
// So if it doesn't meet the condition, always fail, if it does, always pass (turn off the test).
|
// So if it doesn't meet the condition, always fail, if it does, always pass (turn off the test).
|
||||||
|
@ -2210,7 +2210,7 @@ void GSRendererHW::Draw()
|
||||||
|
|
||||||
u32 new_fm = m_context->FRAME.FBMSK;
|
u32 new_fm = m_context->FRAME.FBMSK;
|
||||||
u32 new_zm = m_context->ZBUF.ZMSK || m_context->TEST.ZTE == 0 ? 0xffffffff : 0;
|
u32 new_zm = m_context->ZBUF.ZMSK || m_context->TEST.ZTE == 0 ? 0xffffffff : 0;
|
||||||
if (m_cached_ctx.TEST.ATE && GSRenderer::TryAlphaTest(new_fm, fm_mask, new_zm))
|
if (m_cached_ctx.TEST.ATE && GSRenderer::TryAlphaTest(new_fm, new_zm))
|
||||||
{
|
{
|
||||||
m_cached_ctx.TEST.ATE = false;
|
m_cached_ctx.TEST.ATE = false;
|
||||||
m_cached_ctx.FRAME.FBMSK = new_fm;
|
m_cached_ctx.FRAME.FBMSK = new_fm;
|
||||||
|
|
|
@ -129,7 +129,7 @@ bool GSRendererHWFunctions::SwPrimRender(GSRendererHW& hw, bool invalidate_tc, b
|
||||||
|
|
||||||
if (context->TEST.ATE)
|
if (context->TEST.ATE)
|
||||||
{
|
{
|
||||||
if (!hw.TryAlphaTest(fm, fm_mask, zm))
|
if (!hw.TryAlphaTest(fm, zm))
|
||||||
{
|
{
|
||||||
gd.sel.atst = context->TEST.ATST;
|
gd.sel.atst = context->TEST.ATST;
|
||||||
gd.sel.afail = context->TEST.GetAFAIL(context->FRAME.PSM);
|
gd.sel.afail = context->TEST.GetAFAIL(context->FRAME.PSM);
|
||||||
|
|
|
@ -992,7 +992,7 @@ bool GSRendererSW::GetScanlineGlobalData(SharedData* data)
|
||||||
|
|
||||||
if (context->TEST.ATE)
|
if (context->TEST.ATE)
|
||||||
{
|
{
|
||||||
if (!TryAlphaTest(fm, fm_mask, zm))
|
if (!TryAlphaTest(fm, zm))
|
||||||
{
|
{
|
||||||
gd.sel.atst = context->TEST.ATST;
|
gd.sel.atst = context->TEST.ATST;
|
||||||
gd.sel.afail = context->TEST.GetAFAIL(context->FRAME.PSM);
|
gd.sel.afail = context->TEST.GetAFAIL(context->FRAME.PSM);
|
||||||
|
|
Loading…
Reference in New Issue