diff options
| author | 2018-08-08 23:22:45 -0400 | |
|---|---|---|
| committer | 2018-08-08 23:25:37 -0400 | |
| commit | efe6b473c5b16d57e0bc6535e43fdafff23e6438 (patch) | |
| tree | 87efec797ba0c355fed461ea67d6d451d0b538f4 /src | |
| parent | Merge pull request #982 from bunnei/stub-unk-63 (diff) | |
| download | yuzu-efe6b473c5b16d57e0bc6535e43fdafff23e6438.tar.gz yuzu-efe6b473c5b16d57e0bc6535e43fdafff23e6438.tar.xz yuzu-efe6b473c5b16d57e0bc6535e43fdafff23e6438.zip | |
maxwell_3d: Ignore macros that have not been uploaded yet.
- Used by Super Mario Odyssey (in game).
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index ed22a2090..a46ed4bd7 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -23,12 +23,17 @@ Maxwell3D::Maxwell3D(VideoCore::RasterizerInterface& rasterizer, MemoryManager& | |||
| 23 | : memory_manager(memory_manager), rasterizer{rasterizer}, macro_interpreter(*this) {} | 23 | : memory_manager(memory_manager), rasterizer{rasterizer}, macro_interpreter(*this) {} |
| 24 | 24 | ||
| 25 | void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) { | 25 | void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) { |
| 26 | auto macro_code = uploaded_macros.find(method); | 26 | // Reset the current macro. |
| 27 | executing_macro = 0; | ||
| 28 | |||
| 27 | // The requested macro must have been uploaded already. | 29 | // The requested macro must have been uploaded already. |
| 28 | ASSERT_MSG(macro_code != uploaded_macros.end(), "Macro %08X was not uploaded", method); | 30 | auto macro_code = uploaded_macros.find(method); |
| 31 | if (macro_code == uploaded_macros.end()) { | ||
| 32 | LOG_ERROR(HW_GPU, "Macro {:04X} was not uploaded", method); | ||
| 33 | return; | ||
| 34 | } | ||
| 29 | 35 | ||
| 30 | // Reset the current macro and execute it. | 36 | // Execute the current macro. |
| 31 | executing_macro = 0; | ||
| 32 | macro_interpreter.Execute(macro_code->second, std::move(parameters)); | 37 | macro_interpreter.Execute(macro_code->second, std::move(parameters)); |
| 33 | } | 38 | } |
| 34 | 39 | ||