summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPStructs.cpp
diff options
context:
space:
mode:
authorMarkus Wick <markus@selfnet.de>2017-12-23 12:44:01 +0100
committerMarkus Wick <markus@selfnet.de>2018-01-06 10:36:33 +0100
commit56d153f54865ad22816e01e9353327cc0301f41c (patch)
treecb28d0e12b5f804a5be1c2ef18e78fee2c29972b /Source/Core/VideoCommon/BPStructs.cpp
parentdc08b73db19b8d59ec9ba373a4fb8d7d8639c9e3 (diff)
VideoCommon: Apply the yscale as upscaling of the XFB.
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/BPStructs.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp
index 8909823b7a..609f82903a 100644
--- a/Source/Core/VideoCommon/BPStructs.cpp
+++ b/Source/Core/VideoCommon/BPStructs.cpp
@@ -229,9 +229,9 @@ static void BPWritten(const BPCmd& bp)
// bpmem.zcontrol.pixel_format to PEControl::Z24 is when the game wants to copy from ZBuffer
// (Zbuffer uses 24-bit Format)
bool is_depth_copy = bpmem.zcontrol.pixel_format == PEControl::Z24;
- g_texture_cache->CopyRenderTargetToTexture(destAddr, PE_copy.tp_realFormat(), destStride,
- is_depth_copy, srcRect, !!PE_copy.intensity_fmt,
- !!PE_copy.half_scale, 1.0f, 1.0f);
+ g_texture_cache->CopyRenderTargetToTexture(
+ destAddr, PE_copy.tp_realFormat(), srcRect.GetWidth(), srcRect.GetHeight(), destStride,
+ is_depth_copy, srcRect, !!PE_copy.intensity_fmt, !!PE_copy.half_scale, 1.0f, 1.0f);
}
else
{
@@ -250,8 +250,6 @@ static void BPWritten(const BPCmd& bp)
float num_xfb_lines = 1.0f + bpmem.copyTexSrcWH.y * yScale;
- srcRect.bottom = static_cast<int>(bpmem.copyTexSrcXY.y + num_xfb_lines);
-
u32 height = static_cast<u32>(num_xfb_lines);
DEBUG_LOG(VIDEO, "RenderToXFB: destAddr: %08x | srcRect {%d %d %d %d} | fbWidth: %u | "
@@ -260,9 +258,9 @@ static void BPWritten(const BPCmd& bp)
bpmem.copyTexSrcWH.x + 1, destStride, height, yScale);
bool is_depth_copy = bpmem.zcontrol.pixel_format == PEControl::Z24;
- g_texture_cache->CopyRenderTargetToTexture(destAddr, EFBCopyFormat::XFB, destStride,
- is_depth_copy, srcRect, false, false, yScale,
- s_gammaLUT[PE_copy.gamma]);
+ g_texture_cache->CopyRenderTargetToTexture(destAddr, EFBCopyFormat::XFB, srcRect.GetWidth(),
+ height, destStride, is_depth_copy, srcRect, false,
+ false, yScale, s_gammaLUT[PE_copy.gamma]);
// This stays in to signal end of a "frame"
g_renderer->RenderToXFB(destAddr, srcRect, destStride, height, s_gammaLUT[PE_copy.gamma]);