mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 04:39:34 +00:00
Tweak ForceMax60Fps to work for Killzone
This commit is contained in:
parent
987bfc79ef
commit
1b3b1acefa
@ -823,7 +823,10 @@ u32 sceDisplaySetFramebuf(u32 topaddr, int linesize, int pixelformat, int sync)
|
||||
|
||||
s64 delayCycles = 0;
|
||||
// Don't count transitions between display off and display on.
|
||||
if (topaddr != 0 && topaddr != framebuf.topaddr && framebuf.topaddr != 0 && PSP_CoreParameter().compat.flags().ForceMax60FPS) {
|
||||
if (topaddr != 0 &&
|
||||
(topaddr != framebuf.topaddr || PSP_CoreParameter().compat.flags().SplitFramebufferMargin) &&
|
||||
framebuf.topaddr != 0 &&
|
||||
PSP_CoreParameter().compat.flags().ForceMax60FPS) {
|
||||
// sceDisplaySetFramebuf() isn't supposed to delay threads at all. This is a hack.
|
||||
// So let's only delay when it's more than 1ms.
|
||||
const s64 FLIP_DELAY_CYCLES_MIN = usToCycles(1000);
|
||||
|
@ -679,7 +679,8 @@ void FramebufferManagerCommon::CopyToColorFromOverlappingFramebuffers(VirtualFra
|
||||
// This will result in reinterpret later, if both formats are 16-bit.
|
||||
sources.push_back(CopySource{ src, RASTER_COLOR, 0, 0 });
|
||||
} else {
|
||||
// Likely irrelevant or old, if the game is changing color depth for example.
|
||||
// This shouldn't happen anymore. I think when it happened last, we still had
|
||||
// lax stride checking when video was incoming, and a resize happened causing a duplicate.
|
||||
}
|
||||
} else if (src->fb_stride == dst->fb_stride && src->fb_format == dst->fb_format) {
|
||||
u32 bytesPerPixel = BufferFormatBytesPerPixel(src->fb_format);
|
||||
|
@ -664,6 +664,8 @@ int TextureCacheCommon::GetBestCandidateIndex(const std::vector<AttachCandidate>
|
||||
int bestRelevancy = -1;
|
||||
int bestIndex = -1;
|
||||
|
||||
bool kzCompat = PSP_CoreParameter().compat.flags().SplitFramebufferMargin;
|
||||
|
||||
// We simply use the sequence counter as relevancy nowadays.
|
||||
for (int i = 0; i < (int)candidates.size(); i++) {
|
||||
const AttachCandidate &candidate = candidates[i];
|
||||
@ -677,7 +679,10 @@ int TextureCacheCommon::GetBestCandidateIndex(const std::vector<AttachCandidate>
|
||||
relevancy -= 2;
|
||||
}
|
||||
|
||||
if (candidate.fb == framebufferManager_->GetCurrentRenderVFB()) {
|
||||
// Avoid binding as texture the framebuffer we're rendering to.
|
||||
// In Killzone, we split the framebuffer but the matching algorithm can still pick the wrong one,
|
||||
// which this avoids completely.
|
||||
if (kzCompat && candidate.fb == framebufferManager_->GetCurrentRenderVFB()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1004,6 +1004,14 @@ ULUS10317 = true
|
||||
ULUS10598 = true
|
||||
ULES01578 = true
|
||||
|
||||
# Killzone: Liberation (see issue #6207)
|
||||
UCES00279 = true
|
||||
UCKS45041 = true
|
||||
UCUS98646 = true
|
||||
UCET00278 = true
|
||||
UCUS98670 = true
|
||||
UCUS98646 = true
|
||||
|
||||
[JitInvalidationHack]
|
||||
# This is an absolutely awful hack that somehow prevents issues when clearing the JIT,
|
||||
# if the game has copied code with EmuHack opcodes or something. Hopefully will be able
|
||||
|
Loading…
x
Reference in New Issue
Block a user