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

@ -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();