mirror of https://github.com/PCSX2/pcsx2.git
GS-HW: Disable texture mapping if not required
This commit is contained in:
parent
4b270e703e
commit
227c2563c5
|
@ -540,7 +540,7 @@ REG_END2
|
||||||
__forceinline bool IsOpaque() const { return ((A == B || (C == 2 && FIX == 0)) && D == 0) || (A == 0 && B == D && C == 2 && FIX == 0x80) || (C == 2 && D != 1 && FIX == 0x00); }
|
__forceinline bool IsOpaque() const { return ((A == B || (C == 2 && FIX == 0)) && D == 0) || (A == 0 && B == D && C == 2 && FIX == 0x80) || (C == 2 && D != 1 && FIX == 0x00); }
|
||||||
__forceinline bool IsOpaque(int amin, int amax) const { return ((A == B || amax == 0) && D == 0) || (A == 0 && B == D && amin == 0x80 && amax == 0x80) || (C == 2 && D != 1 && FIX == 0x00); }
|
__forceinline bool IsOpaque(int amin, int amax) const { return ((A == B || amax == 0) && D == 0) || (A == 0 && B == D && amin == 0x80 && amax == 0x80) || (C == 2 && D != 1 && FIX == 0x00); }
|
||||||
__forceinline bool IsCd() { return (A == B) && (D == 1); }
|
__forceinline bool IsCd() { return (A == B) && (D == 1); }
|
||||||
__forceinline bool IsBlack() { return ((C == 2 && FIX == 0) || (A == 2 && A == B)) && D == 2; }
|
__forceinline bool IsBlack() const { return ((C == 2 && FIX == 0) || (A == 2 && A == B)) && D == 2; }
|
||||||
REG_END2
|
REG_END2
|
||||||
|
|
||||||
REG64_(GIFReg, BITBLTBUF)
|
REG64_(GIFReg, BITBLTBUF)
|
||||||
|
|
|
@ -1456,7 +1456,8 @@ void GSRendererHW::Draw()
|
||||||
m_texture_shuffle = false;
|
m_texture_shuffle = false;
|
||||||
m_tex_is_fb = false;
|
m_tex_is_fb = false;
|
||||||
|
|
||||||
if (PRIM->TME)
|
// Disable texture mapping if the blend is black and using alpha from vertex.
|
||||||
|
if (PRIM->TME && !(PRIM->ABE && m_context->ALPHA.IsBlack() && !m_context->TEX0.TCC))
|
||||||
{
|
{
|
||||||
GIFRegCLAMP MIP_CLAMP = context->CLAMP;
|
GIFRegCLAMP MIP_CLAMP = context->CLAMP;
|
||||||
GSVector2i hash_lod_range(0, 0);
|
GSVector2i hash_lod_range(0, 0);
|
||||||
|
@ -3627,7 +3628,7 @@ void GSRendererHW::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
|
||||||
// Blend
|
// Blend
|
||||||
|
|
||||||
bool blending_alpha_pass = false;
|
bool blending_alpha_pass = false;
|
||||||
if ((!IsOpaque() || (PRIM->ABE && m_context->ALPHA.IsBlack())) && rt && m_conf.colormask.wrgba != 0)
|
if ((!IsOpaque() || m_context->ALPHA.IsBlack()) && rt && (m_conf.colormask.wrgba & 0x7))
|
||||||
{
|
{
|
||||||
EmulateBlending(DATE_PRIMID, DATE_BARRIER, blending_alpha_pass);
|
EmulateBlending(DATE_PRIMID, DATE_BARRIER, blending_alpha_pass);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue