mirror of https://github.com/PCSX2/pcsx2.git
gsdx-tc: extend preload frame hack to load target too
The goal is to check the impact on game that have wrong RT content. It helps a bit Smash Court Tennis Pro Tournament 2 but the game suffers another texture cache bug. (RT BW is 10 whereas texture BW is 8) Note: Armored Core: Last Raven must be tested (only game so far that rely on the option and I didn't want to add a new one).
This commit is contained in:
parent
295f867118
commit
03bf1ec7b3
|
@ -323,26 +323,32 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||||
if(dst == NULL)
|
if(dst == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
// In theory new textures contain invalidated data. Still in theory a new target
|
||||||
|
// must contains the content of the GS memory.
|
||||||
|
// In practice, TC will wrongly invalidate some RT. For example due to write on the alpha
|
||||||
|
// channel but colors is still valid. Unfortunately TC doesn't support the upload of data
|
||||||
|
// in target.
|
||||||
|
//
|
||||||
|
// Cleaning the code here will likely break several games. However it might reduce
|
||||||
|
// the noise in draw call debugging. It is the main reason to enable it on debug build.
|
||||||
|
//
|
||||||
|
// From a performance point of view, it might cost a little on big upscaling
|
||||||
|
// but normally few RT are miss so it must remain reasonable.
|
||||||
|
if (s_IS_OPENGL) {
|
||||||
|
if (m_preload_frame) {
|
||||||
|
GL_INS("Preloading the RT DATA");
|
||||||
|
dst->m_dirty.push_back(GSDirtyRect(GSVector4i(0, 0, TEX0.TBW * 64, h), TEX0.PSM));
|
||||||
|
dst->Update();
|
||||||
|
} else {
|
||||||
#ifdef ENABLE_OGL_DEBUG
|
#ifdef ENABLE_OGL_DEBUG
|
||||||
// In theory new textures contain invalidated data. Still in theory a new target
|
|
||||||
// must contains the content of the GS memory.
|
|
||||||
// In practice, TC will wrongly invalidate some RT. For example due to write on the alpha
|
|
||||||
// channel but colors is still valid. Unfortunately TC doesn't support the upload of data
|
|
||||||
// in target.
|
|
||||||
//
|
|
||||||
// Cleaning the code here will likely break several games. However it might reduce
|
|
||||||
// the noise in draw call debugging. It is the main reason to enable it on debug build.
|
|
||||||
//
|
|
||||||
// From a performance point of view, it might cost a little on big upscaling
|
|
||||||
// but normally few RT are miss so it must remain reasonable.
|
|
||||||
if (s_IS_OPENGL) {
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case RenderTarget: m_renderer->m_dev->ClearRenderTarget(dst->m_texture, 0); break;
|
case RenderTarget: m_renderer->m_dev->ClearRenderTarget(dst->m_texture, 0); break;
|
||||||
case DepthStencil: m_renderer->m_dev->ClearDepth(dst->m_texture, 0); break;
|
case DepthStencil: m_renderer->m_dev->ClearDepth(dst->m_texture, 0); break;
|
||||||
default:break;
|
default:break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_renderer->CanUpscale())
|
if(m_renderer->CanUpscale())
|
||||||
|
|
Loading…
Reference in New Issue