Expect a GPU fill of logged pages to gate the next copy in to its pages
`a_gpu_write_of_the_pages_reaches_the_device_copy` expected the copy in after a blit fill of rows
40 to 47 of a buffer over logged host pages to copy every row (one gated copy, one whole), as when
the log could not say which pages the GPU wrote. shadow-sync reports the runtime's own writes of
logged pages to their log after they ran (`dirty_pages.rs`), so the next copy in is gated to the
pages the fill wrote and none is whole. The test now expects that, and bounds the bytes copied to
the fill's rows and the pages they lie in; its texel checks (the fill reaches the read, rows 40 to 47
read 0x5a) are unchanged.
Verified: at d363fe79d2 on the RTX 5080 (b5080 entries in stack 33's gate and alone, 5 of 5) the
copy in was gated 1, whole 0, and every texel check passed; this commit's run follows on the 5080.
This commit is contained in:
1 parent
5b539542f3
commit
3b176b8bd4
1 file changed
+14
-4
@@ -356,16 +356,26 @@ fn a_gpu_write_of_the_pages_reaches_the_device_copy() {
|
||||
.all(|&byte| byte == 0x5a));
|
||||
let counted = copied(&start, &device.work_counts());
|
||||
eprintln!(
|
||||
"DEVICE-COPY on {}: after the fill gated {}, whole {}",
|
||||
"DEVICE-COPY on {}: after the fill gated {}, whole {}, bytes {}",
|
||||
device.name(),
|
||||
counted[1],
|
||||
counted[2]
|
||||
counted[2],
|
||||
counted[4]
|
||||
);
|
||||
if copies_on(&device) {
|
||||
// The runtime reports its own write of the pages to their log (`dirty_pages.rs`), so the
|
||||
// next copy in is gated to the pages the fill wrote: no whole copy, and at least the
|
||||
// fill's rows but no more than the pages they lie in.
|
||||
assert_eq!(
|
||||
counted[1..3],
|
||||
[1, 1],
|
||||
"the fill let go of the hold: every row"
|
||||
[1, 0],
|
||||
"the fill's pages, gated: no whole copy"
|
||||
);
|
||||
let fill = 8 * bpr;
|
||||
assert!(
|
||||
(fill..=fill + 2 * GUEST_PAGE as u64).contains(&counted[4]),
|
||||
"the fill's pages alone: bytes {}",
|
||||
counted[4]
|
||||
);
|
||||
}
|
||||
drop((texture, buffer, target));
|
||||
|
||||
Reference in new issue
Block a user