Speed up reported guest GPU time

Avoids triggering DRS in games in cases where it wouldn't actually benefit anything due to being CPU bottlenecked.
This commit is contained in:
Billy Laws 2022-10-21 22:08:38 +01:00
parent 31c2fb7d7a
commit 7ea9aa52f5

View File

@ -10,7 +10,10 @@ namespace skyline::soc::gm20b::engine {
i64 nsTime{util::GetTimeNs()};
i64 timestamp{(nsTime / NsToTickDenominator) * NsToTickNumerator + ((nsTime % NsToTickDenominator) * NsToTickNumerator) / NsToTickDenominator};
return static_cast<u64>(timestamp);
// By reporting that less time has passed on the GPU than has actually passed we can avoid dynamic resolution kicking in
// TODO: add a setting for this after global settings
return static_cast<u64>(timestamp / 256);
}
MacroEngineBase::MacroEngineBase(MacroState &macroState) : macroState(macroState) {}