summaryrefslogtreecommitdiffstats
path: root/src/video_core/pica.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-03-05 23:49:23 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-03-24 04:18:40 +0100
commit81004211dda74390c02973c37e89215f5ff8829b (patch)
tree2cb817907fa458c63b81c031f45fd5481b91b1da /src/video_core/pica.cpp
parentOpenGL: Don't attempt to draw empty triangle batches (diff)
downloadyuzu-81004211dda74390c02973c37e89215f5ff8829b.tar
yuzu-81004211dda74390c02973c37e89215f5ff8829b.tar.gz
yuzu-81004211dda74390c02973c37e89215f5ff8829b.tar.bz2
yuzu-81004211dda74390c02973c37e89215f5ff8829b.tar.lz
yuzu-81004211dda74390c02973c37e89215f5ff8829b.tar.xz
yuzu-81004211dda74390c02973c37e89215f5ff8829b.tar.zst
yuzu-81004211dda74390c02973c37e89215f5ff8829b.zip
Diffstat (limited to '')
-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);
}
}