summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPStructs.cpp
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-05-03 17:16:18 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-05-20 11:28:15 -0400
commit9d161b4170a5c1df8065895666b8b2c1e06f94e7 (patch)
tree58164b14d8374e1427674a7f4d79b0bf7a2f6008 /Source/Core/VideoCommon/BPStructs.cpp
parent1ae8edc1d006b321941983ad262b9f16c16e9074 (diff)
BPStructs: Consistently put the two shared copy args first
And rename them so they make a bit more sense.
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/BPStructs.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp
index b8cd8d727e..20475fc5f5 100644
--- a/Source/Core/VideoCommon/BPStructs.cpp
+++ b/Source/Core/VideoCommon/BPStructs.cpp
@@ -198,14 +198,16 @@ static void BPWritten(const BPCmd& bp)
// The bottom right is within the rectangle
// The values in bpmem.copyTexSrcXY and bpmem.copyTexSrcWH are updated in case 0x49 and 0x4a in this function
- EFBRectangle rc;
- rc.left = (int)bpmem.copyTexSrcXY.x;
- rc.top = (int)bpmem.copyTexSrcXY.y;
+ u32 destAddr = bpmem.copyTexDest << 5;
+
+ EFBRectangle srcRect;
+ srcRect.left = (int)bpmem.copyTexSrcXY.x;
+ srcRect.top = (int)bpmem.copyTexSrcXY.y;
// Here Width+1 like Height, otherwise some textures are corrupted already since the native resolution.
// TODO: What's the behavior of out of bound access?
- rc.right = (int)(bpmem.copyTexSrcXY.x + bpmem.copyTexSrcWH.x + 1);
- rc.bottom = (int)(bpmem.copyTexSrcXY.y + bpmem.copyTexSrcWH.y + 1);
+ srcRect.right = (int)(bpmem.copyTexSrcXY.x + bpmem.copyTexSrcWH.x + 1);
+ srcRect.bottom = (int)(bpmem.copyTexSrcXY.y + bpmem.copyTexSrcWH.y + 1);
UPE_Copy PE_copy = bpmem.triggerEFBCopy;
@@ -213,11 +215,11 @@ static void BPWritten(const BPCmd& bp)
if (PE_copy.copy_to_xfb == 0)
{
if (g_ActiveConfig.bShowEFBCopyRegions)
- stats.efb_regions.push_back(rc);
+ stats.efb_regions.push_back(srcRect);
- CopyEFB(bpmem.copyTexDest << 5, PE_copy.tp_realFormat(),
- bpmem.zcontrol.pixel_format, rc, PE_copy.intensity_fmt,
- PE_copy.half_scale);
+ CopyEFB(destAddr, srcRect,
+ PE_copy.tp_realFormat(), bpmem.zcontrol.pixel_format,
+ PE_copy.intensity_fmt, PE_copy.half_scale);
}
else
{
@@ -240,17 +242,18 @@ static void BPWritten(const BPCmd& bp)
xfbLines = MAX_XFB_HEIGHT;
}
- Renderer::RenderToXFB(bpmem.copyTexDest << 5,
- bpmem.copyMipMapStrideChannels << 4,
- (u32)xfbLines,
- rc,
+ u32 width = bpmem.copyMipMapStrideChannels << 4;
+ u32 height = xfbLines;
+
+ Renderer::RenderToXFB(destAddr, srcRect,
+ width, height,
s_gammaLUT[PE_copy.gamma]);
}
// Clear the rectangular region after copying it.
if (PE_copy.clear)
{
- ClearScreen(rc);
+ ClearScreen(srcRect);
}
return;