diff options
| author | 2020-06-24 12:18:33 +1000 | |
|---|---|---|
| committer | 2020-06-24 12:18:33 +1000 | |
| commit | f5e2aec4220ee2b72ec2986e0e60625897b2fd44 (patch) | |
| tree | aa80b16cd1b4d5937dc51f39a7d0b5908232eba1 /src | |
| parent | clear mme draw mode (diff) | |
| download | yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.tar.gz yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.tar.xz yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.zip | |
addressed issues
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/macro/macro_hle.cpp | 10 | ||||
| -rw-r--r-- | src/video_core/macro/macro_hle.h | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp index 689533f6a..410f99018 100644 --- a/src/video_core/macro/macro_hle.cpp +++ b/src/video_core/macro/macro_hle.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | namespace Tegra { | 11 | namespace Tegra { |
| 12 | 12 | ||
| 13 | namespace { | ||
| 13 | // HLE'd functions | 14 | // HLE'd functions |
| 14 | static void HLE_771BB18C62444DA0(Engines::Maxwell3D& maxwell3d, | 15 | static void HLE_771BB18C62444DA0(Engines::Maxwell3D& maxwell3d, |
| 15 | const std::vector<u32>& parameters) { | 16 | const std::vector<u32>& parameters) { |
| @@ -80,19 +81,20 @@ static void HLE_0217920100488FF7(Engines::Maxwell3D& maxwell3d, | |||
| 80 | maxwell3d.CallMethodFromMME(0x8e5, 0x0); | 81 | maxwell3d.CallMethodFromMME(0x8e5, 0x0); |
| 81 | maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined; | 82 | maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined; |
| 82 | } | 83 | } |
| 84 | } // namespace | ||
| 83 | 85 | ||
| 84 | static const std::array<std::pair<u64, HLEFunction>, 3> hle_funcs{ | 86 | constexpr std::array<std::pair<u64, HLEFunction>, 3> hle_funcs{{ |
| 85 | std::make_pair<u64, HLEFunction>(0x771BB18C62444DA0, &HLE_771BB18C62444DA0), | 87 | std::make_pair<u64, HLEFunction>(0x771BB18C62444DA0, &HLE_771BB18C62444DA0), |
| 86 | std::make_pair<u64, HLEFunction>(0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD), | 88 | std::make_pair<u64, HLEFunction>(0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD), |
| 87 | std::make_pair<u64, HLEFunction>(0x0217920100488FF7, &HLE_0217920100488FF7), | 89 | std::make_pair<u64, HLEFunction>(0x0217920100488FF7, &HLE_0217920100488FF7), |
| 88 | }; | 90 | }}; |
| 89 | 91 | ||
| 90 | HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d) : maxwell3d(maxwell3d) {} | 92 | HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d) : maxwell3d(maxwell3d) {} |
| 91 | HLEMacro::~HLEMacro() = default; | 93 | HLEMacro::~HLEMacro() = default; |
| 92 | 94 | ||
| 93 | std::optional<std::unique_ptr<CachedMacro>> HLEMacro::GetHLEProgram(u64 hash) const { | 95 | std::optional<std::unique_ptr<CachedMacro>> HLEMacro::GetHLEProgram(u64 hash) const { |
| 94 | const auto it = std::find_if(hle_funcs.begin(), hle_funcs.end(), | 96 | const auto it = std::find_if(hle_funcs.cbegin(), hle_funcs.cend(), |
| 95 | [hash](auto& pair) { return pair.first == hash; }); | 97 | [hash](const auto& pair) { return pair.first == hash; }); |
| 96 | if (it == hle_funcs.end()) { | 98 | if (it == hle_funcs.end()) { |
| 97 | return std::nullopt; | 99 | return std::nullopt; |
| 98 | } | 100 | } |
diff --git a/src/video_core/macro/macro_hle.h b/src/video_core/macro/macro_hle.h index 7cd492a8f..37af875a0 100644 --- a/src/video_core/macro/macro_hle.h +++ b/src/video_core/macro/macro_hle.h | |||
| @@ -22,6 +22,7 @@ class HLEMacro { | |||
| 22 | public: | 22 | public: |
| 23 | explicit HLEMacro(Engines::Maxwell3D& maxwell3d); | 23 | explicit HLEMacro(Engines::Maxwell3D& maxwell3d); |
| 24 | ~HLEMacro(); | 24 | ~HLEMacro(); |
| 25 | |||
| 25 | std::optional<std::unique_ptr<CachedMacro>> GetHLEProgram(u64 hash) const; | 26 | std::optional<std::unique_ptr<CachedMacro>> GetHLEProgram(u64 hash) const; |
| 26 | 27 | ||
| 27 | private: | 28 | private: |