mirror of https://github.com/PCSX2/pcsx2.git
gsdx-tc: Remove CanConvertDepth virtual bool and use m_can_convert_depth for depth toggling.
This commit is contained in:
parent
bbd8cbbcf4
commit
b4cb805a91
|
@ -96,7 +96,7 @@ void GSTextureCache::RemoveAll()
|
||||||
|
|
||||||
GSTextureCache::Source* GSTextureCache::LookupDepthSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r, bool palette)
|
GSTextureCache::Source* GSTextureCache::LookupDepthSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r, bool palette)
|
||||||
{
|
{
|
||||||
if (!CanConvertDepth()) {
|
if (!m_can_convert_depth) {
|
||||||
GL_CACHE("LookupDepthSource not supported (0x%x, F:0x%x)", TEX0.TBP0, TEX0.PSM);
|
GL_CACHE("LookupDepthSource not supported (0x%x, F:0x%x)", TEX0.TBP0, TEX0.PSM);
|
||||||
if (m_renderer->m_game.title == CRC::JackieChanAdv || m_renderer->m_game.title == CRC::SVCChaos) {
|
if (m_renderer->m_game.title == CRC::JackieChanAdv || m_renderer->m_game.title == CRC::SVCChaos) {
|
||||||
// JackieChan and SVCChaos cause regressions when skipping the draw calls when depth is disabled/not supported.
|
// JackieChan and SVCChaos cause regressions when skipping the draw calls when depth is disabled/not supported.
|
||||||
|
@ -347,7 +347,7 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con
|
||||||
//
|
//
|
||||||
// Sigh... They don't help us.
|
// Sigh... They don't help us.
|
||||||
|
|
||||||
if (dst == NULL && CanConvertDepth()) {
|
if (dst == NULL && m_can_convert_depth) {
|
||||||
// Let's try a trick to avoid to use wrongly a depth buffer
|
// Let's try a trick to avoid to use wrongly a depth buffer
|
||||||
// Unfortunately, I don't have any Arc the Lad testcase
|
// Unfortunately, I don't have any Arc the Lad testcase
|
||||||
//
|
//
|
||||||
|
@ -458,7 +458,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||||
|
|
||||||
dst->m_dirty_alpha |= (psm_s.trbpp == 32 && (fbmask & 0xFF000000) != 0xFF000000) || (psm_s.trbpp == 16);
|
dst->m_dirty_alpha |= (psm_s.trbpp == 32 && (fbmask & 0xFF000000) != 0xFF000000) || (psm_s.trbpp == 16);
|
||||||
|
|
||||||
} else if (CanConvertDepth()) {
|
} else if (m_can_convert_depth) {
|
||||||
|
|
||||||
int rev_type = (type == DepthStencil) ? RenderTarget : DepthStencil;
|
int rev_type = (type == DepthStencil) ? RenderTarget : DepthStencil;
|
||||||
|
|
||||||
|
@ -655,7 +655,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||||
// must invalidate the Target/Depth respectively
|
// must invalidate the Target/Depth respectively
|
||||||
void GSTextureCache::InvalidateVideoMemType(int type, uint32 bp)
|
void GSTextureCache::InvalidateVideoMemType(int type, uint32 bp)
|
||||||
{
|
{
|
||||||
if (!CanConvertDepth())
|
if (!m_can_convert_depth)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto& list = m_dst[type];
|
auto& list = m_dst[type];
|
||||||
|
@ -1453,7 +1453,7 @@ GSTextureCache::Target* GSTextureCache::CreateTarget(const GIFRegTEX0& TEX0, int
|
||||||
{
|
{
|
||||||
ASSERT(type == RenderTarget || type == DepthStencil);
|
ASSERT(type == RenderTarget || type == DepthStencil);
|
||||||
|
|
||||||
Target* t = new Target(m_renderer, TEX0, m_temp, CanConvertDepth());
|
Target* t = new Target(m_renderer, TEX0, m_temp, m_can_convert_depth);
|
||||||
|
|
||||||
// FIXME: initial data should be unswizzled from local mem in Update() if dirty
|
// FIXME: initial data should be unswizzled from local mem in Update() if dirty
|
||||||
|
|
||||||
|
|
|
@ -208,8 +208,6 @@ protected:
|
||||||
// TODO: virtual void Write(Source* s, const GSVector4i& r) = 0;
|
// TODO: virtual void Write(Source* s, const GSVector4i& r) = 0;
|
||||||
// TODO: virtual void Write(Target* t, const GSVector4i& r) = 0;
|
// TODO: virtual void Write(Target* t, const GSVector4i& r) = 0;
|
||||||
|
|
||||||
virtual bool CanConvertDepth() { return m_can_convert_depth; }
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GSTextureCache(GSRenderer* r);
|
GSTextureCache(GSRenderer* r);
|
||||||
virtual ~GSTextureCache();
|
virtual ~GSTextureCache();
|
||||||
|
|
|
@ -32,8 +32,6 @@ protected:
|
||||||
void Read(Target* t, const GSVector4i& r);
|
void Read(Target* t, const GSVector4i& r);
|
||||||
void Read(Source* t, const GSVector4i& r);
|
void Read(Source* t, const GSVector4i& r);
|
||||||
|
|
||||||
virtual bool CanConvertDepth() { return m_can_convert_depth; }
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GSTextureCache11(GSRenderer* r);
|
GSTextureCache11(GSRenderer* r);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue