mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 16:49:58 -04:00
Pace DLSS Frame Generation with Reflex from the frame's start, so it no longer halves the game's frame rate.
Reflex's markers sat at the host present with frame numbers unlike the frame's tags, slReflexSleep was never called, and the low-latency mode was set before any swapchain existed, so it never applied. GfxBackend.frame_start, called from nvnWindowAcquireTexture, now sets the simulation and submit-start markers after Reflex's sleep (skipped once nothing was presented for 200 ms); submit end is set when the frame's submissions went out; the mode is set again after each swapchain (NX2NAVI_REFLEX: 1 on, 0 off, 2 boost); frames are numbered by the game's presents; and the fps counter counts what was shown. NX2SL_VERSION is 3, so nx2navi_dlssg.dll must be rebuilt. From a tester's fixes: 42-45 fps game, 84-90 on screen (was 24). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,4 +19,12 @@ VkResult vk_dlssg_get_images(VkDevice d, VkSwapchainKHR sc, uint32_t *n, VkImage
|
||||
VkResult vk_dlssg_acquire(VkDevice d, VkSwapchainKHR sc, uint64_t timeout, VkSemaphore sem, uint32_t *idx);
|
||||
VkResult vk_dlssg_present(VkQueue q, const VkPresentInfoKHR *pi);
|
||||
void vk_dlssg_frame(VkCommandBuffer cb, VkExtent2D ext); // each present, before its command buffer is submitted
|
||||
// Frames are numbered by the game's presents (frame n ends with the n-th). Reflex's frame timing while active:
|
||||
void vk_dlssg_frame_start(void); // the game starts a frame (nvn_api_obj.c nvnWindowAcquireTexture): Reflex's sleep
|
||||
void vk_dlssg_game_present(void); // the game presents it (vk_backend.c vk_be_present): counts it
|
||||
// its submissions went out (vk_backend.c: vk_be_present, or replay_main with asynchronous replay): the render-submit-end
|
||||
// marker; frame is gfx_counters.frames of its present, the same count
|
||||
void vk_dlssg_submitted(uint64_t frame);
|
||||
void vk_dlssg_present_frame(uint64_t frame); // the present thread's next blit and present are of this frame
|
||||
uint64_t vk_dlssg_shown(void); // the frames the display got, generated ones included (present thread); 0 when off
|
||||
void vk_dlssg_release(void);
|
||||
|
||||
Reference in New Issue
Block a user