mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 09:43:45 +01:00
HLE: Detect video buffer copies.
These are common and can help us notify the texture cache appropriately.
This commit is contained in:
1 parent
2d9719ed26
commit
ec3d408da0
1 file changed
+14
@@ -160,6 +160,13 @@ static int Replace_memcpy() {
|
||||
NotifyMemInfo(MemBlockFlags::READ, srcPtr, bytes, tag.c_str(), tag.size());
|
||||
NotifyMemInfo(MemBlockFlags::WRITE, destPtr, bytes, tag.c_str(), tag.size());
|
||||
|
||||
// It's pretty common that games will copy video data.
|
||||
if (tag == "ReplaceMemcpy/VideoDecode" || tag == "ReplaceMemcpy/VideoDecodeRange") {
|
||||
if (bytes == 512 * 272 * 4) {
|
||||
gpu->NotifyVideoUpload(destPtr, bytes, 512, GE_FORMAT_8888);
|
||||
}
|
||||
}
|
||||
|
||||
return 10 + bytes / 4; // approximation
|
||||
}
|
||||
|
||||
@@ -203,6 +210,13 @@ static int Replace_memcpy_jak() {
|
||||
NotifyMemInfo(MemBlockFlags::READ, srcPtr, bytes, tag.c_str(), tag.size());
|
||||
NotifyMemInfo(MemBlockFlags::WRITE, destPtr, bytes, tag.c_str(), tag.size());
|
||||
|
||||
// It's pretty common that games will copy video data.
|
||||
if (tag == "ReplaceMemcpy/VideoDecode" || tag == "ReplaceMemcpy/VideoDecodeRange") {
|
||||
if (bytes == 512 * 272 * 4) {
|
||||
gpu->NotifyVideoUpload(destPtr, bytes, 512, GE_FORMAT_8888);
|
||||
}
|
||||
}
|
||||
|
||||
return 5 + bytes * 8 + 2; // approximation. This is a slow memcpy - a byte copy loop..
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user