mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GPU: Oops, simplify an expression.
This commit is contained in:
parent
cbe96d3774
commit
73489349cc
2 changed files with 4 additions and 4 deletions
|
@ -3065,9 +3065,9 @@ void GPUCommon::DoBlockTransfer(u32 skipDrawReason) {
|
|||
|
||||
// Use height less one to account for width, which can be greater or less than stride.
|
||||
const uint32_t src = srcBasePtr + (srcY * srcStride + srcX) * bpp;
|
||||
const uint32_t srcSize = (height - 1) * srcStride * bpp + width * bpp;
|
||||
const uint32_t srcSize = (height - 1) * (srcStride + width) * bpp;
|
||||
const uint32_t dst = dstBasePtr + (dstY * dstStride + dstX) * bpp;
|
||||
const uint32_t dstSize = (height - 1) * dstStride * bpp + width * bpp;
|
||||
const uint32_t dstSize = (height - 1) * (dstStride + width) * bpp;
|
||||
|
||||
bool srcDstOverlap = src + srcSize > dst && dst + dstSize > src;
|
||||
bool srcValid = Memory::IsValidRange(src, srcSize);
|
||||
|
|
|
@ -795,9 +795,9 @@ void SoftGPU::Execute_BlockTransferStart(u32 op, u32 diff) {
|
|||
|
||||
// Use height less one to account for width, which can be greater or less than stride.
|
||||
const uint32_t src = srcBasePtr + (srcY * srcStride + srcX) * bpp;
|
||||
const uint32_t srcSize = (height - 1) * srcStride * bpp + width * bpp;
|
||||
const uint32_t srcSize = (height - 1) * (srcStride + width) * bpp;
|
||||
const uint32_t dst = dstBasePtr + (dstY * dstStride + dstX) * bpp;
|
||||
const uint32_t dstSize = (height - 1) * dstStride * bpp + width * bpp;
|
||||
const uint32_t dstSize = (height - 1) * (dstStride + width) * bpp;
|
||||
|
||||
// Need to flush both source and target, so we overwrite properly.
|
||||
if (Memory::IsValidRange(src, srcSize) && Memory::IsValidRange(dst, dstSize)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue