mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Vulkan: Skip flips, not draw, for vsync unthrottle.
This commit is contained in:
parent
2ecaa61fa5
commit
46770aba3a
1 changed files with 4 additions and 12 deletions
|
@ -558,16 +558,7 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) {
|
|||
bool doFrameSkip = g_Config.iFrameSkip != 0;
|
||||
|
||||
bool fastForwardNeedsSkip = g_Config.iFastForwardMode == (int)FastForwardMode::SKIP_DRAW;
|
||||
if (g_Config.bVSync && GetGPUBackend() == GPUBackend::VULKAN) {
|
||||
// Vulkan doesn't support the interval setting, so we force frameskip.
|
||||
fastForwardNeedsSkip = true;
|
||||
// If it's not a clean multiple of 60, we may need frameskip to achieve it.
|
||||
if (fpsLimit == 0 || (fpsLimit >= 0 && fpsLimit != 15 && fpsLimit != 30 && fpsLimit != 60)) {
|
||||
doFrameSkip = true;
|
||||
}
|
||||
}
|
||||
if (!throttle && fastForwardNeedsSkip) {
|
||||
doFrameSkip = true;
|
||||
skipFrame = true;
|
||||
if (numSkippedFrames >= 7) {
|
||||
skipFrame = false;
|
||||
|
@ -751,9 +742,10 @@ void __DisplayFlip(int cyclesLate) {
|
|||
bool duplicateFrames = g_Config.bRenderDuplicateFrames && g_Config.iFrameSkip == 0;
|
||||
|
||||
bool fastForwardNeedsSkip = g_Config.iFastForwardMode != (int)FastForwardMode::CONTINUOUS;
|
||||
bool fastForwardSkipFlip = g_Config.iFastForwardMode == (int)FastForwardMode::SKIP_FLIP;
|
||||
if (g_Config.bVSync && GetGPUBackend() == GPUBackend::VULKAN) {
|
||||
// Vulkan doesn't support the interval setting, so we force frameskip.
|
||||
fastForwardNeedsSkip = true;
|
||||
// Vulkan doesn't support the interval setting, so we force skipping the flip.
|
||||
fastForwardSkipFlip = true;
|
||||
}
|
||||
|
||||
// postEffectRequiresFlip is not compatible with frameskip fast-forward, see #12325.
|
||||
|
@ -788,7 +780,7 @@ void __DisplayFlip(int cyclesLate) {
|
|||
bool forceNoFlip = false;
|
||||
// Alternative to frameskip fast-forward, where we draw everything.
|
||||
// Useful if skipping a frame breaks graphics or for checking drawing speed.
|
||||
if (g_Config.iFastForwardMode == (int)FastForwardMode::SKIP_FLIP && !FrameTimingThrottled()) {
|
||||
if (fastForwardSkipFlip && !FrameTimingThrottled()) {
|
||||
static double lastFlip = 0;
|
||||
double now = time_now_d();
|
||||
if ((now - lastFlip) < 1.0f / System_GetPropertyFloat(SYSPROP_DISPLAY_REFRESH_RATE)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue