The title's write-combined memory (protection 0x400: 2.2 and 3.2 GB, 0x2404) is what its CPU writes and does not read. Of the gameplay frame's compares (coolfox-20261126-184458) seven of the eight largest ranges, about 360 of 730 MB a frame, lie in it, and 36 MB a frame of it was fetched and merged into title memory. - xmem notes write-combined regions (forgotten when freed or decommitted), `victory_gpu::title_memory_write_combined`. - VICTORY_WC_NO_BACK=1: a copy with two sides of write-combined memory has no write-back: no hashes, compare, fetch or merge; what shaders write stays on the card. Refreshes still send whole pages. - VICTORY_WC_BAR=1: a write-combined title buffer gets one copy in card memory the CPU maps (GPU upload heap, resizable BAR): refreshes write it through the bus, nothing is sent, no CPU side, no write-back. Counted with the card sides of copies (card_limits) and made while a fifth of the budget is free. Both off by default. Risks (shadow.rs, wc_no_back): the title's CPU reading what shaders wrote there reads older bytes; a page the title writes goes up whole and takes back what shaders wrote in the same 4 KiB page; another host copy of the same bytes does not see shader writes. The frame line says how many MB of declared writes were left on the card. Test: the registry of write-combined regions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
122 lines
3.1 KiB
Rust
122 lines
3.1 KiB
Rust
//! D3D12.X on host D3D12.
|
|
//!
|
|
//! D3D12.X records commands from code inlined into the title, which writes
|
|
//! packets into the command list while its put pointer is below a limit and
|
|
//! calls the list's method otherwise. Our lists keep the limits at zero, so
|
|
//! every command arrives here as a call, to be run on host D3D12. The
|
|
//! title's GPU addresses are CPU addresses (console memory is unified).
|
|
//!
|
|
//! [`device`] is the device object titles create, [`dxgi`] its adapter side,
|
|
//! [`resource`] heaps and resources, [`fence`] fences, [`queue`] command
|
|
//! queues, [`list`] command allocators and lists, [`descriptor`]
|
|
//! descriptor heaps, [`root`] root signatures, [`query`] query heaps,
|
|
//! [`signature`] command signatures, [`pipeline`] pipeline states,
|
|
//! [`frame`] frame pacing, [`object`] what all console graphics objects
|
|
//! share, [`console`] which console model the title sees. Planned:
|
|
//! `present` (swap chain).
|
|
|
|
#[cfg(windows)]
|
|
mod ambient;
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
mod capture;
|
|
#[cfg(windows)]
|
|
mod compose;
|
|
pub mod console;
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
mod copystat;
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
mod faultbook;
|
|
#[cfg(windows)]
|
|
mod cores;
|
|
pub mod descriptor;
|
|
pub mod device;
|
|
#[cfg(windows)]
|
|
mod draw;
|
|
pub mod dxgi;
|
|
pub mod fence;
|
|
pub mod frame;
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
mod book;
|
|
#[cfg(windows)]
|
|
mod host;
|
|
#[cfg(windows)]
|
|
mod indirect;
|
|
#[cfg(windows)]
|
|
mod inplace;
|
|
#[cfg(windows)]
|
|
mod land;
|
|
pub mod list;
|
|
pub mod object;
|
|
pub mod pipeline;
|
|
#[cfg(windows)]
|
|
mod picked;
|
|
#[cfg(windows)]
|
|
mod pool;
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
mod popwatch;
|
|
#[cfg(windows)]
|
|
mod primitive;
|
|
pub mod query;
|
|
pub mod queue;
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
pub mod replay;
|
|
#[cfg(windows)]
|
|
mod residency;
|
|
pub mod resource;
|
|
pub mod root;
|
|
#[cfg(windows)]
|
|
mod safecopy;
|
|
#[cfg(windows)]
|
|
mod sampler;
|
|
#[cfg(windows)]
|
|
pub mod shader_cache;
|
|
#[cfg(windows)]
|
|
mod memory;
|
|
#[cfg(windows)]
|
|
mod shadow;
|
|
#[cfg(windows)]
|
|
mod tiles;
|
|
pub mod signature;
|
|
mod switch;
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
mod ab;
|
|
#[cfg(windows)]
|
|
mod tdr;
|
|
#[cfg(windows)]
|
|
mod texture;
|
|
pub mod timeline;
|
|
#[cfg(windows)]
|
|
pub mod titlewrite;
|
|
#[cfg(windows)]
|
|
mod upload;
|
|
#[cfg(windows)]
|
|
mod watch;
|
|
#[cfg(windows)]
|
|
mod texback;
|
|
|
|
#[cfg(windows)]
|
|
pub use host::on_failure;
|
|
|
|
/// Whether `switch` is on now, if it is one of those `VICTORY_AB` turns on and
|
|
/// off while the title runs (`ab`).
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
pub fn switched(switch: &str) -> Option<bool> {
|
|
ab::pick(switch)
|
|
}
|
|
|
|
/// What the frame is at (`copystat::phase`), for the sampling profiler.
|
|
#[cfg(all(windows, feature = "diagnostics"))]
|
|
pub fn frame_phase() -> u32 {
|
|
copystat::phase()
|
|
}
|
|
#[cfg(windows)]
|
|
pub use inplace::{title_memory_freeing, title_memory_section, title_memory_section_gone, title_memory_view};
|
|
#[cfg(windows)]
|
|
pub use shadow::title_memory_write_combined;
|
|
#[cfg(windows)]
|
|
pub use watch::{
|
|
kernel_writing, title_memory_allocated, title_memory_freed, title_memory_reading, title_memory_remapped,
|
|
title_memory_remapping, title_memory_splitting, title_memory_unmapping, title_memory_written,
|
|
writing as kernel_will_write,
|
|
};
|