gsdx tc: improve haunting ground hack to remove the bloom effect

Just clear the buffer. The generic solution will be a copy from buffer A
to buffer B But it requires
1/ a big buffer A (otherwise it would overflow)
2/ a line width rescaling (+ the upscaling mess support)
This commit is contained in:
Gregory Hainaut 2016-10-19 19:29:09 +02:00
parent 8958b2042f
commit 264b764d6e
1 changed files with 10 additions and 4 deletions

View File

@ -746,12 +746,18 @@ void GSTextureCache::InvalidateVideoMem(GSOffset* off, const GSVector4i& rect, b
Target* t = *j; Target* t = *j;
if (t->m_TEX0.TBP0 > bp && t->m_end_block < end_block) { if (t->m_TEX0.TBP0 > bp && t->m_end_block < end_block) {
m_dst[type].erase(j); // Haunting ground expect to clean buffer B with a rendering into buffer A.
GL_CACHE("TC: Remove Sub Target(%s) %d (0x%x)", to_string(type), // Situation is quite messy as it would require to extract the data from the buffer A
// and to move in buffer B.
//
// Of course buffers don't share the same line width. You can't delete the buffer as next
// miss will load invalid data.
//
// So just clear the damn buffer and forget about it.
GL_CACHE("TC: Clear Sub Target(%s) %d (0x%x)", to_string(type),
t->m_texture ? t->m_texture->GetID() : 0, t->m_texture ? t->m_texture->GetID() : 0,
t->m_TEX0.TBP0); t->m_TEX0.TBP0);
delete t; m_renderer->m_dev->ClearRenderTarget(t->m_texture, 0);
continue;
} }
} }
} }