diff options
| author | 2022-03-05 08:01:13 +0100 | |
|---|---|---|
| committer | 2023-01-01 16:43:57 -0500 | |
| commit | c541559767c3912940ee3d73a122530b3edde9f1 (patch) | |
| tree | 9924302d2b8e383ce8824ccc219da42417bbc6d4 /src/video_core/macro/macro.cpp | |
| parent | MacroHLE: Implement DrawIndexedIndirect & DrawArraysIndirect. (diff) | |
| download | yuzu-c541559767c3912940ee3d73a122530b3edde9f1.tar.gz yuzu-c541559767c3912940ee3d73a122530b3edde9f1.tar.xz yuzu-c541559767c3912940ee3d73a122530b3edde9f1.zip | |
MacroHLE: Refactor MacroHLE system.
Diffstat (limited to 'src/video_core/macro/macro.cpp')
| -rw-r--r-- | src/video_core/macro/macro.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/macro/macro.cpp b/src/video_core/macro/macro.cpp index 505d81c1e..01dd25f95 100644 --- a/src/video_core/macro/macro.cpp +++ b/src/video_core/macro/macro.cpp | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include "common/fs/fs.h" | 13 | #include "common/fs/fs.h" |
| 14 | #include "common/fs/path_util.h" | 14 | #include "common/fs/path_util.h" |
| 15 | #include "common/settings.h" | 15 | #include "common/settings.h" |
| 16 | #include "video_core/engines/maxwell_3d.h" | ||
| 16 | #include "video_core/macro/macro.h" | 17 | #include "video_core/macro/macro.h" |
| 17 | #include "video_core/macro/macro_hle.h" | 18 | #include "video_core/macro/macro_hle.h" |
| 18 | #include "video_core/macro/macro_interpreter.h" | 19 | #include "video_core/macro/macro_interpreter.h" |
| @@ -40,8 +41,8 @@ static void Dump(u64 hash, std::span<const u32> code) { | |||
| 40 | macro_file.write(reinterpret_cast<const char*>(code.data()), code.size_bytes()); | 41 | macro_file.write(reinterpret_cast<const char*>(code.data()), code.size_bytes()); |
| 41 | } | 42 | } |
| 42 | 43 | ||
| 43 | MacroEngine::MacroEngine(Engines::Maxwell3D& maxwell3d) | 44 | MacroEngine::MacroEngine(Engines::Maxwell3D& maxwell3d_) |
| 44 | : hle_macros{std::make_unique<Tegra::HLEMacro>(maxwell3d)} {} | 45 | : hle_macros{std::make_unique<Tegra::HLEMacro>(maxwell3d_)}, maxwell3d{maxwell3d_} {} |
| 45 | 46 | ||
| 46 | MacroEngine::~MacroEngine() = default; | 47 | MacroEngine::~MacroEngine() = default; |
| 47 | 48 | ||
| @@ -61,6 +62,7 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) { | |||
| 61 | if (cache_info.has_hle_program) { | 62 | if (cache_info.has_hle_program) { |
| 62 | cache_info.hle_program->Execute(parameters, method); | 63 | cache_info.hle_program->Execute(parameters, method); |
| 63 | } else { | 64 | } else { |
| 65 | maxwell3d.RefreshParameters(); | ||
| 64 | cache_info.lle_program->Execute(parameters, method); | 66 | cache_info.lle_program->Execute(parameters, method); |
| 65 | } | 67 | } |
| 66 | } else { | 68 | } else { |
| @@ -106,6 +108,7 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) { | |||
| 106 | cache_info.hle_program = std::move(hle_program); | 108 | cache_info.hle_program = std::move(hle_program); |
| 107 | cache_info.hle_program->Execute(parameters, method); | 109 | cache_info.hle_program->Execute(parameters, method); |
| 108 | } else { | 110 | } else { |
| 111 | maxwell3d.RefreshParameters(); | ||
| 109 | cache_info.lle_program->Execute(parameters, method); | 112 | cache_info.lle_program->Execute(parameters, method); |
| 110 | } | 113 | } |
| 111 | } | 114 | } |