mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-09 17:25:18 -06:00
sysinfo.cpp: Relax TSC calibration constraints
This commit is contained in:
parent
6647c5a2bd
commit
60c9705a7d
@ -4142,12 +4142,9 @@ extern void ppu_precompile(std::vector<std::string>& dir_queue, std::vector<ppu_
|
||||
continue;
|
||||
}
|
||||
|
||||
//std::unique_lock lock(g_fxo->get<jit_core_allocator>().sem);
|
||||
|
||||
if (auto prx = ppu_load_prx(obj, true, path, offset))
|
||||
{
|
||||
obj.clear(), src.close(); // Clear decrypted file and elf object memory
|
||||
//.unlock();
|
||||
ppu_initialize(*prx, false, file_size);
|
||||
ppu_finalize(*prx, true);
|
||||
continue;
|
||||
|
||||
@ -928,13 +928,22 @@ static const bool s_tsc_freq_evaluated = []() -> bool
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
LARGE_INTEGER freq;
|
||||
LARGE_INTEGER freq{};
|
||||
if (!QueryPerformanceFrequency(&freq))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (freq.QuadPart <= 9'999'999)
|
||||
if (!freq.QuadPart)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Theoretical constraint for the function itself to operate properly
|
||||
// Unlikely to be unmet
|
||||
constexpr LONGLONG min_supported_QPC_frequency = 50'000;
|
||||
|
||||
if (freq.QuadPart <= min_supported_QPC_frequency)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -1006,7 +1015,7 @@ static const bool s_tsc_freq_evaluated = []() -> bool
|
||||
const ullong sec_base = ts0.tv_sec;
|
||||
#endif
|
||||
|
||||
constexpr usz sleep_time_ms = 40;
|
||||
const usz sleep_time_ms = timer_freq <= 300'000 ? (300'000 * 50) / timer_freq : 50;
|
||||
|
||||
for (usz sample = 0; sample < sample_count; sample++)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user