mirror of https://github.com/PCSX2/pcsx2.git
GS/HW: Don't mess with ZMSK for no_ds
Fixes broken depth in Superman Returns.
This commit is contained in:
parent
6535e7e43a
commit
b5ebc19eff
|
@ -1524,7 +1524,6 @@ void GSRendererHW::Draw()
|
||||||
GL_CACHE("Disabling Z buffer because all tests will pass.");
|
GL_CACHE("Disabling Z buffer because all tests will pass.");
|
||||||
|
|
||||||
m_cached_ctx.TEST.ZTST = ZTST_ALWAYS;
|
m_cached_ctx.TEST.ZTST = ZTST_ALWAYS;
|
||||||
m_cached_ctx.ZBUF.ZMSK = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (no_rt && no_ds)
|
if (no_rt && no_ds)
|
||||||
|
@ -2512,9 +2511,9 @@ void GSRendererHW::SetupIA(float target_scale, float sx, float sy)
|
||||||
m_conf.nindices = m_index.tail;
|
m_conf.nindices = m_index.tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSRendererHW::EmulateZbuffer()
|
void GSRendererHW::EmulateZbuffer(const GSTextureCache::Target* ds)
|
||||||
{
|
{
|
||||||
if (m_cached_ctx.TEST.ZTE)
|
if (ds && m_cached_ctx.TEST.ZTE)
|
||||||
{
|
{
|
||||||
m_conf.depth.ztst = m_cached_ctx.TEST.ZTST;
|
m_conf.depth.ztst = m_cached_ctx.TEST.ZTST;
|
||||||
// AA1: Z is not written on lines since coverage is always less than 0x80.
|
// AA1: Z is not written on lines since coverage is always less than 0x80.
|
||||||
|
@ -4188,7 +4187,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
||||||
m_conf.ds = ds ? ds->m_texture : nullptr;
|
m_conf.ds = ds ? ds->m_texture : nullptr;
|
||||||
|
|
||||||
// Z setup has to come before channel shuffle
|
// Z setup has to come before channel shuffle
|
||||||
EmulateZbuffer();
|
EmulateZbuffer(ds);
|
||||||
|
|
||||||
// HLE implementation of the channel selection effect
|
// HLE implementation of the channel selection effect
|
||||||
//
|
//
|
||||||
|
|
|
@ -86,7 +86,7 @@ private:
|
||||||
bool& target_region, GSVector2i& unscaled_size, float& scale, GSTexture*& src_copy);
|
bool& target_region, GSVector2i& unscaled_size, float& scale, GSTexture*& src_copy);
|
||||||
bool CanUseTexIsFB(const GSTextureCache::Target* rt, const GSTextureCache::Source* tex) const;
|
bool CanUseTexIsFB(const GSTextureCache::Target* rt, const GSTextureCache::Source* tex) const;
|
||||||
|
|
||||||
void EmulateZbuffer();
|
void EmulateZbuffer(const GSTextureCache::Target* ds);
|
||||||
void EmulateATST(float& AREF, GSHWDrawConfig::PSSelector& ps, bool pass_2);
|
void EmulateATST(float& AREF, GSHWDrawConfig::PSSelector& ps, bool pass_2);
|
||||||
|
|
||||||
void SetTCOffset();
|
void SetTCOffset();
|
||||||
|
|
Loading…
Reference in New Issue