Add a compat.ini setting to allow delayed GPU readbacks, for experimentation.
This commit is contained in:
parent
a981ea2ea3
commit
4ef54169af
4 changed files with 21 additions and 5 deletions
|
@ -134,6 +134,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
|
|||
CheckSetting(iniFile, gameID, "Fontltn12Hack", &flags_.Fontltn12Hack);
|
||||
CheckSetting(iniFile, gameID, "LoadCLUTFromCurrentFrameOnly", &flags_.LoadCLUTFromCurrentFrameOnly);
|
||||
CheckSetting(iniFile, gameID, "ForceUMDReadSpeed", &flags_.ForceUMDReadSpeed);
|
||||
CheckSetting(iniFile, gameID, "AllowDelayedReadbacks", &flags_.AllowDelayedReadbacks);
|
||||
}
|
||||
|
||||
void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) {
|
||||
|
|
|
@ -104,6 +104,7 @@ struct CompatFlags {
|
|||
bool Fontltn12Hack;
|
||||
bool LoadCLUTFromCurrentFrameOnly;
|
||||
bool ForceUMDReadSpeed;
|
||||
bool AllowDelayedReadbacks;
|
||||
};
|
||||
|
||||
struct VRCompat {
|
||||
|
|
|
@ -2125,7 +2125,11 @@ bool FramebufferManagerCommon::NotifyFramebufferCopy(u32 src, u32 dst, int size,
|
|||
if (srcH == 0 || srcY + srcH > srcBuffer->bufferHeight) {
|
||||
WARN_LOG_ONCE(btdcpyheight, G3D, "Memcpy fbo download %08x -> %08x skipped, %d+%d is taller than %d", src, dst, srcY, srcH, srcBuffer->bufferHeight);
|
||||
} else if (!g_Config.bSkipGPUReadbacks && (!srcBuffer->memoryUpdated || channel == RASTER_DEPTH)) {
|
||||
ReadFramebufferToMemory(srcBuffer, 0, srcY, srcBuffer->width, srcH, channel, Draw::ReadbackMode::BLOCK);
|
||||
Draw::ReadbackMode readbackMode = Draw::ReadbackMode::BLOCK;
|
||||
if (PSP_CoreParameter().compat.flags().AllowDelayedReadbacks) {
|
||||
readbackMode = Draw::ReadbackMode::OLD_DATA_OK;
|
||||
}
|
||||
ReadFramebufferToMemory(srcBuffer, 0, srcY, srcBuffer->width, srcH, channel, readbackMode);
|
||||
srcBuffer->usageFlags = (srcBuffer->usageFlags | FB_USAGE_DOWNLOAD) & ~FB_USAGE_DOWNLOAD_CLEAR;
|
||||
}
|
||||
return false;
|
||||
|
@ -2649,7 +2653,11 @@ bool FramebufferManagerCommon::NotifyBlockTransferBefore(u32 dstBasePtr, int dst
|
|||
if (tooTall) {
|
||||
WARN_LOG_ONCE(btdheight, G3D, "Block transfer download %08x -> %08x dangerous, %d+%d is taller than %d", srcBasePtr, dstBasePtr, srcRect.y, srcRect.h, srcRect.vfb->bufferHeight);
|
||||
}
|
||||
ReadFramebufferToMemory(srcRect.vfb, static_cast<int>(srcX * srcXFactor), srcY, static_cast<int>(srcRect.w_bytes * srcXFactor), srcRect.h, RASTER_COLOR, Draw::ReadbackMode::BLOCK);
|
||||
Draw::ReadbackMode readbackMode = Draw::ReadbackMode::BLOCK;
|
||||
if (PSP_CoreParameter().compat.flags().AllowDelayedReadbacks) {
|
||||
readbackMode = Draw::ReadbackMode::OLD_DATA_OK;
|
||||
}
|
||||
ReadFramebufferToMemory(srcRect.vfb, static_cast<int>(srcX * srcXFactor), srcY, static_cast<int>(srcRect.w_bytes * srcXFactor), srcRect.h, RASTER_COLOR, readbackMode);
|
||||
srcRect.vfb->usageFlags = (srcRect.vfb->usageFlags | FB_USAGE_DOWNLOAD) & ~FB_USAGE_DOWNLOAD_CLEAR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1649,7 +1649,7 @@ NPEG90002 = true # Demo
|
|||
SYPH04036 = true # Prototype?
|
||||
|
||||
[ForceUMDReadSpeed]
|
||||
# Aces of War required slow read speed (even in Real PSP) see #11062
|
||||
# Aces of War required slow read speed (even in Real PSP), see #11062
|
||||
ULES00590 = true
|
||||
ULJM05075 = true
|
||||
# Sengoku Musou 3Z Special DLC see #9993
|
||||
|
@ -1660,11 +1660,11 @@ ULJM06024 = true
|
|||
NPUG30038 = true
|
||||
NPEG00036 = true
|
||||
|
||||
# Doko Demo Issho,load savedata error see #18420
|
||||
# Doko Demo Issho, load savedata error see #18420
|
||||
UCJS10002 = true
|
||||
UCJS18002 = true
|
||||
|
||||
# Driver 76 ,see #16904 #12054
|
||||
# Driver 76, see #16904 #12054
|
||||
ULUS10235 = true
|
||||
ULES00740 = true
|
||||
|
||||
|
@ -1682,3 +1682,9 @@ ULJS00290 = true
|
|||
ULKS46254 = true
|
||||
ULJS19057 = true
|
||||
NPJH50263 = true
|
||||
|
||||
[AllowDelayedReadbacks]
|
||||
# NOTE: This only affects Vulkan currently.
|
||||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue