Reducing profiling forced swap frequency.
This commit is contained in:
parent
430d827770
commit
e45fc3dc56
|
@ -164,14 +164,16 @@ void D3D11GraphicsSystem::Pump() {
|
||||||
|
|
||||||
DispatchInterruptCallback(0);
|
DispatchInterruptCallback(0);
|
||||||
} else {
|
} else {
|
||||||
// If we have gone too long without an interrupt, fire one.
|
double time_since_last_interrupt = xe_pal_now() - last_interrupt_time_;
|
||||||
if (xe_pal_now() - last_interrupt_time_ > 500 / 1000.0) {
|
if (time_since_last_interrupt > 0.5) {
|
||||||
|
// If we have gone too long without an interrupt, fire one.
|
||||||
DispatchInterruptCallback(0);
|
DispatchInterruptCallback(0);
|
||||||
}
|
}
|
||||||
|
if (time_since_last_interrupt > 0.3) {
|
||||||
// Force a swap when profiling.
|
// Force a swap when profiling.
|
||||||
if (Profiler::is_enabled()) {
|
if (Profiler::is_enabled()) {
|
||||||
window_->Swap();
|
window_->Swap();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue