fix(vk): DLAA changing place before or after the bloom restarts its history, not the motion #2455
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2455
Loading…
Reference in a new issue
No description provided.
Delete branch "Jiro113/Longshot:fix/dlaa-place-motion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When NVIDIA DLAA changes place, before the game's bloom or after it (the Insert menu's DLAA before the bloom row, or
a frame without the scene's linear colour, such as a loading screen), the renderer starts a new history for DLAA. That
is right: the two places see different pictures (linear light, or the tone-mapped one). But it also dropped that frame's
motion: its motion vectors were zeros, and the actors' motion was not drawn over them, although the camera and the
actors are the same on both sides of the bloom.
draw_enginenow reads the engine's previous frame before the change of place resets it, and keeps it for the motion ofthat one frame (
moved). DLAA's own history still starts again (f.reset).Nothing changes on screen on main. NGX's DLSS Frame Generation starts a new history with DLAA on that frame
(
vk_dlss.cppdlss_fg_inputs,f.reset). FSR 3.1's frame interpolation takes the chain's motion on that frameinstead of the camera's alone. The renderer's own frame generation does not read it. This is needed by DLSS Frame
Generation through NVIDIA Streamline (a pull request of its own, based on this one): Streamline's DLSS-G keeps its own
history, so it needs real motion on that frame.
Read first:
gpu/vk/vk_temporal.cppdraw_engine(drawn,moved,seen), thentests/temporal_history_test.cpp.Testing
Tested: Windows 11, RTX 4090, driver 621.24. Renderer built from this branch with NVIDIA's DLSS SDK, in nightly-786,
in a 1920x1080 window. Saved rows: Upscaler DLSS at native (DLAA), DLAA before the bloom on, Frame generation Fixed 2x
by DLSS FG (NGX).
dlss_pre_bloomwas changed six times, 5 s apart, through the control bridge(
longshot_ctl.py option set):upscaler: NVIDIA DLAA before/after the game's bloom and tone map, thenNVIDIA DLAA draws before the game's bloomordraws OoT's upscale);and a new DLSS feature was made; FSR 3.1's frame interpolation made every other present across the six changes
(
fsr3fi: of the last 600 presents 600 made by FSR 3.1in each window holding one); 59.5 to 60.0 fps 5 s after eachchange, no device lost, a normal exit.
RX_VK_ONLY=1, Ubuntu 22.04 with tools.lock's clang) atfcb5889a8, with no warning.tests/test_temporal_history.py(--cxx clang++): 6 failures on main ("a change of place lost the motion", forDLSS, FSR 4 and XeSS), passes here.
tests/test_dlss_pre_bloom.pypasses.tests/run_all.pyon Windows (llvm-mingw): every check that fails here fails on main8aa5ab876on this PC too, thesame 32 (below). Nine more timed out in a first run made beside another; run again alone, they pass.
The 32 checks failing on main and here, on this PC
test_amd_subgroup_profiles, test_auto_handheld, test_bug_report, test_build_long_paths, test_crash_dialog,
test_crt_options, test_dev_ab, test_dev_build, test_dev_migrate, test_dev_packs, test_discover, test_flat_map,
test_game_menu_mouse_buttons, test_input_movie, test_job_queue, test_lift_lookups, test_linux_preflight,
test_make_game_cache, test_menu_text_field, test_pads_after_menu, test_perf_report, test_pipeline_share,
test_rdna2_mesh_only, test_readback_timeout_source, test_rumble_menu, test_sampler_admission, test_sdiv_overflow,
test_shader_profile_caps, test_target_image_reuse, test_vibration_menu, test_vram_compact, test_walk.
feature's HDR colour, so the feature is made again on that frame and
draw_enginegives it no motion (ready == 2,moved = 0), with this change as before it. The six changes show that changing place still works; they do not showa frame where the kept motion is used.
tests/test_temporal_history.pyis what shows the fix.Still to test:
across a frame without the scene's linear colour (a loading screen). By hand, this PC.
Measurements
Verdict: the motion is kept on the frame where DLAA changes place: the test fails on main and passes here. There is
no cost to measure: the game ran at 60 fps after each change (Testing).
Setup: Windows 11,
tests/test_temporal_history.py --cxx clang++(llvm-mingw), which buildstests/temporal_history_test.cpparounddraw_engine's own history decision cut fromvk_temporal.cpp.8aa5ab876fcb5889a8Risks
This is the same check as on any other frame (at most two frames apart, and the camera's reprojection). DLAA's history
starts again anyway.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Windows 11, RTX 4090, driver 621.24; nightly-786 with this branch's renderer built with NVIDIA's DLSS SDK, in a 1920x1080 window, Hyrule Field. Saved rows: Upscaler DLSS at native (DLAA), DLAA before the bloom on, Frame generation Fixed 2x by DLSS FG (NGX). dlss_pre_bloom changed six times, 5 s apart, through the control bridge: each change answered, DLAA's place logged each time, a new DLSS feature each time, NGX's DLSS FG told to reset on those frames and kept making frames, 60.0 to 60.2 fps after each change, no device lost, a normal exit. The same six changes with Frame generation by FSR 3.1 FG: FSR 3.1 made every other present across them, 59.5 to 60.0 fps, no device lost, a normal exit.
Possibly related, for context:
WIP: fix(vk): DLAA changing place before or after the bloom restarts its history, not the motionto fix(vk): DLAA changing place before or after the bloom restarts its history, not the motionSecond review pass: no code change. Testing now says what the in-game run does not show. Without the game's native HDR, changing DLAA's place also makes a new DLSS feature on that frame, which gets no motion with or without this fix. So the six changes show that the place changes; only
tests/test_temporal_history.pyshows the kept motion. Still to test has the case that uses it. The branch merges without conflict onmainbe663a08a, and #2456 carries its two commits unchanged.fcb5889a80060916b23cView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.