mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[util] Remove useless vsync parameter from FPS limiter
This commit is contained in:
parent
2188caae8e
commit
b4c4c9e683
@ -130,7 +130,7 @@ namespace dxvk {
|
||||
m_frameQueue.push(frame);
|
||||
m_frameCond.notify_one();
|
||||
} else {
|
||||
applyFrameRateLimit(mode);
|
||||
m_fpsLimiter.delay();
|
||||
m_signal->signal(frameId);
|
||||
}
|
||||
|
||||
@ -648,14 +648,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void Presenter::applyFrameRateLimit(VkPresentModeKHR mode) {
|
||||
bool vsync = mode == VK_PRESENT_MODE_FIFO_KHR
|
||||
|| mode == VK_PRESENT_MODE_FIFO_RELAXED_KHR;
|
||||
|
||||
m_fpsLimiter.delay(vsync);
|
||||
}
|
||||
|
||||
|
||||
void Presenter::runFrameThread() {
|
||||
env::setThreadName("dxvk-frame");
|
||||
|
||||
@ -677,7 +669,7 @@ namespace dxvk {
|
||||
|
||||
// Apply the FPS limiter before signaling the frame event in
|
||||
// order to reduce latency if the app uses it for frame pacing.
|
||||
applyFrameRateLimit(frame.mode);
|
||||
m_fpsLimiter.delay();
|
||||
|
||||
// If the present operation has succeeded, actually wait for it to complete.
|
||||
// Don't bother with it on MAILBOX / IMMEDIATE modes since doing so would
|
||||
|
@ -294,9 +294,6 @@ namespace dxvk {
|
||||
|
||||
void destroySurface();
|
||||
|
||||
void applyFrameRateLimit(
|
||||
VkPresentModeKHR mode);
|
||||
|
||||
void runFrameThread();
|
||||
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ namespace dxvk {
|
||||
std::lock_guard<dxvk::mutex> lock(m_mutex);
|
||||
|
||||
if (!m_envOverride) {
|
||||
m_targetInterval = frameRate > 0.0
|
||||
m_targetInterval = frameRate != 0.0
|
||||
? TimerDuration(int64_t(double(TimerDuration::period::den) / frameRate))
|
||||
: TimerDuration::zero();
|
||||
|
||||
@ -45,7 +45,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void FpsLimiter::delay(bool vsyncEnabled) {
|
||||
void FpsLimiter::delay() {
|
||||
std::lock_guard<dxvk::mutex> lock(m_mutex);
|
||||
|
||||
if (!isEnabled())
|
||||
|
@ -34,9 +34,8 @@ namespace dxvk {
|
||||
* Blocks the calling thread if the limiter is enabled
|
||||
* and the time since the last call to \ref delay is
|
||||
* shorter than the target interval.
|
||||
* \param [in] vsyncEnabled \c true if vsync is enabled
|
||||
*/
|
||||
void delay(bool vsyncEnabled);
|
||||
void delay();
|
||||
|
||||
/**
|
||||
* \brief Checks whether the frame rate limiter is enabled
|
||||
|
Loading…
x
Reference in New Issue
Block a user