rsx: Lower performance hit due to frequency fetch

This commit is contained in:
kd-11 2022-05-14 17:42:19 +03:00 committed by kd-11
parent 7e8c93bea2
commit 0244c4046e

View File

@ -9,9 +9,11 @@ namespace rsx
{ {
static inline u64 uclock() static inline u64 uclock()
{ {
if (const u64 freq = (utils::get_tsc_freq() / 1000000)) static const ullong s_tsc_scaled_freq = (utils::get_tsc_freq() / 1000000);
if (s_tsc_scaled_freq)
{ {
return utils::get_tsc() / freq; return utils::get_tsc() / s_tsc_scaled_freq;
} }
else else
{ {