2015-05-14 03:29:27 +00:00
|
|
|
// Copyright 2015 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2015-07-25 21:26:34 +00:00
|
|
|
#include <cstring>
|
2016-09-21 06:52:38 +00:00
|
|
|
#include "video_core/pica.h"
|
2016-03-03 03:16:38 +00:00
|
|
|
#include "video_core/pica_state.h"
|
2017-01-28 23:12:09 +00:00
|
|
|
#include "video_core/regs_pipeline.h"
|
2015-05-14 03:29:27 +00:00
|
|
|
|
|
|
|
namespace Pica {
|
|
|
|
|
|
|
|
State g_state;
|
|
|
|
|
|
|
|
void Init() {
|
2016-03-05 22:49:23 +00:00
|
|
|
g_state.Reset();
|
2015-05-14 03:29:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Shutdown() {
|
2016-12-17 09:21:16 +00:00
|
|
|
Shader::Shutdown();
|
2016-03-05 22:49:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
void Zero(T& o) {
|
|
|
|
memset(&o, 0, sizeof(o));
|
|
|
|
}
|
2015-07-23 03:25:30 +00:00
|
|
|
|
2016-03-05 22:49:23 +00:00
|
|
|
void State::Reset() {
|
|
|
|
Zero(regs);
|
|
|
|
Zero(vs);
|
|
|
|
Zero(gs);
|
|
|
|
Zero(cmd_list);
|
|
|
|
Zero(immediate);
|
2017-01-28 20:34:31 +00:00
|
|
|
primitive_assembler.Reconfigure(PipelineRegs::TriangleTopology::List);
|
2015-05-14 03:29:27 +00:00
|
|
|
}
|
|
|
|
}
|