A write through one view of a page is seen at its other views; page writes counted; levels on demand (off); warm-up; card memory numbers

Memory sync:
- The guard over every view of a physical page (code by myokex, victory-amd
  c6dc4d8, after pull request #115 by Spexivus, its correction by joroyt and
  a part of VIctory #1122 by tightfall): the title shows one page at several
  addresses and a copy was guarded at one only. 0.8 to 1.0 million writes
  through another view in a five-minute run on the test machine.
  VICTORY_VIEW_GUARD=0 turns it off.
- Kernel reads into title memory are read beside and copied in (Joshua Odom,
  10ea38e).
- Writes of the storage layer into physical pages are counted where the
  title has the pages mapped and can open the guards there
  (VICTORY_PAGE_WRITES, off: counted only). Failed page-destination reads
  are retried.

Card memory:
- Levels on demand, off unless VICTORY_LEVELS_ON_DEMAND=1: a texture the
  title fills takes card memory for the levels the title holds; held levels
  get memory only while the card has room and are asked for again. Its test
  runs on the software adapter; not run on a card yet.
- Refused texture slots are held back so a pass reaches the slots behind
  them; room can be kept for card copies of title buffers (off).

Tools: translate --warm all; the shader cache is keyed on the translator's
source; counters for copy-back races, page writes and the copies the
texture sweep never lets go; a walls trace.

Game runs of these changes on an RTX 4070: five five-minute runs without a
device loss or a failed request. This merged tree was built; its test
suites were run on the tree the changes come from (gpu 129, hle 97).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
fxcelessandClaude Fable 5.2 committed 2026-11-25 00:44:25 -05:00
1 parent 310c6eb6c1
commit 8dd30ab472
25 files changed
+4218 -240

No files matched your search

+10
View File
@@ -861,6 +861,9 @@ extern "system" fn copy_resource(this: This, dst: This, src: This) {
// Depth textures shaders also write: what they wrote, first.
list.twin_use(dst, false, true);
list.twin_use(src, false, false);
// A destination made level by level gets its levels' memory
// ahead of this list (`crate::tiles`).
crate::texture::card_writes(list, dst, to, None);
ensure_state(list, dst, COPY_DEST);
ensure_state(list, src, COPY_SOURCE);
crate::texture::host_written(dst);
@@ -994,6 +997,11 @@ extern "system" fn copy_texture_region(
// A depth texture shaders also write: what they wrote, first (the
// source above too).
list.twin_use(dst.resource, false, true);
// A destination made level by level gets the level's memory ahead
// of this list (`crate::tiles`): the title's bake copies each level
// of its result into a block-compressed texture of that kind, and
// a copy into a level without memory is dropped.
crate::texture::card_writes(list, dst.resource, to, Some(dst.footprint.offset as u32));
ensure_state(list, dst.resource, COPY_DEST);
crate::texture::host_written(dst.resource);
let mut to_location = dst;
@@ -1147,6 +1155,8 @@ extern "system" fn resolve(
// Depth textures shaders also write: what they wrote, first.
list.twin_use(dst, false, true);
list.twin_use(src, false, false);
// As for a copy (`crate::tiles`).
crate::texture::card_writes(list, dst, to, Some(dst_sub));
ensure_state(list, dst, RESOLVE_DEST);
ensure_state(list, src, RESOLVE_SOURCE);
crate::texture::host_written(dst);