Title buffer copies stand where the list has them (VICTORY_COPIES_IN_PLACE)

On by default. They were all done on the CPU when their submission was
prepared, ahead of its first draw: of copy, draw, copy, draw both draws read
the second, and a source a shader writes earlier in the submission was read as
it was before. The list copies now, in the destination's host copy, out of the
source's host copy where shaders write it, else out of upload memory filled at
submission; copies into textures take what shaders wrote too. Title memory and
the reference of the host copy take the bytes at submission as before, so the
landing finds only what the card made of them.

VICTORY_WINDOWS_OWN=1 (off): windows have two sides as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 00:29:19 -06:00
1 parent 47ae1737c2
commit 350f7f492b
7 files changed
+738 -23

No files matched your search

+12
View File
@@ -194,6 +194,8 @@ enum Does {
Read { from: usize, to: usize, asked: bool },
/// A refresh of a host copy (named by its address).
Refresh { shadow: usize, from: usize, to: usize },
/// A copy that its list does on the card ([`place`]).
Placed { dst: usize, src: usize, len: usize },
/// Anything, anywhere.
Run,
}
@@ -271,6 +273,15 @@ fn plan(does: &[Does], stage: u32) -> Result<Vec<(usize, u32)>, &'static str> {
}
}
}
// A copy at its place in a list comes after what is done in front of all
// of them.
for d in does {
if let Does::Placed { dst, src, len } = *d
&& (touched(&read, (dst, dst + len)) || touched(&written, (dst, dst + len)) || touched(&written, (src, src + len)))
{
return Err("a copy at its place in a list writes what it reads, or reads or writes what it writes");
}
}
let order: Vec<usize> = (0..does.len()).filter(|&i| taken[i]).collect();
// What stays on the CPU and reads what an earlier taken copy writes
// would read it too early.
@@ -572,6 +583,7 @@ impl Host {
to: *at + *len,
},
Step::Run(_) => Does::Run,
Step::Placed(p) => Does::Placed { dst: p.dst, src: p.src, len: p.len },
Step::GpuWrite(..) | Step::Host(..) => continue,
});
steps.push((std::ptr::from_ref::<HostList>(list) as usize, i));