Fix issue where PresentedThisFrame didn't work on SoftGPU, causing issues

This commit is contained in:
Henrik Rydgård 2024-10-16 15:25:53 +02:00
parent beed90ba8b
commit a062e5192b
7 changed files with 13 additions and 7 deletions

View File

@ -722,10 +722,6 @@ void GPUCommon::PSPFrame() {
GPURecord::NotifyBeginFrame();
}
bool GPUCommon::PresentedThisFrame() const {
return framebufferManager_ ? framebufferManager_->PresentedThisFrame() : true;
}
void GPUCommon::SlowRunLoop(DisplayList &list) {
const bool dumpThisFrame = dumpThisFrame_;
while (downcount > 0) {

View File

@ -224,8 +224,6 @@ public:
fullInfo = reportingFullInfo_;
}
bool PresentedThisFrame() const override;
protected:
void ClearCacheNextFrame() override {}

View File

@ -540,6 +540,10 @@ void GPUCommonHW::CopyDisplayToOutput(bool reallyDirty) {
gstate_c.Dirty(DIRTY_TEXTURE_IMAGE);
}
bool GPUCommonHW::PresentedThisFrame() const {
return framebufferManager_->PresentedThisFrame();
}
void GPUCommonHW::DoState(PointerWrap &p) {
GPUCommon::DoState(p);

View File

@ -68,6 +68,8 @@ public:
void FastRunLoop(DisplayList &list) override;
void ExecuteOp(u32 op, u32 diff) override;
bool PresentedThisFrame() const override;
private:
void CheckDepthUsage(VirtualFramebuffer *vfb) override;
void CheckFlushOp(int cmd, u32 diff);

View File

@ -656,6 +656,10 @@ void SoftGPU::CopyDisplayToOutput(bool reallyDirty) {
MarkDirty(displayFramebuf_, displayStride_, 272, displayFormat_, SoftGPUVRAMDirty::CLEAR);
}
bool SoftGPU::PresentedThisFrame() const {
return presentation_->PresentedThisFrame();
}
void SoftGPU::MarkDirty(uint32_t addr, uint32_t stride, uint32_t height, GEBufferFormat fmt, SoftGPUVRAMDirty value) {
uint32_t bytes = height * stride * (fmt == GE_FORMAT_8888 ? 4 : 2);
MarkDirty(addr, bytes, value);

View File

@ -209,6 +209,8 @@ public:
typedef void (SoftGPU::*CmdFunc)(u32 op, u32 diff);
bool PresentedThisFrame() const override;
protected:
void FastRunLoop(DisplayList &list) override;
void CopyToCurrentFboFromDisplayRam(int srcwidth, int srcheight);

View File

@ -1001,7 +1001,7 @@ void GameSettingsScreen::CreateToolsSettings(UI::ViewGroup *tools) {
tools->Add(new ItemHeader(ms->T("Tools")));
const bool showRetroAchievements = true;
const bool showRetroAchievements = true; // System_GetPropertyInt(SYSPROP_DEVICE_TYPE) != DEVICE_TYPE_VR;
if (showRetroAchievements) {
auto retro = tools->Add(new Choice(sy->T("RetroAchievements")));
retro->OnClick.Add([=](UI::EventParams &) -> UI::EventReturn {