mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 17:22:46 +01:00
maxwell_3d: Ignore macros that have not been uploaded yet.
- Used by Super Mario Odyssey (in game).
This commit is contained in:
parent
25ba4d1b68
commit
efe6b473c5
1 changed files with 10 additions and 5 deletions
|
@ -23,12 +23,17 @@ Maxwell3D::Maxwell3D(VideoCore::RasterizerInterface& rasterizer, MemoryManager&
|
||||||
: memory_manager(memory_manager), rasterizer{rasterizer}, macro_interpreter(*this) {}
|
: memory_manager(memory_manager), rasterizer{rasterizer}, macro_interpreter(*this) {}
|
||||||
|
|
||||||
void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) {
|
void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) {
|
||||||
auto macro_code = uploaded_macros.find(method);
|
// Reset the current macro.
|
||||||
// The requested macro must have been uploaded already.
|
|
||||||
ASSERT_MSG(macro_code != uploaded_macros.end(), "Macro %08X was not uploaded", method);
|
|
||||||
|
|
||||||
// Reset the current macro and execute it.
|
|
||||||
executing_macro = 0;
|
executing_macro = 0;
|
||||||
|
|
||||||
|
// The requested macro must have been uploaded already.
|
||||||
|
auto macro_code = uploaded_macros.find(method);
|
||||||
|
if (macro_code == uploaded_macros.end()) {
|
||||||
|
LOG_ERROR(HW_GPU, "Macro {:04X} was not uploaded", method);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute the current macro.
|
||||||
macro_interpreter.Execute(macro_code->second, std::move(parameters));
|
macro_interpreter.Execute(macro_code->second, std::move(parameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue