summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-17 03:28:22 +0100
committerGitHub <noreply@github.com>2018-03-17 03:28:22 +0100
commitcd4e8a989cb01eb9cd10c523d8adbea7ca3cd02c (patch)
tree51c9d4b007d0e4ddcb0e6833c4908c7a13998680 /src/video_core/engines/maxwell_3d.cpp
parentMerge pull request #239 from Subv/shaders (diff)
parentGPU: Process command mode 5 (IncreaseOnce) differently from other commands. (diff)
downloadyuzu-cd4e8a989cb01eb9cd10c523d8adbea7ca3cd02c.tar
yuzu-cd4e8a989cb01eb9cd10c523d8adbea7ca3cd02c.tar.gz
yuzu-cd4e8a989cb01eb9cd10c523d8adbea7ca3cd02c.tar.bz2
yuzu-cd4e8a989cb01eb9cd10c523d8adbea7ca3cd02c.tar.lz
yuzu-cd4e8a989cb01eb9cd10c523d8adbea7ca3cd02c.tar.xz
yuzu-cd4e8a989cb01eb9cd10c523d8adbea7ca3cd02c.tar.zst
yuzu-cd4e8a989cb01eb9cd10c523d8adbea7ca3cd02c.zip
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 8c6d1172c..1b963e87e 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -8,8 +8,23 @@
namespace Tegra {
namespace Engines {
+const std::unordered_map<u32, Maxwell3D::MethodInfo> Maxwell3D::method_handlers = {
+ {0xE24, {"PrepareShader", 5, &Maxwell3D::PrepareShader}},
+};
+
Maxwell3D::Maxwell3D(MemoryManager& memory_manager) : memory_manager(memory_manager) {}
+void Maxwell3D::CallMethod(u32 method, const std::vector<u32>& parameters) {
+ auto itr = method_handlers.find(method);
+ if (itr == method_handlers.end()) {
+ LOG_ERROR(HW_GPU, "Unhandled method call %08X", method);
+ return;
+ }
+
+ ASSERT(itr->second.arguments == parameters.size());
+ (this->*itr->second.handler)(parameters);
+}
+
void Maxwell3D::WriteReg(u32 method, u32 value) {
ASSERT_MSG(method < Regs::NUM_REGS,
"Invalid Maxwell3D register, increase the size of the Regs structure");
@@ -64,5 +79,7 @@ void Maxwell3D::DrawArrays() {
LOG_WARNING(HW_GPU, "Game requested a DrawArrays, ignoring");
}
+void Maxwell3D::PrepareShader(const std::vector<u32>& parameters) {}
+
} // namespace Engines
} // namespace Tegra