diff options
author | Lioncash <mathew1800@gmail.com> | 2019-04-06 04:51:22 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-04-06 04:55:13 +0200 |
commit | 1efdb4897ed80a12b3d6fd2ec0575c86d60d95de (patch) | |
tree | 814e11eff276ea38f2173868d0b0e1a8f6452d28 /src/video_core/macro_interpreter.cpp | |
parent | Merge pull request #2282 from bunnei/gpu-asynch-v2 (diff) | |
download | yuzu-1efdb4897ed80a12b3d6fd2ec0575c86d60d95de.tar yuzu-1efdb4897ed80a12b3d6fd2ec0575c86d60d95de.tar.gz yuzu-1efdb4897ed80a12b3d6fd2ec0575c86d60d95de.tar.bz2 yuzu-1efdb4897ed80a12b3d6fd2ec0575c86d60d95de.tar.lz yuzu-1efdb4897ed80a12b3d6fd2ec0575c86d60d95de.tar.xz yuzu-1efdb4897ed80a12b3d6fd2ec0575c86d60d95de.tar.zst yuzu-1efdb4897ed80a12b3d6fd2ec0575c86d60d95de.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/macro_interpreter.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/video_core/macro_interpreter.cpp b/src/video_core/macro_interpreter.cpp index 64f75db43..4c4e8d603 100644 --- a/src/video_core/macro_interpreter.cpp +++ b/src/video_core/macro_interpreter.cpp @@ -228,22 +228,17 @@ u32 MacroInterpreter::FetchParameter() { } u32 MacroInterpreter::GetRegister(u32 register_id) const { - // Register 0 is supposed to always return 0. - if (register_id == 0) - return 0; - - ASSERT(register_id < registers.size()); - return registers[register_id]; + return registers.at(register_id); } void MacroInterpreter::SetRegister(u32 register_id, u32 value) { - // Register 0 is supposed to always return 0. NOP is implemented as a store to the zero - // register. - if (register_id == 0) + // Register 0 is hardwired as the zero register. + // Ensure no writes to it actually occur. + if (register_id == 0) { return; + } - ASSERT(register_id < registers.size()); - registers[register_id] = value; + registers.at(register_id) = value; } void MacroInterpreter::SetMethodAddress(u32 address) { |