perf(vk): warm FSR 4 pipelines during shader preparation #1886

Open
DYNMK wants to merge 2 commits from DYNMK/Longshot:perf/fsr4-prepare-pipelines into main
First-time contributor

Summary

Build and persist the FSR 4 Vulkan pipelines before the first gameplay frame.

--prepare-shaders
  FSR 4 warm-up
    SDR offscreen dispatch
    Native HDR offscreen dispatch when selected
    wait for optimized layers, then save the dedicated Vulkan cache
  existing game shader preparation

Evidence

  • Before: On nightly 612, the first FSR 4 dispatch with an empty cache coincided with an 8.3 s frame stall.
  • After: The Windows RX 6900 XT cold preparation run built all three optimized FSR 4.1.2 layers before gameplay. A second process loaded all three in 0.0 s as rounded by the log. The Native HDR variant prepared both SDR and HDR contexts. Both gameplay runs on the exact PR renderer presented Native HDR at 1440p and loaded all three optimized FSR 4 layers. Scene loading still produced separate slow frames.

Testing

Tested:

  • Windows 11, AMD RX 6900 XT, Adrenalin 26.11.2: offscreen SDR and Native HDR preparation, first gameplay dispatch, output in Native HDR, and cache reuse across processes. At 949f48f9 (on main @ 2210931c), the FSR 4-enabled Vulkan renderer compiled and linked on Windows (llvm-mingw) and Arch Linux (WSL 2), and the exact PR renderer reached Native HDR gameplay twice with the nightly 612 host matching the baseline runs' settings and save. Follow-up e4f2b0e0 changes only tests/test_prepare_cache_save.py. Rebased cleanly onto main @ a8b2d8cd (655ab0cc, 2aa940c0): the six intermediate commits on main (#1809, #1866, #1727, #1873, #1646, #1888) do not touch vk_fsr4.*, vk_main.cpp, or the FSR 4 cache/warm-up path (#1873 touches gpu/vk/vk_draw.cpp only for longshot_pipelines.bin note reads and rebased with zero conflicts), so the Windows gameplay runs and measurements still hold. Linux runtime behavior on native AMD Vulkan remains to be tested.
  • Focused and policy checks re-verified on rebased head 2aa940c0 in Arch Linux (WSL 2): test_fsr4_own_cache.py, test_prepare_stall.py, test_note_refs_once.py, test_utf8_paths.py, test_switch_table.py, test_doc_anchors.py, test_thinlto_tls.py, and test_log_levels.py all pass; test_prepare_cache_save.py compiles, passes the warm-up call-order checks, and hits only the pre-existing progress-ratio failure (AssertionError: ('refresh', 'most', 'zero', ['0.166', '0.666', '0.750'])) reproduced on main.
  • Full repository strict suite (python -I -B tests/run_all.py --strict, matching mise run test) in Arch Linux (WSL 2) on main @ 2210931c base with pinned Python 3.12, Vulkan/SPIR-V headers, glslang 16.6.0, and .NET: 807 passed, 59 failed, 17 skipped (17 Windows-only / hardware-Vulkan / Unicorn-with-game-files checks skipped by the runner).
    • Focused and policy checks pass on e4f2b0e0: test_fsr4_own_cache.py, test_prepare_stall.py, test_utf8_paths.py, test_switch_table.py, test_doc_anchors.py, test_thinlto_tls.py, test_log_levels.py.
    • test_recording_admission.py failed intermittently under --jobs 8 and passed on rerun on e4f2b0e0 (and passed on main @ 2210931c).
    • test_prepare_cache_save.py failed to compile on 949f48f9 until e4f2b0e0 stubbed fsr4_prepare_shaders() and asserted warm-up ordering; on e4f2b0e0 it compiles, passes the call-order checks, and hits only the same pre-existing progress-ratio failure (AssertionError: ('refresh', 'most', 'zero', ['0.166', '0.666', '0.750'])) reproduced on main @ 2210931c.
    • test_vbytes.py timed out at 600 s on both this PR and main @ 2210931c.
    • All 58 failures/timeouts (every failure other than the rerun-passing test_recording_admission.py) also fail on main @ 2210931c in the same WSL environment (0 failures unique to this PR): test_appimage_player_build.py, test_bug_report_defaults.py, test_capture_read_once.py, test_capture_readback_visibility.py, test_crash_dialog.py, test_crt_options.py, test_damage_debug_menu.py, test_dev_ab.py, test_dev_packs.py, test_display_startup_failure.py, test_dlss_feature_size.py, test_draw_binds.py, test_draw_stream_visibility.py, test_failed_compile_keeps_objects.py, test_frame_overlap.py, test_fsr3fi_hud_layer.py, test_fsr_image_retirement.py, test_fsr_uniform_ownership.py, test_guest_imported.py, test_high_fps_fixes.py, test_host_guest_writes.py, test_hud_layout_row.py, test_libc_hooks.py, test_lift_cache.py, test_linux_preflight.py, test_linux_pressure.py, test_linux_tools.py, test_linux_update.py, test_log_open_failure.py, test_low_vram_texture_mips.py, test_make_game_ngx.py, test_mise_build.py, test_missing_nup.py, test_mods_list.py, test_mods_size_table.py, test_ngx_sdk.py, test_nonuniform_image_arrays.py, test_pass_barrier.py, test_pending_guest_import.py, test_pipeline_play_cache.py, test_prepare_cache_save.py, test_present_queue_default.py, test_present_source_crop.py, test_profiling_mode.py, test_psychov35_fsr3_fg.py, test_readback_timeout_source.py, test_replay_write_order.py, test_sampler_admission.py, test_slow_frames.py, test_song_note_cue.py, test_staging_burst.py, test_texel_buffer_ownership.py, test_ub_update_batch.py, test_upscaler_rows.py, test_vbytes.py, test_vcore_escape.py, test_vk_occlusion_queries.py, test_walk_key.py.

Still to test:

  • windows+amd (RX 7000/9000 and lower-memory AMD cards): prepare shaders from an empty FSR 4 cache and start gameplay with FSR 4 enabled, expecting vk: AMD FSR 4: ... pipeline preparation finished during preparation and cache hits on first gameplay dispatch (@Beanstalk).
  • linux+amd (Mesa RADV) and steamdeck: prepare shaders and start gameplay, expecting FSR 4 warm-up when amd_fidelityfx_upscaler_vk.so is present or clean early-out with no preparation regression when absent (@Beanstalk).
  • windows+nvidia: prepare shaders and start gameplay, expecting clean early-out with no preparation regression (@Beanstalk).
  • Tuning-disabled (RX_VK_FSR4_TUNE=0) and persistence-disabled (RX_VK_PCACHE_LOAD=0) configurations on AMD Windows, plus Linux RADV with amd_fidelityfx_upscaler_vk.so installed if not bundled on Test Farm nodes (by hand).

Measurements

Verdict: The PR moves cold FSR 4 pipeline creation into preparation. Both PR runs entered gameplay with all three optimized layers available from cache. A warm driver cache can already supply those layers on main, so these runs do not establish a general frame-time improvement.

Setup: Windows 11, RX 6900 XT, Adrenalin 26.11.2, FSR 4.1.2, Native HDR at 2560×1440. Interleaved main → PR → main → PR, same nightly 612 host, same renderer path, settings, Kokiri save and 10-second gameplay hold. Each run began without Longshot's dedicated FSR cache. The driver cache and game shader caches were retained across runs, so the first and second pairs can have different driver-cache states.

Measurement Before: main @ 2210931c After: this PR @ 949f48f9
Optimized Native HDR layers ready at end of preparation 0 / 0 3 / 3
Dedicated FSR 4 cache bytes before launch 0 / 0 638,948 / 638,948
Optimized layers reported as cache hits in gameplay 0 / 3 3 / 3
Preparation elapsed 26.49 s / 11.64 s 131.36 s / 14.70 s
First Native HDR FSR 4 context creation (CPU) 93.3 ms / 82.1 ms 73.9 ms / 79.4 ms

Main's first run still had an optimized build in progress at shutdown. Both PR runs reported 0.0 s per optimized layer from cache at gameplay precision. Median preparation was 19.07 s on main and 73.03 s on the PR. Median Native HDR context creation was 87.7 ms and 76.7 ms, respectively. This measures context creation only. Scene-load hitches and later HDR/SDR context transitions remain outside the patch.

The existing RX_VK_FSR4_HDR switch retains its default. Preparation respects it when deciding whether to warm the Native HDR context.

Risks

Door: Two-way. Reverting removes the preparation phase. Driver validation and the dedicated cache format stay the same.

Blast Radius: FSR 4.

A cold preparation can add roughly two minutes on this GPU. Two contexts are warmed when Native HDR is selected. Memory headroom can still prevent building optional optimized layers. This change leaves live HDR/SDR context recreation and texture streaming outside its scope.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary Build and persist the FSR 4 Vulkan pipelines before the first gameplay frame. ```text --prepare-shaders FSR 4 warm-up SDR offscreen dispatch Native HDR offscreen dispatch when selected wait for optimized layers, then save the dedicated Vulkan cache existing game shader preparation ``` ## Evidence - **Before**: On nightly 612, the first FSR 4 dispatch with an empty cache coincided with an 8.3 s frame stall. - **After**: The Windows RX 6900 XT cold preparation run built all three optimized FSR 4.1.2 layers before gameplay. A second process loaded all three in 0.0 s as rounded by the log. The Native HDR variant prepared both SDR and HDR contexts. Both gameplay runs on the exact PR renderer presented Native HDR at 1440p and loaded all three optimized FSR 4 layers. Scene loading still produced separate slow frames. ## Testing **Tested:** - Windows 11, AMD RX 6900 XT, Adrenalin 26.11.2: offscreen SDR and Native HDR preparation, first gameplay dispatch, output in Native HDR, and cache reuse across processes. At `949f48f9` (on `main @ 2210931c`), the FSR 4-enabled Vulkan renderer compiled and linked on Windows (`llvm-mingw`) and Arch Linux (WSL 2), and the exact PR renderer reached Native HDR gameplay twice with the nightly 612 host matching the baseline runs' settings and save. Follow-up `e4f2b0e0` changes only `tests/test_prepare_cache_save.py`. Rebased cleanly onto `main @ a8b2d8cd` (`655ab0cc`, `2aa940c0`): the six intermediate commits on `main` (`#1809`, `#1866`, `#1727`, `#1873`, `#1646`, `#1888`) do not touch `vk_fsr4.*`, `vk_main.cpp`, or the FSR 4 cache/warm-up path (`#1873` touches `gpu/vk/vk_draw.cpp` only for `longshot_pipelines.bin` note reads and rebased with zero conflicts), so the Windows gameplay runs and measurements still hold. Linux runtime behavior on native AMD Vulkan remains to be tested. - Focused and policy checks re-verified on rebased head `2aa940c0` in Arch Linux (WSL 2): `test_fsr4_own_cache.py`, `test_prepare_stall.py`, `test_note_refs_once.py`, `test_utf8_paths.py`, `test_switch_table.py`, `test_doc_anchors.py`, `test_thinlto_tls.py`, and `test_log_levels.py` all pass; `test_prepare_cache_save.py` compiles, passes the warm-up call-order checks, and hits only the pre-existing progress-ratio failure (`AssertionError: ('refresh', 'most', 'zero', ['0.166', '0.666', '0.750'])`) reproduced on `main`. - Full repository strict suite (`python -I -B tests/run_all.py --strict`, matching `mise run test`) in Arch Linux (WSL 2) on `main @ 2210931c` base with pinned Python 3.12, Vulkan/SPIR-V headers, glslang 16.6.0, and .NET: **807 passed, 59 failed, 17 skipped** (17 Windows-only / hardware-Vulkan / Unicorn-with-game-files checks skipped by the runner). - Focused and policy checks pass on `e4f2b0e0`: `test_fsr4_own_cache.py`, `test_prepare_stall.py`, `test_utf8_paths.py`, `test_switch_table.py`, `test_doc_anchors.py`, `test_thinlto_tls.py`, `test_log_levels.py`. - `test_recording_admission.py` failed intermittently under `--jobs 8` and passed on rerun on `e4f2b0e0` (and passed on `main @ 2210931c`). - `test_prepare_cache_save.py` failed to compile on `949f48f9` until `e4f2b0e0` stubbed `fsr4_prepare_shaders()` and asserted warm-up ordering; on `e4f2b0e0` it compiles, passes the call-order checks, and hits only the same pre-existing progress-ratio failure (`AssertionError: ('refresh', 'most', 'zero', ['0.166', '0.666', '0.750'])`) reproduced on `main @ 2210931c`. - `test_vbytes.py` timed out at 600 s on both this PR and `main @ 2210931c`. - All 58 failures/timeouts (every failure other than the rerun-passing `test_recording_admission.py`) also fail on `main @ 2210931c` in the same WSL environment (0 failures unique to this PR): `test_appimage_player_build.py`, `test_bug_report_defaults.py`, `test_capture_read_once.py`, `test_capture_readback_visibility.py`, `test_crash_dialog.py`, `test_crt_options.py`, `test_damage_debug_menu.py`, `test_dev_ab.py`, `test_dev_packs.py`, `test_display_startup_failure.py`, `test_dlss_feature_size.py`, `test_draw_binds.py`, `test_draw_stream_visibility.py`, `test_failed_compile_keeps_objects.py`, `test_frame_overlap.py`, `test_fsr3fi_hud_layer.py`, `test_fsr_image_retirement.py`, `test_fsr_uniform_ownership.py`, `test_guest_imported.py`, `test_high_fps_fixes.py`, `test_host_guest_writes.py`, `test_hud_layout_row.py`, `test_libc_hooks.py`, `test_lift_cache.py`, `test_linux_preflight.py`, `test_linux_pressure.py`, `test_linux_tools.py`, `test_linux_update.py`, `test_log_open_failure.py`, `test_low_vram_texture_mips.py`, `test_make_game_ngx.py`, `test_mise_build.py`, `test_missing_nup.py`, `test_mods_list.py`, `test_mods_size_table.py`, `test_ngx_sdk.py`, `test_nonuniform_image_arrays.py`, `test_pass_barrier.py`, `test_pending_guest_import.py`, `test_pipeline_play_cache.py`, `test_prepare_cache_save.py`, `test_present_queue_default.py`, `test_present_source_crop.py`, `test_profiling_mode.py`, `test_psychov35_fsr3_fg.py`, `test_readback_timeout_source.py`, `test_replay_write_order.py`, `test_sampler_admission.py`, `test_slow_frames.py`, `test_song_note_cue.py`, `test_staging_burst.py`, `test_texel_buffer_ownership.py`, `test_ub_update_batch.py`, `test_upscaler_rows.py`, `test_vbytes.py`, `test_vcore_escape.py`, `test_vk_occlusion_queries.py`, `test_walk_key.py`. **Still to test:** - `windows+amd` (RX 7000/9000 and lower-memory AMD cards): prepare shaders from an empty FSR 4 cache and start gameplay with FSR 4 enabled, expecting `vk: AMD FSR 4: ... pipeline preparation finished` during preparation and cache hits on first gameplay dispatch (`@Beanstalk`). - `linux+amd` (Mesa RADV) and `steamdeck`: prepare shaders and start gameplay, expecting FSR 4 warm-up when `amd_fidelityfx_upscaler_vk.so` is present or clean early-out with no preparation regression when absent (`@Beanstalk`). - `windows+nvidia`: prepare shaders and start gameplay, expecting clean early-out with no preparation regression (`@Beanstalk`). - Tuning-disabled (`RX_VK_FSR4_TUNE=0`) and persistence-disabled (`RX_VK_PCACHE_LOAD=0`) configurations on AMD Windows, plus Linux RADV with `amd_fidelityfx_upscaler_vk.so` installed if not bundled on Test Farm nodes (by hand). ## Measurements **Verdict:** The PR moves cold FSR 4 pipeline creation into preparation. Both PR runs entered gameplay with all three optimized layers available from cache. A warm driver cache can already supply those layers on main, so these runs do not establish a general frame-time improvement. Setup: Windows 11, RX 6900 XT, Adrenalin 26.11.2, FSR 4.1.2, Native HDR at 2560×1440. Interleaved main → PR → main → PR, same nightly 612 host, same renderer path, settings, Kokiri save and 10-second gameplay hold. Each run began without Longshot's dedicated FSR cache. The driver cache and game shader caches were retained across runs, so the first and second pairs can have different driver-cache states. | Measurement | Before: main @ 2210931c | After: this PR @ 949f48f9 | |---|---|---| | Optimized Native HDR layers ready at end of preparation | 0 / 0 | 3 / 3 | | Dedicated FSR 4 cache bytes before launch | 0 / 0 | 638,948 / 638,948 | | Optimized layers reported as cache hits in gameplay | 0 / 3 | 3 / 3 | | Preparation elapsed | 26.49 s / 11.64 s | 131.36 s / 14.70 s | | First Native HDR FSR 4 context creation (CPU) | 93.3 ms / 82.1 ms | 73.9 ms / 79.4 ms | Main's first run still had an optimized build in progress at shutdown. Both PR runs reported 0.0 s per optimized layer from cache at gameplay precision. Median preparation was 19.07 s on main and 73.03 s on the PR. Median Native HDR context creation was 87.7 ms and 76.7 ms, respectively. This measures context creation only. Scene-load hitches and later HDR/SDR context transitions remain outside the patch. The existing `RX_VK_FSR4_HDR` switch retains its default. Preparation respects it when deciding whether to warm the Native HDR context. ## Risks **Door:** Two-way. Reverting removes the preparation phase. Driver validation and the dedicated cache format stay the same. **Blast Radius:** FSR 4. A cold preparation can add roughly two minutes on this GPU. Two contexts are warmed when Native HDR is selected. Memory headroom can still prevent building optional optimized layers. This change leaves live HDR/SDR context recreation and texture streaming outside its scope. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
perf(vk): warm FSR 4 pipelines during shader preparation
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
949f48f9d3
Assisted-by: OpenAI Codex
Author
First-time contributor

Tested in game: Windows 11, RX 6900 XT, Adrenalin 26.11.2: the pre-rebase implementation ran in native HDR gameplay at 1440p and reused all three optimized FSR 4.1.2 pipelines. SDR and Native HDR offscreen preparation completed. Exact rebased-head gameplay retest is pending.

Tested in game: Windows 11, RX 6900 XT, Adrenalin 26.11.2: the pre-rebase implementation ran in native HDR gameplay at 1440p and reused all three optimized FSR 4.1.2 pipelines. SDR and Native HDR offscreen preparation completed. Exact rebased-head gameplay retest is pending.
Member

Possibly related, for context:

  • PR #1752 perf(vk): AMD FSR 4's unrolled layers in a pipeline cache of their own, kept across updates, and taken from it with no memory asked — Adds the dedicated persistent cache for FSR 4 optimized pipelines that this PR warms during preparation.
Possibly related, for context: - PR #1752 perf(vk): AMD FSR 4's unrolled layers in a pipeline cache of their own, kept across updates, and taken from it with no memory asked — Adds the dedicated persistent cache for FSR 4 optimized pipelines that this PR warms during preparation.
Author
First-time contributor

The exact PR renderer built and linked on Windows with llvm-mingw and on Arch WSL with FSR 4 enabled. Focused Linux cache, dispatch and SPIR-V checks passed. Native Linux GPU runtime coverage remains open.

The exact PR renderer built and linked on Windows with llvm-mingw and on Arch WSL with FSR 4 enabled. Focused Linux cache, dispatch and SPIR-V checks passed. Native Linux GPU runtime coverage remains open.
Author
First-time contributor

Completed the interleaved Windows RX 6900 XT comparison using main 2210931c and PR head 949f48f9. The exact PR renderer reached Native HDR gameplay twice and reused all three prepared FSR 4 layers in both runs. The description includes the measured preparation cost and driver-cache limitation. The strict WSL suite is still running.

Completed the interleaved Windows RX 6900 XT comparison using main 2210931c and PR head 949f48f9. The exact PR renderer reached Native HDR gameplay twice and reused all three prepared FSR 4 layers in both runs. The description includes the measured preparation cost and driver-cache limitation. The strict WSL suite is still running.
test(vk): exercise FSR 4 warm-up before shader preparation
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 20s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
e4f2b0e06b
Assisted-by: OpenAI Codex
Author
First-time contributor

Finished the full strict WSL repository suite (python -I -B tests/run_all.py --strict, matching mise run test): 807 passed, 59 failed, 17 skipped.

  • ests/test_prepare_cache_save.py was updated in e4f2b0e0 to stub sr4_prepare_shaders() and verify warm-up ordering; it now compiles, passes the call-order checks, and hits only the same pre-existing progress-ratio failure (AssertionError: ('refresh', 'most', 'zero', ['0.166', '0.666', '0.750'])) reproduced on main @ 2210931c.
  • ests/test_recording_admission.py failed intermittently under --jobs 8 and passed on rerun on e4f2b0e0 (and on main @ 2210931c).
  • ests/test_vbytes.py timed out at 600 s on both this PR and main @ 2210931c.
  • All 58 remaining failures/timeouts reproduced on main @ 2210931c in the same WSL environment (0 failures unique to this PR) and are listed in the updated description.

Marking ready for review.

Finished the full strict WSL repository suite (python -I -B tests/run_all.py --strict, matching mise run test): 807 passed, 59 failed, 17 skipped. - ests/test_prepare_cache_save.py was updated in e4f2b0e0 to stub sr4_prepare_shaders() and verify warm-up ordering; it now compiles, passes the call-order checks, and hits only the same pre-existing progress-ratio failure (AssertionError: ('refresh', 'most', 'zero', ['0.166', '0.666', '0.750'])) reproduced on main @ 2210931c. - ests/test_recording_admission.py failed intermittently under --jobs 8 and passed on rerun on e4f2b0e0 (and on main @ 2210931c). - ests/test_vbytes.py timed out at 600 s on both this PR and main @ 2210931c. - All 58 remaining failures/timeouts reproduced on main @ 2210931c in the same WSL environment (0 failures unique to this PR) and are listed in the updated description. Marking ready for review.
DYNMK changed title from WIP: perf(vk): warm FSR 4 pipelines during shader preparation to perf(vk): warm FSR 4 pipelines during shader preparation 2026-11-20 18:13:04 +00:00
DYNMK force-pushed perf/fsr4-prepare-pipelines from e4f2b0e06b
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 20s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to 2aa940c048
Some checks are pending
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
beanstalk/approval waiting for a BigBean's 👍 on the request
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 18s
2026-11-20 18:20:42 +00:00
Compare
Author
First-time contributor

Rebased cleanly onto current main (8b2d8cd, heads 655ab0cc and 2aa940c0) with zero conflicts.

  • None of the 6 commits between 2210931c and 8b2d8cd (#1809, #1866, #1727, #1873, #1646, #1888) touch gpu/vk/vk_fsr4.*, gpu/vk/vk_main.cpp, or the FSR 4 cache/warm-up path (#1873 touches gpu/vk/vk_draw.cpp only for longshot_pipelines.bin note reads), so the Windows RX 6900 XT gameplay runs and interleaved measurements against main @ 2210931c still hold.
  • Re-verified focused and policy checks on rebased head 2aa940c0 in Arch Linux (WSL 2): est_fsr4_own_cache.py, est_prepare_stall.py, est_note_refs_once.py, est_utf8_paths.py, est_switch_table.py, est_doc_anchors.py, est_thinlto_tls.py, and est_log_levels.py all pass; est_prepare_cache_save.py compiles, passes the warm-up call-order checks, and hits only the pre-existing main progress-ratio failure.
Rebased cleanly onto current main (8b2d8cd, heads 655ab0cc and 2aa940c0) with zero conflicts. - None of the 6 commits between 2210931c and 8b2d8cd (#1809, #1866, #1727, #1873, #1646, #1888) touch gpu/vk/vk_fsr4.*, gpu/vk/vk_main.cpp, or the FSR 4 cache/warm-up path (#1873 touches gpu/vk/vk_draw.cpp only for longshot_pipelines.bin note reads), so the Windows RX 6900 XT gameplay runs and interleaved measurements against main @ 2210931c still hold. - Re-verified focused and policy checks on rebased head 2aa940c0 in Arch Linux (WSL 2): est_fsr4_own_cache.py, est_prepare_stall.py, est_note_refs_once.py, est_utf8_paths.py, est_switch_table.py, est_doc_anchors.py, est_thinlto_tls.py, and est_log_levels.py all pass; est_prepare_cache_save.py compiles, passes the warm-up call-order checks, and hits only the pre-existing main progress-ratio failure.
Author
First-time contributor

@Beanstalk Please test this PR against main on windows+amd, linux+amd, steamdeck, and windows+nvidia: prepare shaders from an empty FSR 4 cache (longshot_fsr4_pipelines.bin) and start gameplay from kokiri-start.

  • On windows+amd (especially RX 7000/9000 and lower-memory AMD cards): please report whether preparation logs vk: AMD FSR 4: ... pipeline preparation finished (... optimized layers ready), writes longshot_fsr4_pipelines.bin, and hits cache on the first gameplay FSR 4 dispatch without stalls or device lost.
  • On linux+amd (Mesa RADV) and steamdeck: please confirm FSR 4 warm-up works when amd_fidelityfx_upscaler_vk.so is present, or early-outs cleanly with no preparation regression when absent.
  • On windows+nvidia: sanity check that --prepare-shaders early-outs cleanly with no regression.
@Beanstalk Please test this PR against main on `windows+amd`, `linux+amd`, `steamdeck`, and `windows+nvidia`: prepare shaders from an empty FSR 4 cache (`longshot_fsr4_pipelines.bin`) and start gameplay from `kokiri-start`. - On `windows+amd` (especially RX 7000/9000 and lower-memory AMD cards): please report whether preparation logs `vk: AMD FSR 4: ... pipeline preparation finished (... optimized layers ready)`, writes `longshot_fsr4_pipelines.bin`, and hits cache on the first gameplay FSR 4 dispatch without stalls or device lost. - On `linux+amd` (Mesa RADV) and `steamdeck`: please confirm FSR 4 warm-up works when `amd_fidelityfx_upscaler_vk.so` is present, or early-outs cleanly with no preparation regression when absent. - On `windows+nvidia`: sanity check that `--prepare-shaders` early-outs cleanly with no regression.
Member

@DYNMK only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@DYNMK only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Some checks are pending
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
beanstalk/approval waiting for a BigBean's 👍 on the request
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 18s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/fsr4-prepare-pipelines:DYNMK-perf/fsr4-prepare-pipelines'
git switch 'DYNMK-perf/fsr4-prepare-pipelines'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1886
No description provided.