mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 06:59:57 -04:00
Name every caller of reflex_state in nx2_sl.cpp's comment on why its calls never overlap.
The review found the comment incomplete: it named nx2sl_available on the device's thread and nx2sl_reflex2 under the runtime's present lock, but nx2sl_reflex2 also runs on the device's thread with no lock (vk_dlssg.c vk_dlssg_device_ready, reflex_apply(0)), and an older runtime reaches it through nx2sl_reflex. The comment now says the runtime calls them on the device's thread before any present or under its present lock, never two at once; the conclusion is unchanged. Comment only: the DLL builds with MSVC against the pinned Streamline SDK and passes the export check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -71,8 +71,9 @@ template <class T> T *proc(const char *name) { return reinterpret_cast<T *>(GetP
|
||||
|
||||
// Whether Reflex's sleep runs on this GPU and driver: Streamline takes a frame limit without it and then sets nothing
|
||||
// (its slReflexSetOptions hands the limit to the driver only with the low-latency sleep available). Asked until
|
||||
// Streamline answers, from nx2sl_available on the device's thread and from nx2sl_reflex2 under the runtime's present
|
||||
// lock, never at once: slReflexGetState is not thread safe.
|
||||
// Streamline answers, from nx2sl_available and nx2sl_reflex2 (nx2sl_reflex too, which an older runtime calls), which
|
||||
// the runtime calls on the device's thread before any present or under its present lock (vk_dlssg.c reflex_apply),
|
||||
// never two at once: slReflexGetState is not thread safe.
|
||||
void reflex_state() {
|
||||
static sl::ReflexState rs;
|
||||
if (g_low_latency < 0 && p_reflex_state && p_reflex_state(rs) == sl::Result::eOk)
|
||||
|
||||
Reference in New Issue
Block a user