FidelityFX: answer the upscale calls with DLSS through Streamline (stacked on #1868) #1704
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1704
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1704"
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?
@marquezinii on GitHub · 2026-11-24 20:57 UTC · original
marquezinii:gpu/dlss-upscaler→main· +2766 −67 · 11 files · 4 commits · openStacked on #1868: its two commits come first here. This PR's own commits are the last two,
1812694and5800bd7, onmainat940d32f. #1868 writes an RGB9E5 output that NVIDIA can't store to through an FP16 texture (victory_gpu::rgb9e5), and makes that texture where the host refuses it with the title's uses. DLSS reuses both, so there's one copy of the bridge.What
With
VICTORY_DLSS_DIRpointing atbin\x64of NVIDIA's public Streamline SDK (2.x), the title's FidelityFX upscale calls are answered by DLSS instead of AMD's PC upscaler. The SDK isn't in the tree. It is loaded from that folder, the wayVICTORY_FIDELITYFX_DIRloads AMD's.victory_hle::modules::fidelityfxdoes what it already does for AMD's DLL. The title's textures become their host copies in the states the title gives, its command list becomes the host one, and an RGB9E5 output the host can't store to becomes #1868's FP16 texture. Then it hands the description tovictory_gpu::dlssinstead offfxDispatchfrom the PC DLL, and packs the output afterwards as it does for AMD's.slSetD3DDevice), with frame-based resource tagging.slUpgradeInterface), as Streamline's manual hooking guide recommends, so itspresentCommonruns on each present. Without that, Streamline logspresentCommon() was not observedand its per-frame bookkeeping never runs (reported in the comments).8 * ratio²phases, Halton(2, 3)), so the title renders the frames it would for FSR.const-asserted against MSVC's values.Tested
Windows 11 26300, RTX 5070 (driver 621.40), Streamline SDK 2.14.16:
victory-hle/tests/dlss.rsis new, built frommain'stests/fidelityfx.rs.RGB9E5 output written through an FP16 texture.VICTORY_DLSS_DIR.victory-gpu's unit tests pass: the FSR formulas, the DLSS mode per ratio, the dispatch mapping, and a DLSS upscale on a device made before Streamline starts.cargo test -p victory-gpupasses (except the two NVIDIA heap-cap failuresmainhas, #1744), and so doescargo test -p victory-hle.-D warningspasses, with and without--all-features.In the title (
mainat940d32fplus #1775 and #1751, without whichmainremoves the device at boot on NVIDIA (#1753); Series S profile, which takes the FidelityFX path):dlss: Streamline initialised on the host devicedlss: presenting through Streamlinedlss: upscale context on the host GPU viewport=0 render=[1280, 720] upscale=[1920, 1080] mode=MaxQualityFidelityFX: first upscaling, host formats of its textures formats=[10, 19, 34, 67]dlss: first upscale recorded on the host GPUpresentCommonerror and no Streamline error came up over about 4½ minutes in the world.a resource has no host texture in its state; the upscaling did not run.VICTORY_SKIP_PIPELINES=f607780aa8e502d0. Without it, the GPU hangs within a minute of entering the world on this card, on an indirect dispatch of that pipeline, with or without DLSS (DRED names it).Not tested: Series X (it doesn't take the FidelityFX path without #1793's picker change), other DLSS modes, AMD (DLSS needs NVIDIA).
@sagouindupm on GitHub · 2026-11-24 23:19 UTC · original
In-title result for this PR, since the description says it had not been run in the title: DLSS answers the title's upscale calls in Series S mode on an 8 GB card, and the picture is clean.
Setup
fxceless/victory-forkmainat2119b0e, plus its #32 (RGB9E5 stand-in), its #86 (the port of #1284), its #188 (second present plane), and7e6e578from this PR applied on top (one conflict, in the module comment ofvictory-hle/src/modules/ffx.rs). Release build.sl.interposer.dll,sl.common.dll,sl.dlss.dll,nvngx_dlss.dllin the folderVICTORY_DLSS_DIRnames.--console series-s, no other switch.cargo test --release -p victory-gpu: 116 passed, 0 failed, 1 ignored.From the log (one run, about 5 minutes, opening cutscene then the first gameplay room)
dlss: Streamline initialised on the host devicedlss: upscale context on the host GPU viewport=0 render=[1280, 720] upscale=[1920, 1080] flags=41 mode=MaxQualityffx: jitter phase count ... count=Some(18)dlss: first upscale recorded on the host GPU render=[1280, 720] upscale=[1920, 1080] mode=MaxQuality, thenffx: first upscale recorded ... result=0 ... format=10 packed=false(the output is the FP16 stand-in of #32, so no RGB9E5 packing here).Picture and speed
One error, once in the run
[streamline][error] commonInterface.cpp:559 [slEvaluateFeatureInternal] Streamline presentCommon() was not observed. Ensure the common plugin's presentCommon() function is invoked every frame. Without presentCommon(), internal bookkeeping and garbage collect...Nothing visible came of it in 5 minutes. I did not measure memory over a long run.
Not tested
No game data. AI-assisted: Claude Code applied the commit, made the run, read the log and wrote this comment.
@Marvisak on GitHub · 2026-11-25 03:35 UTC · original · edited 2026-11-25 07:19 UTC
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. This answers the title's FidelityFX upscale calls with DLSS. It loads
sl.interposer.dlland its plugins withLoadLibraryWfromVICTORY_DLSS_DIR(crates/victory-gpu/src/dlss.rs), about 1,400 lines in that file alone. Loading external code is the maintainer's call, so this cannot be a merge candidate on review alone.Update after your reply (head
5800bd7):presentCommon: the presenter now makes its swap chain throughslUpgradeInterface, which answers the earlier point. Your run reports no Streamline errors.rgb9e5.rs, theresource.rschange), so it should be reviewed and merged after #1868.The picture itself is still unchecked, since the frames are dark in your runs. A side-by-side with FidelityFX would help whoever decides.
Generated by Claude Code
@marquezinii on GitHub · 2026-11-25 04:48 UTC · original
Updated, taking the triage's three points and @sagouindupm's run (thanks for testing it in the title, and for catching the Streamline error):
presentCommon() was not observed.5800bd7: with DLSS on, the presenter makes its swap chain from Streamline's proxy factory (slUpgradeInterface). That's what the manual hooking guide recommends, sopresentCommonruns on each present. In a Series S run on an RTX 5070 the log now readsdlss: presenting through Streamline, then the context anddlss: first upscale recorded on the host GPU. Over about 4½ minutes in the world, nopresentCommonor other Streamline error came up.victory_gpu::rgb9e5.dlss/rgb9e5.rsis gone, and the FidelityFX module does the bridging for both backends. The stacking turned out to be needed in the title anyway. Without #1868's new commit, the RTX 5070 refused the title's RGB9E5 output texture (it comes with a clear value), so DLSS never ran:a resource has no host texture in its state; the upscaling did not run.victory-shaderhardware tests that failed onmainat the time (fixed in 42363ab/ccfb029). Rebased on940d32f.The title runs used
mainplus #1775 and #1751, since plainmainremoves the device at boot on NVIDIA (#1753). On this card the world also hangs the GPU within a minute on an indirect dispatch of compute pipelinef607780aa8e502d0, with or without DLSS (DRED names it). The runs skipped that pipeline withVICTORY_SKIP_PIPELINES. I couldn't judge the picture because the world's frames are still dark here, so @sagouindupm's comparison remains the picture check.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.