summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/FramebufferManager.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@users.noreply.github.com>2016-11-20 12:34:11 +1000
committerGitHub <noreply@github.com>2016-11-20 12:34:11 +1000
commit3d21169dfc401e2ce92da9f32ce4740e82838c98 (patch)
treeb312d81e3443338ca82a9f527253c5e57fb549c8 /Source/Core/VideoBackends/D3D/FramebufferManager.cpp
parent2a5d22b3a7c9ba4a67107cbdbe3cbea87c6a2af2 (diff)
parentd6d33411834df82dea8e7c250925ccfe595e0cc2 (diff)
Merge pull request #4458 from stenzek/strided-xfb
D3D/Vulkan: Handle strided XFB copies
Diffstat (limited to 'Source/Core/VideoBackends/D3D/FramebufferManager.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/FramebufferManager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D/FramebufferManager.cpp b/Source/Core/VideoBackends/D3D/FramebufferManager.cpp
index 3f7ab4c528..e95b2ab70e 100644
--- a/Source/Core/VideoBackends/D3D/FramebufferManager.cpp
+++ b/Source/Core/VideoBackends/D3D/FramebufferManager.cpp
@@ -275,8 +275,10 @@ void FramebufferManager::CopyToRealXFB(u32 xfbAddr, u32 fbStride, u32 fbHeight,
const EFBRectangle& sourceRc, float Gamma)
{
u8* dst = Memory::GetPointer(xfbAddr);
- // below div2 due to dx using pixel width
- s_xfbEncoder.Encode(dst, fbStride / 2, fbHeight, sourceRc, Gamma);
+
+ // The destination stride can differ from the copy region width, in which case the pixels
+ // outside the copy region should not be written to.
+ s_xfbEncoder.Encode(dst, static_cast<u32>(sourceRc.GetWidth()), fbHeight, sourceRc, Gamma);
}
std::unique_ptr<XFBSourceBase> FramebufferManager::CreateXFBSource(unsigned int target_width,