Invalidate HLE macro state on macro updates

This commit is contained in:
Billy Laws 2022-09-15 22:35:02 +01:00
parent 2360ca24da
commit b810470601
2 changed files with 5 additions and 1 deletions

View File

@ -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, {

View File

@ -65,8 +65,10 @@ namespace skyline::soc::gm20b {
void MacroState::Execute(u32 position, span<u32> args, engine::MacroEngineBase *targetEngine) {
size_t offset{macroPositions[position]};
if (invalidatePending)
if (invalidatePending) {
macroHleFunctions.fill({});
invalidatePending = false;
}
auto &hleEntry{macroHleFunctions[position]};