mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user