mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-27 01:05:28 +03: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());
|
||||
|
||||
interconnect.Upload(u64{state.offsetOut}, span{tempBuffer});
|
||||
channelCtx.asCtx->gmmu.Write(state.offsetOut, span(tempBuffer));
|
||||
} else {
|
||||
inlineCopy(dstMappings.front().data());
|
||||
}
|
||||
|
@ -134,11 +134,12 @@ namespace skyline::soc::gm20b::engine {
|
||||
});
|
||||
} else [[likely]] {
|
||||
// Both Linear, copy as is.
|
||||
if ((*registers.pitchIn == *registers.pitchOut) && (*registers.pitchIn == *registers.lineLengthIn))
|
||||
interconnect.Copy(dstMappings.front(), srcMappings.front());
|
||||
else
|
||||
if ((*registers.pitchIn == *registers.pitchOut) && (*registers.pitchIn == *registers.lineLengthIn)) {
|
||||
std::memcpy(dstMappings.front().data(), srcMappings.front().data(), *registers.lineLengthIn * *registers.lineCount);
|
||||
} else {
|
||||
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