diff options
author | bunnei <bunneidev@gmail.com> | 2022-01-26 21:39:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-26 21:39:59 +0100 |
commit | 40050c1188ecae2688488e8109b708e04295b480 (patch) | |
tree | 115f40e763afef8b376874150d536c23f12bd02e /src/video_core/macro/macro_hle.h | |
parent | Merge pull request #7769 from german77/no-control (diff) | |
parent | video_core/macro: Add missing <cstring> header (diff) | |
download | yuzu-40050c1188ecae2688488e8109b708e04295b480.tar yuzu-40050c1188ecae2688488e8109b708e04295b480.tar.gz yuzu-40050c1188ecae2688488e8109b708e04295b480.tar.bz2 yuzu-40050c1188ecae2688488e8109b708e04295b480.tar.lz yuzu-40050c1188ecae2688488e8109b708e04295b480.tar.xz yuzu-40050c1188ecae2688488e8109b708e04295b480.tar.zst yuzu-40050c1188ecae2688488e8109b708e04295b480.zip |
Diffstat (limited to 'src/video_core/macro/macro_hle.h')
-rw-r--r-- | src/video_core/macro/macro_hle.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/video_core/macro/macro_hle.h b/src/video_core/macro/macro_hle.h index cb3bd1600..b86ba84a1 100644 --- a/src/video_core/macro/macro_hle.h +++ b/src/video_core/macro/macro_hle.h @@ -5,10 +5,7 @@ #pragma once #include <memory> -#include <optional> -#include <vector> #include "common/common_types.h" -#include "video_core/macro/macro.h" namespace Tegra { @@ -16,29 +13,17 @@ namespace Engines { class Maxwell3D; } -using HLEFunction = void (*)(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters); - class HLEMacro { public: explicit 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; + // Allocates and returns a cached macro if the hash matches a known function. + // Returns nullptr otherwise. + [[nodiscard]] std::unique_ptr<CachedMacro> GetHLEProgram(u64 hash) const; private: Engines::Maxwell3D& maxwell3d; - HLEFunction func; }; } // namespace Tegra |