summaryrefslogtreecommitdiffstats
path: root/src/video_core/macro/macro_hle.h
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-06-04 17:42:19 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-06-24 04:09:01 +0200
commit6ce5f3120be6a65a798d3abc6fda0fe6171d0296 (patch)
treec63966fe5761248a4f48f4ccb4567b6213773fa4 /src/video_core/macro/macro_hle.h
parentMerge pull request #4138 from Morph1984/GyroscopeZeroDriftMode (diff)
downloadyuzu-6ce5f3120be6a65a798d3abc6fda0fe6171d0296.tar
yuzu-6ce5f3120be6a65a798d3abc6fda0fe6171d0296.tar.gz
yuzu-6ce5f3120be6a65a798d3abc6fda0fe6171d0296.tar.bz2
yuzu-6ce5f3120be6a65a798d3abc6fda0fe6171d0296.tar.lz
yuzu-6ce5f3120be6a65a798d3abc6fda0fe6171d0296.tar.xz
yuzu-6ce5f3120be6a65a798d3abc6fda0fe6171d0296.tar.zst
yuzu-6ce5f3120be6a65a798d3abc6fda0fe6171d0296.zip
Diffstat (limited to 'src/video_core/macro/macro_hle.h')
-rw-r--r--src/video_core/macro/macro_hle.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/video_core/macro/macro_hle.h b/src/video_core/macro/macro_hle.h
new file mode 100644
index 000000000..de7f43dc4
--- /dev/null
+++ b/src/video_core/macro/macro_hle.h
@@ -0,0 +1,43 @@
+// Copyright 2020 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <memory>
+#include <optional>
+#include <vector>
+#include "common/common_types.h"
+#include "video_core/macro/macro.h"
+
+namespace Tegra {
+
+namespace Engines {
+class Maxwell3D;
+}
+
+using HLEFunction = void (*)(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters);
+
+class HLEMacro {
+public:
+ HLEMacro(Engines::Maxwell3D& maxwell3d);
+ ~HLEMacro();
+ std::optional<std::unique_ptr<CachedMacro>> GetHLEProgram(u64 hash) const;
+
+private:
+ Engines::Maxwell3D& maxwell3d;
+};
+
+class HLEMacroImpl : public CachedMacro {
+public:
+ explicit HLEMacroImpl(Engines::Maxwell3D& maxwell3d, HLEFunction func);
+ ~HLEMacroImpl();
+
+ void Execute(const std::vector<u32>& parameters, u32 method) override;
+
+private:
+ Engines::Maxwell3D& maxwell3d;
+ HLEFunction func;
+};
+
+} // namespace Tegra