summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/TextureEncoder.cpp
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2016-12-08 06:06:05 -0500
committerGitHub <noreply@github.com>2016-12-08 06:06:05 -0500
commitd7dc854b505b5c3c604ed07b7c128726737c391c (patch)
tree820bdb640091e5726e4c52d42f819956f82bfd28 /Source/Core/VideoBackends/Software/TextureEncoder.cpp
parent7192789c1162e2deb5923151d05158f459448ab9 (diff)
parent31ccfffd386cdf7bfafdccda240a179431ecc98c (diff)
Merge pull request #4482 from leoetlino/align
Common: Add alignment header
Diffstat (limited to 'Source/Core/VideoBackends/Software/TextureEncoder.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/TextureEncoder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/Software/TextureEncoder.cpp b/Source/Core/VideoBackends/Software/TextureEncoder.cpp
index 15e159b30f..dcb29de2a5 100644
--- a/Source/Core/VideoBackends/Software/TextureEncoder.cpp
+++ b/Source/Core/VideoBackends/Software/TextureEncoder.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "Common/Align.h"
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
#include "Common/MsgHandler.h"
@@ -215,7 +216,7 @@ static void SetSpans(int sBlkSize, int tBlkSize, s32* tSpan, s32* sBlkSpan, s32*
{
// width is 1 less than the number of pixels of width
u32 width = bpmem.copyTexSrcWH.x >> bpmem.triggerEFBCopy.half_scale;
- u32 alignedWidth = (width + sBlkSize) & (~(sBlkSize - 1));
+ u32 alignedWidth = Common::AlignUp(width, sBlkSize);
u32 readStride = 3 << bpmem.triggerEFBCopy.half_scale;