mirror of
https://github.com/libretro/pcsx2.git
synced 2024-12-12 12:09:34 +00:00
Merge pull request #927 from PCSX2/preload-rt
gsdx-tc: extend preload frame hack to load target too
This commit is contained in:
commit
7a69812b17
@ -323,7 +323,6 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||
if(dst == NULL)
|
||||
return NULL;
|
||||
|
||||
#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
|
||||
@ -336,14 +335,21 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||
// 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
|
||||
switch (type) {
|
||||
case RenderTarget: m_renderer->m_dev->ClearRenderTarget(dst->m_texture, 0); break;
|
||||
case DepthStencil: m_renderer->m_dev->ClearDepth(dst->m_texture, 0); break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(m_renderer->CanUpscale())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user