Merge pull request #18599 from hrydgard/tactics-ogre-eliminate-readback

Tactics Ogre: Remove a redundant GPU readback operation
This commit is contained in:
Henrik Rydgård 2023-12-22 22:51:21 +01:00 committed by GitHub
commit cf81ae1b4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 0 deletions

View file

@ -135,6 +135,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
CheckSetting(iniFile, gameID, "LoadCLUTFromCurrentFrameOnly", &flags_.LoadCLUTFromCurrentFrameOnly);
CheckSetting(iniFile, gameID, "ForceUMDReadSpeed", &flags_.ForceUMDReadSpeed);
CheckSetting(iniFile, gameID, "AllowDelayedReadbacks", &flags_.AllowDelayedReadbacks);
CheckSetting(iniFile, gameID, "TacticsOgreEliminateDebugReadback", &flags_.TacticsOgreEliminateDebugReadback);
}
void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) {

View file

@ -105,6 +105,7 @@ struct CompatFlags {
bool LoadCLUTFromCurrentFrameOnly;
bool ForceUMDReadSpeed;
bool AllowDelayedReadbacks;
bool TacticsOgreEliminateDebugReadback;
};
struct VRCompat {

View file

@ -2683,6 +2683,10 @@ bool FramebufferManagerCommon::NotifyBlockTransferBefore(u32 dstBasePtr, int dst
// NotifyBlockTransferAfter will take care of the rest.
return false;
} else if (srcBuffer) {
if (width == 48 && height == 48 && srcY == 224 && srcX == 432 && PSP_CoreParameter().compat.flags().TacticsOgreEliminateDebugReadback) {
return false;
}
WARN_LOG_N_TIMES(btd, 10, G3D, "Block transfer readback %dx%d %dbpp from %08x (x:%d y:%d stride:%d) -> %08x (x:%d y:%d stride:%d)",
width, height, bpp,
srcBasePtr, srcRect.x_bytes / bpp, srcRect.y, srcStride,

View file

@ -1716,3 +1716,11 @@ NPJH50263 = true
# Added for easy experimentation. Many games using readbacks do not work well delaying them, though.
# For example, Motorstorm lighting adaptation goes into self-oscillation (!)
# UCES01250 = true
[TacticsOgreEliminateDebugReadback]
ULUS10565 = true
ULES01500 = true
ULJM05753 = true
NPJH50348 = true
ULJM06009 = true
UCKS45164 = true