LittleBigPlanet: Compat flag to work around smoke rendering problem

See #16030

Hopefully just for the release. There might be a tweak of our heuristics
that can fix it too, but much riskier at this point.
This commit is contained in:
Henrik Rydgård 2022-12-07 13:23:33 +01:00
parent bafe14e9ee
commit 7aab096791
5 changed files with 16 additions and 1 deletions

View File

@ -123,6 +123,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
CheckSetting(iniFile, gameID, "EnglishOrJapaneseOnly", &flags_.EnglishOrJapaneseOnly);
CheckSetting(iniFile, gameID, "OldAdrenoPixelDepthRoundingGL", &flags_.OldAdrenoPixelDepthRoundingGL);
CheckSetting(iniFile, gameID, "ForceCircleButtonConfirm", &flags_.ForceCircleButtonConfirm);
CheckSetting(iniFile, gameID, "DisallowFramebufferAtOffset", &flags_.DisallowFramebufferAtOffset);
}
void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) {

View File

@ -94,6 +94,7 @@ struct CompatFlags {
bool EnglishOrJapaneseOnly;
bool OldAdrenoPixelDepthRoundingGL;
bool ForceCircleButtonConfirm;
bool DisallowFramebufferAtOffset;
};
struct VRCompat {

View File

@ -429,7 +429,7 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(Framebuffer
vfb->height = drawing_height;
}
break;
} else if (v->fb_stride == params.fb_stride && v->fb_format == params.fb_format && !PSP_CoreParameter().compat.flags().SplitFramebufferMargin) {
} else if (!PSP_CoreParameter().compat.flags().DisallowFramebufferAtOffset && v->fb_stride == params.fb_stride && v->fb_format == params.fb_format && !PSP_CoreParameter().compat.flags().SplitFramebufferMargin) {
u32 v_fb_first_line_end_ptr = v->fb_address + v->fb_stride * bpp;
u32 v_fb_end_ptr = v->fb_address + v->fb_stride * v->height * bpp;

View File

@ -690,6 +690,10 @@ bool TextureCacheCommon::GetBestFramebufferCandidate(const TextureDefinition &en
relevancy -= 2;
}
if (candidate.match.xOffset != 0 && PSP_CoreParameter().compat.flags().DisallowFramebufferAtOffset) {
continue;
}
// 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.
@ -714,6 +718,7 @@ bool TextureCacheCommon::GetBestFramebufferCandidate(const TextureDefinition &en
if (i != candidates.size() - 1)
cands += "\n";
}
cands += "\n";
WARN_LOG(G3D, "GetFramebufferCandidates: Multiple (%d) candidate framebuffers. texaddr: %08x offset: %d (%dx%d stride %d, %s):\n%s",
(int)candidates.size(),

View File

@ -1394,3 +1394,11 @@ NPUG70097 = true # Demo
# Shining Ark, issue #15663
NPJH50717 = true
ULJM06223 = true
[DisallowFramebufferAtOffset]
# Little Big Planet, see #16030
UCUS98744 = true
UCES01264 = true
UCJS10107 = true
NPJG00073 = true
UCAS40262 = true