mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 00:34:18 +01:00
Avoid using interconnect for texture data copies
Since the interonnect copies aren't visible or tracked by texture manager, this could cause the texture manager to effectively miss the upload.
This commit is contained in:
parent
4192873744
commit
9caa845d4f
@ -62,7 +62,7 @@ namespace skyline::soc::gm20b::engine {
|
|||||||
|
|
||||||
inlineCopy(tempBuffer.data());
|
inlineCopy(tempBuffer.data());
|
||||||
|
|
||||||
interconnect.Upload(u64{state.offsetOut}, span{tempBuffer});
|
channelCtx.asCtx->gmmu.Write(state.offsetOut, span(tempBuffer));
|
||||||
} else {
|
} else {
|
||||||
inlineCopy(dstMappings.front().data());
|
inlineCopy(dstMappings.front().data());
|
||||||
}
|
}
|
||||||
|
@ -134,11 +134,12 @@ namespace skyline::soc::gm20b::engine {
|
|||||||
});
|
});
|
||||||
} else [[likely]] {
|
} else [[likely]] {
|
||||||
// Both Linear, copy as is.
|
// Both Linear, copy as is.
|
||||||
if ((*registers.pitchIn == *registers.pitchOut) && (*registers.pitchIn == *registers.lineLengthIn))
|
if ((*registers.pitchIn == *registers.pitchOut) && (*registers.pitchIn == *registers.lineLengthIn)) {
|
||||||
interconnect.Copy(dstMappings.front(), srcMappings.front());
|
std::memcpy(dstMappings.front().data(), srcMappings.front().data(), *registers.lineLengthIn * *registers.lineCount);
|
||||||
else
|
} else {
|
||||||
for (size_t linesToCopy{*registers.lineCount}, srcCopyOffset{}, dstCopyOffset{}; linesToCopy; --linesToCopy, srcCopyOffset += *registers.pitchIn, dstCopyOffset += *registers.pitchOut)
|
for (size_t linesToCopy{*registers.lineCount}, srcCopyOffset{}, dstCopyOffset{}; linesToCopy; --linesToCopy, srcCopyOffset += *registers.pitchIn, dstCopyOffset += *registers.pitchOut)
|
||||||
interconnect.Copy(dstMappings.front().subspan(dstCopyOffset, u64{*registers.lineLengthIn}), srcMappings.front().subspan(srcCopyOffset, u64{*registers.lineLengthIn}));
|
std::memcpy(dstMappings.front().subspan(dstCopyOffset).data(), srcMappings.front().subspan(srcCopyOffset).data(), *registers.lineLengthIn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user