diff --git a/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.cpp b/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.cpp index 6bffa633..6f8f9587 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.cpp +++ b/app/src/main/cpp/skyline/soc/gm20b/engines/maxwell_3d.cpp @@ -161,6 +161,7 @@ namespace skyline::soc::gm20b::engine::maxwell3d { throw exception("Macro memory is full!"); macroState.macroCode[registers.mme->instructionRamPointer++] = instructionRamLoad; + macroState.Invalidate(); // Wraparound writes // This works on HW but will also generate an error interrupt @@ -172,6 +173,7 @@ namespace skyline::soc::gm20b::engine::maxwell3d { throw exception("Maximum amount of macros reached!"); macroState.macroPositions[registers.mme->startAddressRamPointer++] = startAddressRamLoad; + macroState.Invalidate(); }) ENGINE_STRUCT_CASE(i2m, launchDma, { diff --git a/app/src/main/cpp/skyline/soc/gm20b/macro/macro_state.cpp b/app/src/main/cpp/skyline/soc/gm20b/macro/macro_state.cpp index f27339b1..fe2d5ab5 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/macro/macro_state.cpp +++ b/app/src/main/cpp/skyline/soc/gm20b/macro/macro_state.cpp @@ -65,8 +65,10 @@ namespace skyline::soc::gm20b { void MacroState::Execute(u32 position, span args, engine::MacroEngineBase *targetEngine) { size_t offset{macroPositions[position]}; - if (invalidatePending) + if (invalidatePending) { macroHleFunctions.fill({}); + invalidatePending = false; + } auto &hleEntry{macroHleFunctions[position]};