Frame generation on Series X: the colour without the interface, copied in front of the title's interface composite
On Series X the title blends its interface target over the frame itself: one triangle (vertex 0602c2384acbb3b2, pixel a78d088fa55aa495), the last draw into the texture it presents. With VICTORY_FRAMEGEN=1 the target is copied into a texture of ours in front of that draw, at its place in the title's list, and the present tags the copy as kBufferTypeHUDLessColor (VICTORY_FRAMEGEN_HUDLESS=0: not). Log: the first copy, each other pipeline that draws into a presented texture, and counts every ten frame-rate lines. Found reading the in-game path: - Frame generation's constants get the camera's planes in order (the title names the far plane first; the projection took 10000 for the near plane of an endless range). DLSS Super Resolution's are as before. - With Streamline's swap chain the system's Alt+Enter is not taken. - Video memory is logged before the first present with frame generation on and 240 presents later. upscaler-check: a stand-in colour without the interface is tagged with --present; with a device the check ends with frame generation off, the swap chain let go and slShutdown (VICTORY_CHECK_TEARDOWN=0: not): the exit code is 0, where the process failed fast at its exit before (0xC0000409, shown as 9). VICTORY_STREAMLINE_PRESENT=1 (off): with DLSS and no frame generation our swap chain is Streamline's proxy of it, which ends "presentCommon() was not observed" (the check runs it with --present: 120 upscalings and presents). With VICTORY_FRAMEGEN off and the new switches unset the title runs as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a83bc910a7
commit
1d0fa87f39
4 files changed
+497
-10
No files matched your search
@@ -1279,6 +1279,9 @@ pub(crate) struct HostList {
|
||||
/// The upscaling (`crate::streamline`) recorded in the list, noted for
|
||||
/// the present after its submission; 0 for none.
|
||||
upscale: std::sync::atomic::AtomicU64,
|
||||
/// The copy of the colour without the interface (`crate::streamline`)
|
||||
/// recorded in the list, noted likewise; 0 for none.
|
||||
hudless: std::sync::atomic::AtomicU64,
|
||||
/// Counts the list in [`ALIVE`] while it lives.
|
||||
_alive: Counted,
|
||||
/// The texts of the markers `note_op` set, in order (for device-removed
|
||||
@@ -4224,6 +4227,7 @@ impl Host {
|
||||
indirect_run: Mutex::default(),
|
||||
holding: std::sync::atomic::AtomicBool::new(false),
|
||||
upscale: std::sync::atomic::AtomicU64::new(0),
|
||||
hudless: std::sync::atomic::AtomicU64::new(0),
|
||||
_alive: Counted::new(),
|
||||
#[cfg(feature = "diagnostics")]
|
||||
notes,
|
||||
@@ -5604,6 +5608,10 @@ impl Host {
|
||||
if id != 0 {
|
||||
crate::streamline::submitted(id);
|
||||
}
|
||||
let id = run.take_hudless();
|
||||
if id != 0 {
|
||||
crate::streamline::hudless_submitted(id);
|
||||
}
|
||||
}
|
||||
let was_working = working(true);
|
||||
submitting(1, runs.len());
|
||||
@@ -6460,6 +6468,7 @@ impl HostList {
|
||||
let _resetting = crate::timeline::span("resetting a host list");
|
||||
self._alive.used();
|
||||
self.upscale.store(0, Ordering::Relaxed);
|
||||
self.hudless.store(0, Ordering::Relaxed);
|
||||
*self.coming.lock().unwrap_or_else(|e| e.into_inner()) = None;
|
||||
*self.deferred() = Deferred::default();
|
||||
self.states.lock().unwrap_or_else(|e| e.into_inner()).clear();
|
||||
@@ -7449,6 +7458,22 @@ impl HostList {
|
||||
self.upscale.swap(0, Ordering::Relaxed)
|
||||
}
|
||||
|
||||
/// The list recorded copy `id` of the colour without the interface
|
||||
/// (`crate::streamline`, frame generation).
|
||||
pub(crate) fn mark_hudless(&self, id: u64) {
|
||||
self.hudless.store(id, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
/// The copy the list recorded (0 for none).
|
||||
pub(crate) fn hudless(&self) -> u64 {
|
||||
self.hudless.load(Ordering::Relaxed)
|
||||
}
|
||||
|
||||
/// As [`HostList::hudless`], taken.
|
||||
pub(crate) fn take_hudless(&self) -> u64 {
|
||||
self.hudless.swap(0, Ordering::Relaxed)
|
||||
}
|
||||
|
||||
/// Runs `work` when the list is submitted, in order with its copies.
|
||||
/// `work` may write title memory (refreshes after it copy again).
|
||||
pub(crate) fn defer(&self, work: impl Fn() + Send + 'static) {
|
||||
@@ -8874,7 +8899,7 @@ impl Host {
|
||||
|
||||
/// The swap chain formats a presented texture can be copied into: its own
|
||||
/// family's.
|
||||
fn swap_format(format: DXGI_FORMAT) -> Option<DXGI_FORMAT> {
|
||||
pub(crate) fn swap_format(format: DXGI_FORMAT) -> Option<DXGI_FORMAT> {
|
||||
Some(match format.0 {
|
||||
27..=32 => DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||
87 | 90 | 91 => DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||
@@ -9624,6 +9649,14 @@ impl Host {
|
||||
}
|
||||
}
|
||||
|
||||
/// Lets the swap chain and what presents with it go, once everything
|
||||
/// sent has run (`victory upscaler-check`: before Streamline is shut
|
||||
/// down; nothing presents afterwards).
|
||||
pub(crate) fn drop_presenter(&self) {
|
||||
settle_now(WHY_SYNC);
|
||||
*self.presenter.lock().unwrap_or_else(|e| e.into_inner()) = None;
|
||||
}
|
||||
|
||||
fn presenter(
|
||||
&self,
|
||||
width: u32,
|
||||
@@ -9661,13 +9694,23 @@ impl Host {
|
||||
let swap_chain = match proxied {
|
||||
Some(Ok(swap_chain)) => {
|
||||
crate::streamline::swap_chain_made(true, None);
|
||||
// Frame generation must be off across a change between
|
||||
// windowed and full screen (Streamline's guide, 12.0):
|
||||
// the system's own Alt+Enter is not taken for this window.
|
||||
if let Ok(parent) = swap_chain.GetParent::<IDXGIFactory1>() {
|
||||
let _ = parent.MakeWindowAssociation(hwnd, DXGI_MWA_NO_ALT_ENTER);
|
||||
}
|
||||
swap_chain
|
||||
}
|
||||
Some(Err(e)) => {
|
||||
crate::streamline::swap_chain_made(false, Some(&e));
|
||||
factory.CreateSwapChainForHwnd(&self.queue, hwnd, &desc, None, None)?.cast::<IDXGISwapChain3>()?
|
||||
}
|
||||
None => factory.CreateSwapChainForHwnd(&self.queue, hwnd, &desc, None, None)?.cast::<IDXGISwapChain3>()?,
|
||||
// (`VICTORY_STREAMLINE_PRESENT=1`, DLSS without frame
|
||||
// generation: Streamline's proxy of it, for its present hook.)
|
||||
None => crate::streamline::present_hooked(
|
||||
factory.CreateSwapChainForHwnd(&self.queue, hwnd, &desc, None, None)?.cast::<IDXGISwapChain3>()?,
|
||||
),
|
||||
};
|
||||
let copy = self.new_list()?;
|
||||
copy.close();
|
||||
|
||||
Reference in new issue
Block a user