1
0
Fork 0

Sync GPU state after loading (fix FE terrain bug)

This commit is contained in:
Hamish Milne 2020-04-11 10:28:52 +01:00
parent 7b3a8e9bf5
commit a210e7e2bd
5 changed files with 12 additions and 3 deletions

View File

@ -44,6 +44,7 @@
#include "core/rpc/rpc_server.h"
#include "core/settings.h"
#include "network/network.h"
#include "video_core/renderer_base.h"
#include "video_core/video_core.h"
namespace Core {
@ -586,6 +587,7 @@ void System::serialize(Archive& ar, const unsigned int file_version) {
Service::GSP::SetGlobalModule(*this);
memory->SetDSP(*dsp_core);
cheat_engine->Connect();
VideoCore::g_renderer->Sync();
}
}

View File

@ -87,5 +87,7 @@ public:
virtual void LoadDiskResources(const std::atomic_bool& stop_loading,
const DiskResourceLoadCallback& callback) {}
virtual void SyncEntireState() {}
};
} // namespace VideoCore

View File

@ -28,3 +28,7 @@ void RendererBase::RefreshRasterizerSetting() {
}
}
}
void RendererBase::Sync() {
rasterizer->SyncEntireState();
}

View File

@ -68,6 +68,7 @@ public:
}
void RefreshRasterizerSetting();
void Sync();
protected:
Frontend::EmuWindow& render_window; ///< Reference to the render window handle.

View File

@ -61,6 +61,9 @@ public:
u32 pixel_stride, ScreenInfo& screen_info) override;
bool AccelerateDrawBatch(bool is_indexed) override;
/// Syncs entire status to match PICA registers
void SyncEntireState() override;
private:
struct SamplerInfo {
using TextureConfig = Pica::TexturingRegs::TextureConfig;
@ -132,9 +135,6 @@ private:
GLvec3 view;
};
/// Syncs entire status to match PICA registers
void SyncEntireState();
/// Syncs the clip enabled status to match the PICA register
void SyncClipEnabled();