The first room renders right: byte-copied descriptor records are mirrored, views off their copy's elements get their own bytes, card room for the first world frame, levels on demand run on the card
- Descriptor records the title copies into its heap as bytes are mirrored before each submission (pull request #305 by Flyander, after upstream VIctory 86a5ed6), with a per-slot fingerprint so only records that changed are mirrored, the page read through the kernel, a switch (VICTORY_HEAP_SYNC=0) and a counter: about 40,000 records a frame on the test machine. - A buffer view off its copy's elements gets a copy of its own bytes (after upstream 86a5ed6; VICTORY_VIEW_OWN_COPY=0: refused as before). - Room on the card for the world's first-frame bursts: buffer copies (VICTORY_CARD_ROOM_FOR_BUFFERS, now on) and render targets (VICTORY_CARD_ROOM_FOR_TARGETS_MB, 3,072); a copy turned down gives its room up and is logged; the texture pass asks again every 32 MiB. 98 buffer copies made (945 MB) where earlier runs made 1; 25 MB compared on the processor a frame where it was 550 to 710. - Levels on demand: the fixes of pull request #747 by AscilCH. First run on a card (RTX 4070, VICTORY_LEVELS_ON_DEMAND=1): no device loss, 3.1 GB not allocated for levels the title does not hold. Still off by default. - The guarded blocks under storage writes into physical pages are opened by default (VICTORY_PAGE_WRITES=0: counted only). - Shaders: a program is translated with first-half interpolation pairs only if it was refused for one (with it on for every program 8,551 working pixel programs came out changed); parked lane-mask pairs, f64 conversions and sums, lane permutations: 14 more programs translate. - Counted, not fixed: an indirect compute pass asks for about 77,500 groups in x and is cut to 65,535. One five-minute game run of these changes on the test machine: no device loss, no failed request. This merged tree was built; its test suites were not run. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
8dd30ab472
commit
a26859fc5f
13 files changed
+1188
-58
No files matched your search
@@ -1270,6 +1270,11 @@ pub(crate) fn dred_on() -> bool {
|
||||
/// budget buffers, a run late).
|
||||
static MESH_GROUPS: [std::sync::atomic::AtomicU64; 2] = [const { std::sync::atomic::AtomicU64::new(0) }; 2];
|
||||
|
||||
/// Since the last frame line: the largest group count in x an indirect
|
||||
/// compute record asked for, and the records that asked for more than the
|
||||
/// 65,535 one dispatch runs (cut to that: the groups past it do not run).
|
||||
static COMPUTE_GROUPS: [std::sync::atomic::AtomicU64; 2] = [const { std::sync::atomic::AtomicU64::new(0) }; 2];
|
||||
|
||||
/// Whether each list of a submission runs and is timed on its own, slow
|
||||
/// ones logged with their commands (`VICTORY_GPU_TIMING`, diagnostics
|
||||
/// builds; the commands are noted with `VICTORY_D3D12_DRED` on).
|
||||
@@ -3990,6 +3995,9 @@ impl Host {
|
||||
self.settle(&mut submitted, why);
|
||||
}
|
||||
}
|
||||
// Descriptors the title copied into placed heaps directly, before
|
||||
// command lists that index those slots are submitted.
|
||||
crate::descriptor::sync_heaps();
|
||||
let behind = late && flying();
|
||||
// Before this submission counts as started: what the sweep lets go
|
||||
// of is named by no list, and nothing runs now (behind flights the
|
||||
@@ -5116,7 +5124,12 @@ impl HostList {
|
||||
let (largest, all) = (words.add(1).read_volatile(), words.add(2).read_volatile());
|
||||
MESH_GROUPS[0].fetch_max(u64::from(largest), Ordering::Relaxed);
|
||||
MESH_GROUPS[1].fetch_add(u64::from(all), Ordering::Relaxed);
|
||||
for k in 0..3 {
|
||||
// And of its indirect compute records: the largest x asked
|
||||
// for, and how many asked for more than a dispatch runs.
|
||||
let (widest, cut) = (words.add(3).read_volatile(), words.add(4).read_volatile());
|
||||
COMPUTE_GROUPS[0].fetch_max(u64::from(widest), Ordering::Relaxed);
|
||||
COMPUTE_GROUPS[1].fetch_add(u64::from(cut), Ordering::Relaxed);
|
||||
for k in 0..5 {
|
||||
words.add(k).write_volatile(0);
|
||||
}
|
||||
})));
|
||||
@@ -5799,6 +5812,13 @@ impl Meter {
|
||||
tracing::info!(
|
||||
"indirect mesh dispatches: the largest group count asked for {mesh_largest} (run: at most 65535), {mesh_groups:.0} groups asked per frame"
|
||||
);
|
||||
let compute_widest = COMPUTE_GROUPS[0].swap(0, Ordering::Relaxed);
|
||||
let compute_cut = COMPUTE_GROUPS[1].swap(0, Ordering::Relaxed) as f64 / frames;
|
||||
tracing::info!(
|
||||
"indirect compute dispatches: the largest group count in x asked for {compute_widest} (run: at most 65535), {compute_cut:.1} records per frame asked for more and were cut to that"
|
||||
);
|
||||
crate::shadow::exact_line(frames);
|
||||
crate::descriptor::sync_line(frames);
|
||||
late_line(frames);
|
||||
card_clock_line(frames, ms);
|
||||
crate::shadow::back_line(frames);
|
||||
@@ -5892,7 +5912,7 @@ impl Meter {
|
||||
let [kept, dropped, slots, uploaded] =
|
||||
[0, 1, 2, 3].map(|i| crate::descriptor::host::PAGE_WRITES[i].load(Ordering::Relaxed));
|
||||
tracing::info!(
|
||||
"writes behind the guards, since the start: {writes} DirectStorage writes into physical pages at addresses the title had mapped ({} MB); {guarded} guarded 64 KiB blocks of host copies lay under them ({}); {plain} reads to plain addresses finished ({}); {kept} ranges under texture views kept for the texture pass ({dropped} dropped); {slots} slots of placed textures held their bytes, {uploaded} of them uploaded before the write ({}) (VICTORY_PAGE_WRITES: unset counts, 1 acts, guards, slots, all)",
|
||||
"writes behind the guards, since the start: {writes} DirectStorage writes into physical pages at addresses the title had mapped ({} MB); {guarded} guarded 64 KiB blocks of host copies lay under them ({}); {plain} reads to plain addresses finished ({}); {kept} ranges under texture views kept for the texture pass ({dropped} dropped); {slots} slots of placed textures held their bytes, {uploaded} of them uploaded before the write ({}) (VICTORY_PAGE_WRITES: unset or guards opens the guarded blocks, 0 counts only, 1, slots, all)",
|
||||
bytes >> 20,
|
||||
if mode & 1 != 0 { "opened, taken again" } else { "left as they were" },
|
||||
if mode & 4 != 0 { "told as well" } else { "counted only" },
|
||||
|
||||
Reference in new issue
Block a user