Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tactics Ogre: Remove a redundant GPU readback operation #18599

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/Compatibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions Core/Compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ struct CompatFlags {
bool LoadCLUTFromCurrentFrameOnly;
bool ForceUMDReadSpeed;
bool AllowDelayedReadbacks;
bool TacticsOgreEliminateDebugReadback;
};

struct VRCompat {
Expand Down
4 changes: 4 additions & 0 deletions GPU/Common/FramebufferManagerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 8 additions & 0 deletions assets/compat.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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