mirror of https://github.com/PCSX2/pcsx2.git
gsdx-hw: Remove no longer needed Sprite hack, replaced by improved atst code already.
This commit is contained in:
parent
6a122268cb
commit
39f509feaa
|
@ -459,7 +459,6 @@ void GSdxApp::Init()
|
|||
m_default_configuration["UserHacks_round_sprite_offset"] = "0";
|
||||
m_default_configuration["UserHacks_SkipDraw"] = "0";
|
||||
m_default_configuration["UserHacks_SkipDraw_Offset"] = "0";
|
||||
m_default_configuration["UserHacks_SpriteHack"] = "0";
|
||||
m_default_configuration["UserHacks_TCOffsetX"] = "0";
|
||||
m_default_configuration["UserHacks_TCOffsetY"] = "0";
|
||||
m_default_configuration["UserHacks_TextureInsideRt"] = "0";
|
||||
|
|
|
@ -243,9 +243,7 @@ bool GSDevice11::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
dxd->Release();
|
||||
}
|
||||
|
||||
bool spritehack_enabled = theApp.GetConfigB("UserHacks") && theApp.GetConfigI("UserHacks_SpriteHack");
|
||||
|
||||
m_hack_topleft_offset = (!nvidia_gpu || m_upscale_multiplier == 1 || spritehack_enabled) ? 0.0f : -0.01f;
|
||||
m_hack_topleft_offset = (!nvidia_gpu || m_upscale_multiplier == 1) ? 0.0f : -0.01f;
|
||||
}
|
||||
|
||||
// debug
|
||||
|
|
|
@ -222,14 +222,13 @@ public:
|
|||
uint32 channel:3;
|
||||
|
||||
// Hack
|
||||
uint32 spritehack:1;
|
||||
uint32 tcoffsethack:1;
|
||||
uint32 urban_chaos_hle:1;
|
||||
uint32 tales_of_abyss_hle:1;
|
||||
uint32 point_sampler:1;
|
||||
uint32 invalid_tex0:1; // Lupin the 3rd
|
||||
|
||||
uint32 _free:18;
|
||||
uint32 _free:19;
|
||||
};
|
||||
|
||||
uint64 key;
|
||||
|
|
|
@ -113,15 +113,8 @@ void GSRendererDX11::EmulateAtst(const int pass, const GSTextureCache::Source* t
|
|||
switch (atst)
|
||||
{
|
||||
case ATST_LESS:
|
||||
if (tex && tex->m_spritehack_t)
|
||||
{
|
||||
m_ps_sel.atst = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ps_cb.FogColor_AREF.a = (float)m_context->TEST.AREF - 0.1f;
|
||||
m_ps_sel.atst = 1;
|
||||
}
|
||||
ps_cb.FogColor_AREF.a = (float)m_context->TEST.AREF - 0.1f;
|
||||
m_ps_sel.atst = 1;
|
||||
break;
|
||||
case ATST_LEQUAL:
|
||||
ps_cb.FogColor_AREF.a = (float)m_context->TEST.AREF - 0.1f + 1.0f;
|
||||
|
@ -737,7 +730,6 @@ void GSRendererDX11::EmulateTextureSampler(const GSTextureCache::Source* tex)
|
|||
|
||||
m_ps_sel.ltf = bilinear && shader_emulated_sampler;
|
||||
|
||||
m_ps_sel.spritehack = tex->m_spritehack_t;
|
||||
m_ps_sel.point_sampler = !bilinear || shader_emulated_sampler;
|
||||
|
||||
GSVector4 TextureScale = GSVector4(0.0625f) / WH.xyxy();
|
||||
|
@ -1029,12 +1021,8 @@ void GSRendererDX11::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sou
|
|||
if (m_context->TEST.DATM == 0)
|
||||
m_ps_sel.atst = 2; // >=
|
||||
else
|
||||
{
|
||||
if (tex && tex->m_spritehack_t)
|
||||
m_ps_sel.atst = 0; // <
|
||||
else
|
||||
m_ps_sel.atst = 1; // <
|
||||
}
|
||||
m_ps_sel.atst = 1; // <
|
||||
|
||||
ps_cb.FogColor_AREF.a = (float)0x80;
|
||||
}
|
||||
if (!(m_context->FBA.FBA && m_context->TEST.DATM == 1))
|
||||
|
|
|
@ -206,7 +206,6 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
|
|||
sm.AddMacro("PS_FBA", sel.fba);
|
||||
sm.AddMacro("PS_FBMASK", sel.fbmask);
|
||||
sm.AddMacro("PS_LTF", sel.ltf);
|
||||
sm.AddMacro("PS_SPRITEHACK", sel.spritehack);
|
||||
sm.AddMacro("PS_TCOFFSETHACK", sel.tcoffsethack);
|
||||
sm.AddMacro("PS_POINT_SAMPLER", sel.point_sampler);
|
||||
sm.AddMacro("PS_SHUFFLE", sel.shuffle);
|
||||
|
|
|
@ -32,7 +32,6 @@ GSTextureCache::GSTextureCache(GSRenderer* r)
|
|||
, m_palette_map(r)
|
||||
{
|
||||
if (theApp.GetConfigB("UserHacks")) {
|
||||
m_spritehack = theApp.GetConfigI("UserHacks_SpriteHack");
|
||||
UserHacks_HalfPixelOffset = theApp.GetConfigI("UserHacks_HalfPixelOffset") == 1;
|
||||
m_preload_frame = theApp.GetConfigB("preload_frame_with_gs_data");
|
||||
m_disable_partial_invalidation = theApp.GetConfigB("UserHacks_DisablePartialInvalidation");
|
||||
|
@ -41,7 +40,6 @@ GSTextureCache::GSTextureCache(GSRenderer* r)
|
|||
m_texture_inside_rt = theApp.GetConfigB("UserHacks_TextureInsideRt");
|
||||
m_wrap_gs_mem = theApp.GetConfigB("wrap_gs_mem");
|
||||
} else {
|
||||
m_spritehack = 0;
|
||||
UserHacks_HalfPixelOffset = false;
|
||||
m_preload_frame = false;
|
||||
m_disable_partial_invalidation = false;
|
||||
|
@ -1140,16 +1138,6 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
|||
|
||||
bool hack = false;
|
||||
|
||||
if(m_spritehack && (TEX0.PSM == PSM_PSMT8 || TEX0.PSM == PSM_PSMT8H))
|
||||
{
|
||||
src->m_spritehack_t = true;
|
||||
|
||||
if(m_spritehack == 2 && TEX0.CPSM != PSM_PSMCT16)
|
||||
src->m_spritehack_t = false;
|
||||
}
|
||||
else
|
||||
src->m_spritehack_t = false;
|
||||
|
||||
if (dst && (x_offset != 0 || y_offset != 0))
|
||||
{
|
||||
GSVector2 scale = dst->m_texture->GetScale();
|
||||
|
@ -1557,7 +1545,6 @@ GSTextureCache::Source::Source(GSRenderer* r, const GIFRegTEX0& TEX0, const GIFR
|
|||
, m_valid_rect(0, 0)
|
||||
, m_target(false)
|
||||
, m_complete(false)
|
||||
, m_spritehack_t(false)
|
||||
, m_p2t(NULL)
|
||||
, m_from_target(NULL)
|
||||
{
|
||||
|
|
|
@ -108,7 +108,6 @@ public:
|
|||
bool m_target;
|
||||
bool m_complete;
|
||||
bool m_repeating;
|
||||
bool m_spritehack_t;
|
||||
std::vector<GSVector2i>* m_p2t;
|
||||
// Keep a trace of the target origin. There is no guarantee that pointer will
|
||||
// still be valid on future. However it ought to be good when the source is created
|
||||
|
@ -191,7 +190,6 @@ protected:
|
|||
SourceMap m_src;
|
||||
FastList<Target*> m_dst[2];
|
||||
bool m_paltex;
|
||||
int m_spritehack;
|
||||
bool m_preload_frame;
|
||||
uint8* m_temp;
|
||||
bool m_can_convert_depth;
|
||||
|
|
|
@ -128,12 +128,8 @@ void GSRendererOGL::EmulateAtst(const int pass, const GSTextureCache::Source* te
|
|||
|
||||
switch (atst) {
|
||||
case ATST_LESS:
|
||||
if (tex && tex->m_spritehack_t) {
|
||||
m_ps_sel.atst = 0;
|
||||
} else {
|
||||
ps_cb.FogColor_AREF.a = (float)m_context->TEST.AREF - 0.1f;
|
||||
m_ps_sel.atst = 1;
|
||||
}
|
||||
ps_cb.FogColor_AREF.a = (float)m_context->TEST.AREF - 0.1f;
|
||||
m_ps_sel.atst = 1;
|
||||
break;
|
||||
case ATST_LEQUAL:
|
||||
ps_cb.FogColor_AREF.a = (float)m_context->TEST.AREF - 0.1f + 1.0f;
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#define PS_FBA 0
|
||||
#define PS_FBMASK 0
|
||||
#define PS_LTF 1
|
||||
#define PS_SPRITEHACK 0
|
||||
#define PS_TCOFFSETHACK 0
|
||||
#define PS_POINT_SAMPLER 0
|
||||
#define PS_SHUFFLE 0
|
||||
|
@ -590,9 +589,7 @@ void atst(float4 c)
|
|||
}
|
||||
else if(PS_ATST == 1)
|
||||
{
|
||||
#if PS_SPRITEHACK == 0
|
||||
if (a > AREF) discard;
|
||||
#endif
|
||||
}
|
||||
else if(PS_ATST == 2)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue