Copy a frame's uniform blocks at the submit call with the replay on its own thread, and say what that option can show.

With NX2NAVI_REPLAY_ASYNC the uniform snapshot was taken when the replay thread started recording a submission, up to a frame after the game submitted it. The game rewrites that memory without waiting for the GPU: in a graveyard the settings block of the shadow pass held another block's values in the frame its per-frame allocator moved on to the next stretch of memory, about every 364 frames. The submitting thread now takes the copy before it queues the submission (vk_usnap_take), and the replay thread takes it over and leaves out what GPU writes in flight touch (vk_usnap_begin adopt). A frame dump of such a frame shows the block as the game submitted it.

That frame still comes out dark with the option on: vertex, storage and index memory reaches the VRAM mirrors when the replay uses it, as late as the uniform blocks did, and the snapshot covers uniform bindings only. With the option off, 3,000 presents in a row were free of dark and odd frames in that graveyard and in a village; with it on, one frame in about 364 was dark. It gave 65.6 against 56.1 and 64.1 against 54.3 frames per second in those two places. The option stays off by default, and its menu text, the example settings file and the release notes now say that it can show a dark or flickering frame.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
epicmeme546
2026-11-10 06:04:14 -05:00
parent d1bebd34cd
commit 7e23e7309b
6 changed files with 130 additions and 16 deletions

View File

@@ -396,7 +396,7 @@ static const char *const text_en[UI_TEXT_COUNT] = {
[UI_MENU_ASYNC_PREEMPT_DESC] = "Lets a game thread interrupt another one on the same virtual core.",
[UI_MENU_PREEMPT_OFF] = "Off", [UI_MENU_PREEMPT_ON] = "On", [UI_MENU_PREEMPT_INHERIT] = "Inheritance only",
[UI_MENU_REPLAY_ASYNC] = "GPU frame prep on its own thread",
[UI_MENU_REPLAY_ASYNC_DESC] = "Prepares frames for the GPU on a separate thread instead of the game thread. Adds up to one frame of latency.",
[UI_MENU_REPLAY_ASYNC_DESC] = "Prepares frames for the GPU on a separate thread instead of the game thread. Faster in heavy scenes, but can show a dark or flickering frame now and then, and adds up to one frame of latency.",
[UI_MENU_TIMER_1MS] = "1 ms Windows timer",
[UI_MENU_TIMER_1MS_DESC] = "Raises the system timer resolution to 1 ms for steadier frame pacing.",
[UI_MENU_PIPE_WAIT] = "Waiting draw handling",
@@ -939,7 +939,7 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
[UI_MENU_ASYNC_PREEMPT_DESC] = "Позволяет потоку игры прервать другой поток на том же виртуальном ядре.",
[UI_MENU_PREEMPT_OFF] = "Выкл.", [UI_MENU_PREEMPT_ON] = "Вкл.", [UI_MENU_PREEMPT_INHERIT] = "Только наследование",
[UI_MENU_REPLAY_ASYNC] = "Подготовка кадра для GPU в отдельном потоке",
[UI_MENU_REPLAY_ASYNC_DESC] = "Кадр для GPU готовится в отдельном потоке, а не в потоке игры. Добавляет до одного кадра задержки.",
[UI_MENU_REPLAY_ASYNC_DESC] = "Кадр для GPU готовится в отдельном потоке, а не в потоке игры. Быстрее в тяжёлых сценах, но иногда может показать тёмный или мерцающий кадр и добавляет до одного кадра задержки.",
[UI_MENU_TIMER_1MS] = "Таймер Windows 1 мс",
[UI_MENU_TIMER_1MS_DESC] = "Повышает точность системного таймера до 1 мс для ровного темпа кадров.",
[UI_MENU_PIPE_WAIT] = "Обработка ожидающих отрисовок",
@@ -1328,7 +1328,7 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
[UI_MENU_ASYNC_PREEMPT_DESC] = "Deixa uma thread do jogo interromper outra no mesmo núcleo virtual.",
[UI_MENU_PREEMPT_OFF] = "Desligado", [UI_MENU_PREEMPT_ON] = "Ligado", [UI_MENU_PREEMPT_INHERIT] = "Só herança",
[UI_MENU_REPLAY_ASYNC] = "Preparo de quadro da GPU em thread própria",
[UI_MENU_REPLAY_ASYNC_DESC] = "Prepara os quadros para a GPU numa thread separada em vez da thread do jogo. Adiciona até um quadro de latência.",
[UI_MENU_REPLAY_ASYNC_DESC] = "Prepara os quadros para a GPU numa thread separada em vez da thread do jogo. Mais rápido em cenas pesadas, mas pode mostrar um quadro escuro ou piscando de vez em quando, e adiciona até um quadro de latência.",
[UI_MENU_TIMER_1MS] = "Timer do Windows de 1 ms",
[UI_MENU_TIMER_1MS_DESC] = "Aumenta a resolução do timer do sistema para 1 ms, para um ritmo de quadros mais estável.",
[UI_MENU_PIPE_WAIT] = "Tratamento de desenhos em espera",
@@ -1964,7 +1964,7 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
[UI_MENU_PREEMPT_ON] = "开",
[UI_MENU_PREEMPT_INHERIT] = "仅继承",
[UI_MENU_REPLAY_ASYNC] = "GPU 帧准备独立线程",
[UI_MENU_REPLAY_ASYNC_DESC] = "在单独的线程而不是游戏线程上为 GPU 准备帧。"
[UI_MENU_REPLAY_ASYNC_DESC] = "在单独的线程而不是游戏线程上为 GPU 准备帧。在复杂场景中更快,但偶尔可能出现变暗或闪烁的画面。"
"最多增加一帧延迟。",
[UI_MENU_TIMER_1MS] = "1 ms Windows 计时器",
[UI_MENU_TIMER_1MS_DESC] = "将系统计时器精度提高到 1 ms,使帧间隔更平稳。",