summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-10 01:16:28 +0200
committerGitHub <noreply@github.com>2018-08-10 01:16:28 +0200
commit37e1ed3744fb213009370801437bab6ab71ff210 (patch)
treee64bea3e13ca7374e62b709eeb3b8f078ccc5b5f
parentImplement SNORM for BC5/DXN2 (#998) (diff)
parentmaxwell_3d: Ignore macros that have not been uploaded yet. (diff)
downloadyuzu-37e1ed3744fb213009370801437bab6ab71ff210.tar
yuzu-37e1ed3744fb213009370801437bab6ab71ff210.tar.gz
yuzu-37e1ed3744fb213009370801437bab6ab71ff210.tar.bz2
yuzu-37e1ed3744fb213009370801437bab6ab71ff210.tar.lz
yuzu-37e1ed3744fb213009370801437bab6ab71ff210.tar.xz
yuzu-37e1ed3744fb213009370801437bab6ab71ff210.tar.zst
yuzu-37e1ed3744fb213009370801437bab6ab71ff210.zip
-rw-r--r--src/video_core/engines/maxwell_3d.cpp13
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&
: memory_manager(memory_manager), rasterizer{rasterizer}, macro_interpreter(*this) {}
void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) {
- auto macro_code = uploaded_macros.find(method);
+ // Reset the current macro.
+ executing_macro = 0;
+
// The requested macro must have been uploaded already.
- ASSERT_MSG(macro_code != uploaded_macros.end(), "Macro %08X was not uploaded", method);
+ auto macro_code = uploaded_macros.find(method);
+ if (macro_code == uploaded_macros.end()) {
+ LOG_ERROR(HW_GPU, "Macro {:04X} was not uploaded", method);
+ return;
+ }
- // Reset the current macro and execute it.
- executing_macro = 0;
+ // Execute the current macro.
macro_interpreter.Execute(macro_code->second, std::move(parameters));
}