mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-09-23 22:05:53 +00:00
Try to improve LFX
This commit is contained in:
@@ -353,6 +353,9 @@ namespace nvd {
|
||||
case PRESENT_START:
|
||||
lowlatency_ctx.mark_end_of_rendering();
|
||||
break;
|
||||
case RENDERSUBMIT_END:
|
||||
lowlatency_ctx.lfx_end_frame();
|
||||
break;
|
||||
}
|
||||
return OK();
|
||||
}
|
||||
|
||||
@@ -212,8 +212,6 @@ public:
|
||||
// Set FPS Limiter
|
||||
lfx_ctx->target_frame_time = 1000 * min_interval_us;
|
||||
|
||||
lfx_ctx->EndFrame(lfx_stats.frame_id, current_timestamp, &lfx_stats.latency, &lfx_stats.frame_time);
|
||||
spdlog::debug("LFX latency: {}, frame_time: {}, current_timestamp: {}", lfx_stats.latency, lfx_stats.frame_time, current_timestamp);
|
||||
lfx_stats.frame_id++;
|
||||
lfx_stats.target = lfx_ctx->GetWaitTarget(lfx_stats.frame_id);
|
||||
|
||||
@@ -257,6 +255,14 @@ public:
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
inline void lfx_end_frame() {
|
||||
lfx_mutex.lock();
|
||||
auto current_timestamp = get_timestamp();
|
||||
lfx_ctx->EndFrame(lfx_stats.frame_id, current_timestamp, &lfx_stats.latency, &lfx_stats.frame_time);
|
||||
spdlog::debug("LFX latency: {}, frame_time: {}, current_timestamp: {}", lfx_stats.latency, lfx_stats.frame_time, current_timestamp);
|
||||
lfx_mutex.unlock();
|
||||
}
|
||||
|
||||
inline void unload() {
|
||||
#if _MSC_VER && _WIN64
|
||||
if (al2_dx12_ctx.m_pAntiLagAPI && !AMD::AntiLag2DX12::DeInitialize(&al2_dx12_ctx))
|
||||
|
||||
Reference in New Issue
Block a user