mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix really wacky edge case when switching to Auto FrameSkip from "skip buffered" mode.
Fixes issue #20596
This commit is contained in:
1 parent
2cebaa7509
commit
a80756574c
4 files changed
+15
-4
No files matched your search
@@ -1460,9 +1460,6 @@ void Config::PostLoadCleanup(bool gameSpecific) {
|
||||
if (g_Config.sCustomDriver == "Default") {
|
||||
g_Config.sCustomDriver = "";
|
||||
}
|
||||
|
||||
// Convert old volume settings.
|
||||
|
||||
}
|
||||
|
||||
void Config::PreSaveCleanup(bool gameSpecific) {
|
||||
|
||||
@@ -425,7 +425,7 @@ static void DoFrameTiming(bool throttle, bool *skipFrame, float scaledTimestep,
|
||||
|
||||
// Auto-frameskip automatically if speed limit is set differently than the default.
|
||||
int frameSkipNum = DisplayCalculateFrameSkip();
|
||||
if (g_Config.bAutoFrameSkip) {
|
||||
if (g_Config.bAutoFrameSkip && !g_Config.bSkipBufferEffects) {
|
||||
// autoframeskip
|
||||
// Argh, we are falling behind! Let's skip a frame and see if we catch up.
|
||||
if (curFrameTime > nextFrameTime && doFrameSkip) {
|
||||
@@ -694,6 +694,14 @@ void __DisplayFlip(int cyclesLate) {
|
||||
} else {
|
||||
gstate_c.skipDrawReason &= ~SKIPDRAW_SKIPFRAME;
|
||||
numSkippedFrames = 0;
|
||||
|
||||
// NOTE!! It can happen that if we just toggled frameskip (especially auto), we are still in a state
|
||||
// where we don't have a framebuffer bound, from the last frame. But framebuffermanager still might think
|
||||
// that we're in non-buffered mode.
|
||||
if (gpu->GetFramebufferManagerCommon() && !gpu->GetFramebufferManagerCommon()->UseBufferedRendering() && !g_Config.bSkipBufferEffects) {
|
||||
gpu->GetFramebufferManagerCommon()->ForceUseBufferedRendering(!g_Config.bSkipBufferEffects);
|
||||
gstate_c.skipDrawReason &= ~SKIPDRAW_NON_DISPLAYED_FB;
|
||||
}
|
||||
}
|
||||
|
||||
// Returning here with coreState == CORE_NEXTFRAME causes a buffer flip to happen (next frame).
|
||||
|
||||
@@ -1707,6 +1707,8 @@ void FramebufferManagerCommon::CopyDisplayToOutput(bool reallyDirty) {
|
||||
} else if (useBufferedRendering_) {
|
||||
WARN_LOG(Log::FrameBuf, "Using buffered rendering, and current VFB lacks an FBO: %08x", vfb->fb_address);
|
||||
} else {
|
||||
// This is OK because here we're in "skip buffered" mode, so even if we haven't presented
|
||||
// we will have a render target.
|
||||
presentation_->NotifyPresent();
|
||||
}
|
||||
|
||||
|
||||
@@ -385,6 +385,10 @@ public:
|
||||
return useBufferedRendering_;
|
||||
}
|
||||
|
||||
void ForceUseBufferedRendering(bool buf) {
|
||||
useBufferedRendering_ = true;
|
||||
}
|
||||
|
||||
// TODO: Maybe just include the last depth buffer address in this, too.
|
||||
bool MayIntersectFramebufferColor(u32 start) const {
|
||||
// Clear the cache/kernel bits.
|
||||
|
||||
Reference in new issue
Block a user