mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 13:59:56 -04:00
Fix what the 0.6.0 review found, and ship DLSS Frame Generation in the launcher release.
The commit census of the perf trace walked the address space on the presenting thread outside mem_census, which brought back the hitch mem_census was added to remove; it now runs only with mem_census = 1. DLSS's output pass at the mode's share fell back to no pass at all when the scene was not at that share (the first presents, a dynamic resolution step): after such a frame the first pass wider than the scene is taken again for 120 frames. The launcher's nx2navi.ini editor no longer rewrites a file it cannot read, keeps the byte order mark and bytes that are not UTF-8, reads an empty line as the game does, and leaves no temporary file behind. The build kit carries the two modules build_game.py imports on Linux, the Linux steps list the right packages and Python, and stale comments and notes are corrected (Discord on by default, two prebuild threads, Enhanced HDR gone). DLSS Frame Generation needs nx2navi_dlssg.dll, NVIDIA Streamline's runtime and nvngx_dlssg.dll beside the game, which no release carried, so the menu offered it and the game turned it off. tools/make_launcher.py --dlssg and --streamline put them with their licences and a notice in the release's bin/dlssg/, and tools/make_game.py place_dlssg copies the whole set beside the game. THIRD_PARTY_NOTICES.md has the row; the notes and README say RTX 40 and 50. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
// Discord Rich Presence: "Playing NX2navi" with the elapsed play time in the player's Discord status, through
|
||||
// the local IPC of a running Discord client (platform.h's plat_ipc_*). Nothing leaves the machine but the activity
|
||||
// itself, and nothing is sent while NX2NAVI_DISCORD_RPC is off (the default: the status is information about the
|
||||
// player's session). NX2NAVI_DISCORD_APP_ID names the application whose name ("Playing <name>") and artwork Discord
|
||||
// shows, NX2NAVI_DISCORD_IMAGE the key of its uploaded art asset; both default to discord_app.h, the one place the
|
||||
// NX2navi application's id is written, and nx2navi.ini's discord_app_id and discord_image override them. With no
|
||||
// application id at all the thread stays idle and logs that once: there is nothing to show the status under.
|
||||
// itself, and nothing is sent while NX2NAVI_DISCORD_RPC is off (it is on by default, and does nothing without a
|
||||
// Discord client running on the same PC). NX2NAVI_DISCORD_APP_ID names the application whose name ("Playing <name>")
|
||||
// and artwork Discord shows, NX2NAVI_DISCORD_IMAGE the key of its uploaded art asset; both default to discord_app.h,
|
||||
// the one place the NX2navi application's id is written, and nx2navi.ini's discord_app_id and discord_image override
|
||||
// them. With no application id at all the thread stays idle and logs that once: there is nothing to show the status
|
||||
// under.
|
||||
//
|
||||
// One host thread owns the connection and never holds a virtual core (kernel.c: host work runs without one). It
|
||||
// re-reads the settings when cfg_version changes (a menu change reaches it within half a second), connects to the
|
||||
|
||||
@@ -442,9 +442,13 @@ static void perf_gpu_line(uint64_t frame, double interval_ms, double pace_share,
|
||||
"%.0f MiB, private %.0f MiB; bound: %s",
|
||||
(unsigned long long)frame, gs, rw, ow, vs, ws, priv, bound);
|
||||
// Where the committed memory lies, every 3600 frames and whenever it grew by 1 GiB since the last census: the process
|
||||
// has run out of commit in long sessions while the game's own pools stayed flat.
|
||||
// has run out of commit in long sessions while the game's own pools stayed flat. Only with NX2NAVI_MEM_CENSUS=1, as
|
||||
// vk_memory.c's census: the walk holds the address-space lock the game's threads take at every page fault, and here
|
||||
// it ran on the presenting thread, so each one delayed a frame by 65-240 ms.
|
||||
static int census_on = -1;
|
||||
static uint64_t census_prv;
|
||||
if (frame % 3600 == 0 || prv >= census_prv + (1ull << 30)) prof_commit_census(frame), census_prv = prv;
|
||||
if (census_on < 0) census_on = cfg_bool("NX2NAVI_MEM_CENSUS");
|
||||
if (census_on && (frame % 3600 == 0 || prv >= census_prv + (1ull << 30))) prof_commit_census(frame), census_prv = prv;
|
||||
if (g.have_gpu && g.have_idle)
|
||||
rt_log("perf: frame %llu: gpu idle per frame %.2f ms between timed parts: %.2f ms waiting for the next submission, "
|
||||
"%.2f ms with it queued (untimed work or waits); %.1f gaps over 0.5 ms, longest %.2f ms; submit to start avg %.2f ms",
|
||||
|
||||
@@ -333,6 +333,7 @@ static struct {
|
||||
NgxParam *params;
|
||||
int failed, reset;
|
||||
uint64_t evals, frames_missed;
|
||||
int share_off; // frames left that pick the output pass without the mode's share (vk_dlaa_pass, vk_dlaa_frame)
|
||||
// jitter (vk_dlaa_viewport)
|
||||
VkImage jdepth; // the scene depth of the last frame DLAA ran on: passes drawing with it are jittered
|
||||
float jx, jy; // the offset the next scene draws take, render pixels (window x right, y down)
|
||||
@@ -1587,8 +1588,11 @@ void vk_dlaa_pass(VkExec *ex) {
|
||||
if (one) F.one_n++, F.one_w = c->width, F.one_h = c->height, F.one_fmt = c->format;
|
||||
// the output pass is the picture's size, the scene over the mode's share: at Ultra Performance (854 wide) a
|
||||
// 960x540 post pass comes first, and DLSS wrote there, which left a 540-line picture stretched to the output
|
||||
// A frame whose scene is not at that share (the first presents before the scale patch takes, a dynamic
|
||||
// resolution step) has no such pass: after a frame that missed DLSS the first pass wider than the scene is
|
||||
// taken for 120 frames (D.share_off, vk_dlaa_frame), so a mismatch costs one frame rather than every frame.
|
||||
double share = wide_dlss_share();
|
||||
int big = share <= 0 || share >= 1 || c->width >= 0.95 * D.color.width / share;
|
||||
int big = D.share_off || share <= 0 || share >= 1 || c->width >= 0.95 * D.color.width / share;
|
||||
if (one && big && c->width > D.color.width && c->height > D.color.height) {
|
||||
D.ended = D.done = D.up = 1;
|
||||
evaluate(ex, c);
|
||||
@@ -1660,6 +1664,8 @@ void vk_dlaa_frame(void) {
|
||||
return;
|
||||
}
|
||||
if (!dl_active()) return;
|
||||
if (D.share_off) D.share_off--;
|
||||
if (!D.done && D.armed) D.share_off = 120; // vk_dlaa_pass: the output pass without the mode's share for a while
|
||||
if (!D.done) {
|
||||
D.frames_missed++;
|
||||
// the first few after DLSS first ran: what the frame drew, to tell a frame drawn another way from a loading screen
|
||||
|
||||
@@ -4189,7 +4189,7 @@ static void lb_state(const uint32_t pr_hist[16], const uint32_t fs_hist[4]) {
|
||||
// Boot: compute shaders of the warm list (recorded and prepared), then the first KEEP recorded graphics variants.
|
||||
static void lb_start(const uint32_t pr_hist[16], const uint32_t fs_hist[4]) {
|
||||
const char *e = cfg_value("NX2NAVI_LIB_PREBUILD"), *ke = cfg_get("NX2NAVI_LIB_PREBUILD_KEEP");
|
||||
const char *te = cfg_get("NX2NAVI_LIB_PREBUILD_THREADS"); // no fixed default: half the CPUs when unset
|
||||
const char *te = cfg_get("NX2NAVI_LIB_PREBUILD_THREADS"); // no fixed default: 2 when unset (1 under 4 CPUs)
|
||||
const char *be = cfg_get("NX2NAVI_LIB_PREBUILD_BIG"); // SPIR-V words; LB_BIG_WORDS when unset, 0 no limit
|
||||
if (!A.on || !cfg_bool("NX2NAVI_LIB_PREBUILD")) return;
|
||||
LB.big_words = be && *be ? strtoull(be, NULL, 10) : LB_BIG_WORDS;
|
||||
|
||||
Reference in New Issue
Block a user