summaryrefslogtreecommitdiffstats
path: root/src/video_core/pica.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/pica.cpp')
-rw-r--r--src/video_core/pica.cpp15
1 files changed, 14 insertions, 1 deletions
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 <typename T>
+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);
}
}