DLSS and DLSS Frame Generation through NVIDIA Streamline (switches, GPU side)
VICTORY_DLSS=1: an upscaling the title asks for is recorded by DLSS Super Resolution at the same place of the title's command list, from the same colour, depth, motion vectors, exposure and reactive mask into the same output: a step of ours in the list (list::external; with VICTORY_THIN=1 an op in the list's stream, run where it is translated), the inputs prepared as a compute shader's would be, moved to the states the title gave, handed to slEvaluateFeature as local tags, the title's draw state set again after. The DLSS mode follows the render and output sizes (the smallest whose optimal size holds the render); preset from VICTORY_DLSS_PRESET; constants from the dispatch (jitter, motion-vector scale, near, far, field of view, reset, context flags). VICTORY_FRAMEGEN=1 (needs the line of submissions): the device is handed to Streamline, the direct queue is made through its device proxy and our swap chain through its factory proxy (manual hooking, nothing hooked globally). A host list that recorded an upscaling is noted; at its submission its depth and motion vectors become the latest, and the next present tags them (states the submissions left them in), sets constants and the latency markers, and switches frame generation on; off on presents without an upscaling. Series S's interface plane is tagged as the interface over the scene plane. Streamline is loaded at run time from VICTORY_STREAMLINE_DIR (default C:\dev\sdk\streamline-sdk-v2.14.16\bin\x64) after an Authenticode check, with no downloads; anything missing leaves the title's upscaling and our present as they were. The C ABI is written by hand from the SDK 2.14 headers (offsets asserted as the SDK asserts them); no NVIDIA file is in the repository. Log lines: support and requirements, feature versions, the first recording and every change of mode or size, per second the upscalings done, failed and left to the title, frame generation on/off, frames shown and status. streamline::check backs `victory upscaler-check`. The external-work helpers (host textures in a given state, inputs prepared as for a compute view, output written on the host) are ported from DexNom/VIctory (crates/victory-gpu/src/external.rs, GPL-3.0-or-later); the FidelityFX state mapping is from its fidelityfx.rs. Not run with the title yet: `victory upscaler-check` (no device) loads Streamline 2.14.16 on the RTX 4070 SUPER, driver 621.01: DLSS, DLSS Frame Generation and Reflex supported. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
717687b43f
commit
fc8b9caeb3
9 files changed
+2805
-8
No files matched your search
@@ -160,6 +160,42 @@ fn with_state(this: This, f: impl FnOnce(&crate::host::HostList, &mut crate::dra
|
||||
crate::copystat::recorded(started);
|
||||
}
|
||||
|
||||
/// Work of ours at a place in a title list (DLSS in place of the title's
|
||||
/// FidelityFX upscaling, `crate::streamline`): it is given the host list
|
||||
/// there and says whether it recorded into it; if it did, what the title set
|
||||
/// is set again before the title's next draw or dispatch.
|
||||
#[cfg(windows)]
|
||||
pub(crate) type External = Box<dyn FnOnce(&crate::host::HostList) -> bool + Send>;
|
||||
|
||||
/// Runs `work` at this place of title list `this`: now, or, with
|
||||
/// `VICTORY_THIN=1`, when the list's calls are translated (in their order).
|
||||
/// False if the list records nowhere.
|
||||
#[cfg(windows)]
|
||||
pub(crate) fn external(this: This, work: External) -> bool {
|
||||
if this.is_null() {
|
||||
return false;
|
||||
}
|
||||
let work = match thin::put_external(this, work) {
|
||||
Ok(()) => return true,
|
||||
Err(work) => work,
|
||||
};
|
||||
if host_list(this).is_none() {
|
||||
return false;
|
||||
}
|
||||
run_external(this, work);
|
||||
true
|
||||
}
|
||||
|
||||
/// [`external`]'s work on the list that records `this`'s calls.
|
||||
#[cfg(windows)]
|
||||
fn run_external(this: This, work: External) {
|
||||
with_state(this, |host, state| {
|
||||
if work(host) {
|
||||
state.replay(host);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// The submission of `lists` has run: each gives its descriptor tables'
|
||||
/// slots back ([`crate::draw::State::tables_done`]). A list cut at waits
|
||||
/// keeps them: its state goes with its last part.
|
||||
|
||||
Reference in new issue
Block a user