For partial texture updates check the dimensions of the efb copy and the target texture, not just the binary size.

This should get Donkey Kong Country Returns characters to be as broken as they should be. They will be fixed in a later pr.

Expected result is:
efbtex: characters are always flickering or invisible, no matter what scaling or IR setting
efb2ram: characters are always working properly at 1xIR, no matter what scaling or IR setting
This commit is contained in:
mimimi085181
2015-12-18 16:59:11 +01:00
parent cafc879b7c
commit 99555a35ca
3 changed files with 117 additions and 59 deletions

View File

@ -87,16 +87,14 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(
if (srcrect.GetWidth() == dstrect.GetWidth()
&& srcrect.GetHeight() == dstrect.GetHeight())
{
const D3D11_BOX *psrcbox = nullptr;
D3D11_BOX srcbox;
if (srcrect.left != 0 || srcrect.top != 0)
{
srcbox.left = srcrect.left;
srcbox.top = srcrect.top;
srcbox.right = srcrect.right;
srcbox.bottom = srcrect.bottom;
psrcbox = &srcbox;
}
srcbox.left = srcrect.left;
srcbox.top = srcrect.top;
srcbox.right = srcrect.right;
srcbox.bottom = srcrect.bottom;
srcbox.front = 0;
srcbox.back = 1;
D3D::context->CopySubresourceRegion(
texture->GetTex(),
0,
@ -105,7 +103,7 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(
0,
srcentry->texture->GetTex(),
0,
psrcbox);
&srcbox);
return;
}
else if (!config.rendertarget)