From 81004211dda74390c02973c37e89215f5ff8829b Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 5 Mar 2016 14:49:23 -0800 Subject: Pica: Improve accuracy of immediate-mode support This partially fixes Etrian Odyssey IV. --- src/video_core/pica.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/video_core/pica.cpp') diff --git a/src/video_core/pica.cpp b/src/video_core/pica.cpp index 32ad72674..ccbaf071b 100644 --- a/src/video_core/pica.cpp +++ b/src/video_core/pica.cpp @@ -493,12 +493,25 @@ std::string Regs::GetCommandName(int index) { } void Init() { + g_state.Reset(); } void Shutdown() { Shader::Shutdown(); +} + +template +void Zero(T& o) { + memset(&o, 0, sizeof(o)); +} - memset(&g_state, 0, sizeof(State)); +void State::Reset() { + Zero(regs); + Zero(vs); + Zero(gs); + Zero(cmd_list); + Zero(immediate); + primitive_assembler.Reconfigure(Regs::TriangleTopology::List); } } -- cgit v1.2.3