summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/TextureCache.cpp
diff options
context:
space:
mode:
authormimimi085181 <mimimi085181@gmail.com>2015-12-18 16:59:11 +0100
committermimimi085181 <mimimi085181@gmail.com>2016-02-14 17:13:51 +0100
commit99555a35cad56b53ead422f23eae49a2251e52d6 (patch)
tree1df12da3d7075c6b86d46d214aa396e1b3393a72 /Source/Core/VideoBackends/D3D/TextureCache.cpp
parentcafc879b7cbb4822a1401f2f9c7bad337c11817b (diff)
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
Diffstat (limited to 'Source/Core/VideoBackends/D3D/TextureCache.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/TextureCache.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/Core/VideoBackends/D3D/TextureCache.cpp b/Source/Core/VideoBackends/D3D/TextureCache.cpp
index ef0158653d..1403027dfc 100644
--- a/Source/Core/VideoBackends/D3D/TextureCache.cpp
+++ b/Source/Core/VideoBackends/D3D/TextureCache.cpp
@@ -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)