summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2015-09-01 02:41:16 +1200
committerScott Mansell <phiren@gmail.com>2015-09-05 23:37:24 +1200
commit52948bb3ef016abd7e35e775b17b7cf3f487d49c (patch)
tree5592f0732af5628ff02dc2a70177acf8217b16f4 /Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
parenta47bbee02a3d8f6f585961c15ba9e6727a64df49 (diff)
Cleanup and unify handling of efb copy stride.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
index cdb7f75102..3285ff8602 100644
--- a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
+++ b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
@@ -87,7 +87,7 @@ void PSTextureEncoder::Shutdown()
SAFE_RELEASE(m_out);
}
-size_t PSTextureEncoder::Encode(u8* dst, unsigned int dstFormat,
+size_t PSTextureEncoder::Encode(u8* dst, unsigned int dstFormat, size_t dstStride,
PEControl::PixelFormat srcFormat, const EFBRectangle& srcRect,
bool isIntensity, bool scaleByHalf)
{
@@ -189,13 +189,13 @@ size_t PSTextureEncoder::Encode(u8* dst, unsigned int dstFormat,
for (unsigned int y = 0; y < numBlocksY; ++y)
{
memcpy(dst, src, cacheLinesPerRow*32);
- dst += bpmem.copyMipMapStrideChannels*32;
+ dst += dstStride;
src += map.RowPitch;
}
D3D::context->Unmap(m_outStage, 0);
- encodeSize = bpmem.copyMipMapStrideChannels*32 * numBlocksY;
+ encodeSize = dstStride * numBlocksY;
}
// Restore API