GSdx-hwtc: Propagate valid area from dst to source

This commit is contained in:
Kojin 2019-04-22 07:50:49 -04:00 committed by lightningterror
parent acf771edd8
commit 6af2f7ef46
2 changed files with 4 additions and 0 deletions

View File

@ -157,6 +157,7 @@ GSTextureCache::Source* GSTextureCache::LookupDepthSource(const GIFRegTEX0& TEX0
src->m_target = true; // So renderer can check if a conversion is required
src->m_from_target = dst->m_texture; // avoid complex condition on the renderer
src->m_32_bits_fmt = dst->m_32_bits_fmt;
src->m_valid_rect = dst->m_valid;
// Insert the texture in the hash set to keep track of it. But don't bother with
// texture cache list. It means that a new Source is created everytime we need it.
@ -1224,6 +1225,7 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
// Keep a trace of origin of the texture
src->m_target = true;
src->m_from_target = dst->m_texture;
src->m_valid_rect = dst->m_valid;
dst->Update();
@ -1557,6 +1559,7 @@ GSTextureCache::Source::Source(GSRenderer* r, const GIFRegTEX0& TEX0, const GIFR
, m_spritehack_t(false)
, m_p2t(NULL)
, m_from_target(NULL)
, m_valid_rect(0, 0)
{
m_TEX0 = TEX0;
m_TEXA = TEXA;

View File

@ -104,6 +104,7 @@ public:
std::shared_ptr<Palette> m_palette_obj;
GSTexture* m_palette;
uint32 m_valid[MAX_PAGES]; // each uint32 bits map to the 32 blocks of that page
GSVector4i m_valid_rect;
bool m_target;
bool m_complete;
bool m_repeating;