GPU: the ambient depth table bound by the resolve only, and frame generation asked again when DLSS-G allows more frames #3065
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3065
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3065"
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?
@Adriwin06 on GitHub · 2026-11-29 19:52 UTC · original
Adriwin06:gpu-fixes→main· +126 −6 · 2 files · 4 commits · openWhat it changes
2 small changes of the same kind, one commit each, so each can be reviewed, reverted or left out on its own:
Ambient: only the resolve pass binds the depth table
Every ambient role set root table 1 to the depth view. The radiance and
air roles have only an image UAV there, which is not a valid descriptor
for that SRV range even when their shaders leave the range unused. Only the resolve role, the one that reads
depth, binds it now.
Ported from DoubleGhosty/cool_fox@3ba9541 (Xyzstk), GPL-3.0-or-later.
Streamline: frame generation is asked again once DLSS-G reports more frames possible
The number of frames to generate is set from what slDLSSGGetState
reported before the first generated frame. When a later state reports a
higher num_frames_to_generate_max while fewer frames than wanted are
being generated (the multiplier came out lower than asked), the options
are now applied once more, so the asked multiplier takes effect instead
of staying at the early, lower maximum.
Ported from readmet3xt-lab/foxhound@4349ab5, GPL-3.0-or-later.
How it was tested
cargo testpassed for the crates it touches:cargo test -p victory-gpu --lib -- ambient::: 14 passedcargo test -p victory-gpu --lib -- streamline::: 53 passedcargo clippy --workspace --all-targets --locked: no finding that main does not already have (main has 34 of its own, which is why the Clippy step of CI is red on main itself).cargo xtask policy: no new finding (main fails it on crates/victory-loader/src/heap_sites/frame_users.rs).cargo clippyalso with--all-featuresadds no finding, andcargo test --workspace --lockedfails only tests main also fails on this machine: the five shader tests that fail on main here too (WARP's SM 6.2 and the validator) (barycentric_tests::first_half_values_render_on_hardware_and_warp, hw_tests::split_lds_wave32_read_after_read_barrier_coalescing_and_parity, intersect_tests::flat_global_stores_and_atomics_fence_uavs_at_group_barriers_across_waves, rect::tests::rectangles_are_drawn_whole, rect::tests::the_rectangle_stage_is_a_geometry_shader) and xtask's repository_passes_policy (frame_users.rs). 2208 passed, including five that fail on main (three BCPack oracle tests, the menu save race, the shader key test).Checked for overlap
🤖 Generated with Claude Code
[pr-fix] GPU: the ambient depth table bound by the resolve only, and frame generation asked again when DLSS-G allows more framesto GPU: the ambient depth table bound by the resolve only, and frame generation asked again when DLSS-G allows more frames@ -1160,0 +1159,4 @@// Only the resolve reads depth. The radiance and air roles have// only an image UAV, which is not a valid descriptor for this SRV// range even when their shaders leave the range unused.if role == Role::Resolve {@Copilot on GitHub · 2026-11-29 19:56 UTC · original
Role::Missalso reads depth: itsplace,gather, and reflection shaders callseen(), which loads the depth texture. This condition leaves those dispatches without their required depth table, breaking the specular stand-in and potentially triggering D3D12 validation errors. Bind depth for both Resolve and Miss; only Radiance and Air should skip it.@ -2582,3 +2582,3 @@let on = on && wanted != 0;let times = if on { wanted } else { 0 };if on != calls.framegen_on || times != calls.framegen_times {let raise = on && calls.framegen_on && FG_RAISE.swap(false, Relaxed);@Copilot on GitHub · 2026-11-29 19:56 UTC · original
If
slDLSSGSetOptionsrejects a raise from 2X to the requested 6X, this swap has already cleared the retry flag andFG_TIMESadvances to 6 despite the failure. The cached request is unchanged and the post-present check sees no shortfall, so generation can remain at 2X without another attempt. Restore the pending raise on failure and updateFG_TIMESonly when options are accepted, including the accepted out-of-VRAM warning.@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-29 19:56 UTC · original · reviewed
🟡 Changes recommended
Miss dispatches lack required depth bindings, risking broken specular rendering and D3D12 validation errors, while rejected frame-generation increases can clear retries and incorrectly advance the recorded multiplier.
2 open issues
What changed in this PR
This PR adjusts the GPU backend’s ambient depth binding and DLSS frame-generation recovery, following the earlier descriptor and multi-frame-generation fixes.
Changes:
crates/victory-gpu/src/streamline.rscrates/victory-gpu/src/ambient.rsReview effort: Balanced
@Adriwin06 on GitHub · 2026-11-30 00:54 UTC · original
Right, the miss program's place/gather/reflect passes call
seen()too. Fixed ine114116e: depth is bound forRole::ResolveandRole::Miss(reads_depth); Radiance and Air still skip it. Regression test:ambient::tests::the_roles_given_depth_are_those_whose_passes_read_it, which checks each role's passes in the shader source forseen(.@ -2582,3 +2582,3 @@let on = on && wanted != 0;let times = if on { wanted } else { 0 };if on != calls.framegen_on || times != calls.framegen_times {let raise = on && calls.framegen_on && FG_RAISE.swap(false, Relaxed);@Adriwin06 on GitHub · 2026-11-30 00:54 UTC · original
Fixed in
af5008cc:FG_TIMESnow changes only whenslDLSSGSetOptionstakes the options (OK, or the accepted out-of-VRAM warning), and a refused raise setsFG_RAISEagain so it is retried at the next present (options_answered). Regression test:streamline::framegen_tests::a_raise_frame_generation_refuses_is_asked_again.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.