mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-21 05:49:57 -04:00
Give nx2navi_dlssg.dll an export that hands Reflex a frame limit along with its mode.
With DLSS Frame Generation, nx2sl_reflex set only Reflex's mode, so Reflex's sleep at the frame's start held no limit and the game's own pacer held the finished picture until its turn, a second wait after the frame was drawn (A-16, P-16). nx2sl_reflex2(mode, frame_limit_us) fills sl::ReflexOptions::frameLimitUs as well, which the driver's sleep then holds as its minimum interval. Streamline drops both with the swapchain and a call without the limit clears it, so every call carries both. It returns 1 only when Streamline took them and, for a limit, did not report Reflex's sleep as unavailable on this GPU and driver (slReflexGetState, asked from nx2sl_available on the device's thread and from nx2sl_reflex2 under the runtime's present lock, never at once). nx2sl_reflex stays exported for older runtimes and sets the mode alone; NX2SL_VERSION stays 3, since the runtime refuses any other version and the new export is optional. Built with tools/build_dlssg.py against the pinned Streamline 2.14.16 SDK: clean at /W3, 15 exports including nx2sl_reflex2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,11 @@ typedef void (*PFN_nx2sl_log_unavailable)(VkPhysicalDevice physical);
|
||||
// Reflex's low-latency mode, 0 off, 1 on, 2 on with boost: after the device, and after each swapchain the game creates
|
||||
// through the interposer (the mode is the swapchain's)
|
||||
typedef void (*PFN_nx2sl_reflex)(int mode);
|
||||
// The same with Reflex's frame limit, frame_limit_us microseconds from one frame's start to the next (0 none), which
|
||||
// the driver's sleep then holds (vk_dlssg.c vk_dlssg_pace). Each call sets both, so the runtime calls only this one when
|
||||
// the DLL has it. 1 when Streamline took them and, for a limit, Reflex's sleep runs on this GPU and driver. Optional:
|
||||
// an older DLL lacks it, and the game's own limiter then keeps the frame limit.
|
||||
typedef int (*PFN_nx2sl_reflex2)(int mode, uint32_t frame_limit_us);
|
||||
// Frames are numbered by the game's presents: frame n ends with its n-th present (vk_dlssg.c vk_dlssg_game_present).
|
||||
// Where the game starts a frame: with hold, Reflex's sleep, which holds the start until the time the driver computes
|
||||
// from the measured render and queue times; then the frame's simulation and render-submit-start markers.
|
||||
|
||||
Reference in New Issue
Block a user