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