Triforce v0.5.1

Hotfix for v0.5.0: crashes (NX2navi game folder refused by Setup, heap-full retries, GTX 10 series noise pass and whole VRAM mirrors, code-patch mods kept with their code, no page file warning), graphics (DLSS with frame generation, DLSS coming back, AMD storage buffer alignment, mesh index map, shared memory barrier, shader conversions, integrated GPUs' uniform snapshot, a Mesh shaders row), controls (microphone after restart, button prompts with a mod's size table, sprint vs Hide text, native mouse camera, controller after Restart now), Setup's Preparing shaders step, and the Linux link fix.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-18 12:06:48 -06:00
parent 72793f2231
commit a750a21025
54 changed files with 1806 additions and 114 deletions

View File

@@ -83,6 +83,10 @@ struct State {
// up for the run. Each try stalls as a creation does, so they are 600 frames apart)
uint64_t retry_frame = 0;
int retries = 0;
// ((Triforce, upstream 6770b115 #2550) the preset, output and HDR a creation failed for (not for want of video memory,
// retried above): not tried again each frame, but once any of them changes, so the menu's DLSS rows bring DLSS back
// without a restart. 0: none failed)
uint64_t refused = 0;
};
State& st() {
static State s;
@@ -310,6 +314,8 @@ int prepare(VkCommandBuffer cmd, uint32_t rw, uint32_t rh, uint32_t ow, uint32_t
else
snprintf(why, sizeof why, "the render size %ux%u left its range, %ux%u to %ux%u", rw, rh, s.min_rw, s.min_rh,
s.feature_rw, s.feature_rh);
const uint64_t key = (uint64_t)ow << 44 ^ (uint64_t)oh << 24 ^ (uint64_t)preset << 1 ^ (hdr ? 1 : 0) ^ 1ull << 63;
if (s.refused == key) return *fail = "its feature was not made", 0; // (until a DLSS setting changes: upstream #2550)
if (s.feature) {
NVSDK_NGX_Handle* old = s.feature;
temporal_later([old] { NVSDK_NGX_VULKAN_ReleaseFeature(old); });
@@ -373,9 +379,14 @@ int prepare(VkCommandBuffer cmd, uint32_t rw, uint32_t rh, uint32_t ow, uint32_t
(unsigned long long)s.retry_frame, s.retries, kMemoryRetries);
return *fail = kNoMemory, 0;
}
return *fail = "its feature was not made", -1;
// ((Triforce, upstream 6770b115 #2550) any other failure: the game's upscale until a DLSS setting (preset, output,
// HDR) changes, not for the rest of the run. Quick DLSS model switches left several features alive, and NGX then
// refused the next one (0xbad00002): DLSS was gone until a restart, with no word why)
s.refused = key;
logf("vk: NVIDIA DLSS: the game's upscale until a DLSS setting changes (the DLSS model row, the output, HDR)");
return *fail = "its feature was not made", 0;
}
s.retries = 0, s.retry_frame = 0;
s.retries = 0, s.retry_frame = 0, s.refused = 0;
s.feature_rw = max_w, s.feature_rh = max_h, s.feature_ow = ow, s.feature_oh = oh, s.min_rw = min_w, s.min_rh = min_h;
s.feature_preset = preset, s.feature_hdr = hdr;
s.features_made++;