Staging lane: a burst's batch waits for its staging submission at most once, not at least once
runtime_lane::staging_batches::a_burst_of_new_textures_makes_no_staging_submission failed on the
RTX 5080 in development's round at eb12d740d4 (b5080 m2v-orch-dv-ln01-211042): 600 new textures
queued their moves for the staging queue, the command buffer's batch carried them in one staging
submission (staging 1, flushes 1), and no batch waited for it (gpu_waits 0), where the test asked
for at least one. The runtime is right there, as 0afcab090b found for the batches lane: a batch
waits on the GPU for the staging queue's last submission only while the host has not seen it
complete (Device::staging_wait), and the 5080's copy engine ends 600 small textures' zeros before
the scheduler's thread checks that wait.
Both burst tests (replace_region bursts and new-texture bursts) now assert the bound alone (at
most 1 + internal submissions) through one helper, and print where the batch did not wait. The
wait itself stays proved by tests::staging_waits in the runtime, which holds the staging
submission on the GPU until the batches were submitted. Test-only.
(cherry picked from commit a4a6ae92fc4964f8947d6e1de3ee8f40287a6224)
This commit is contained in:
1 parent
cd399faca5
commit
8c161ef193
1 file changed
+23
-8
@@ -204,10 +204,7 @@ fn a_burst_of_replace_regions_shares_one_staging_submission() {
|
||||
(1, 1),
|
||||
"{name}: the command buffer's batch carried the burst in one staging submission"
|
||||
);
|
||||
assert!(
|
||||
read.gpu_waits >= 1,
|
||||
"{name}: the batch waited for the staging submission on the GPU"
|
||||
);
|
||||
staging_waits_bounded(&name, &read);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -639,14 +636,32 @@ fn a_burst_of_new_textures_makes_no_staging_submission() {
|
||||
(1, 1),
|
||||
"{name}: the command buffer's batch carried the 600 in one staging submission"
|
||||
);
|
||||
assert!(
|
||||
read.gpu_waits >= 1,
|
||||
"{name}: the batch waited for the staging submission on the GPU"
|
||||
);
|
||||
staging_waits_bounded(&name, &read);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// The batch that carried a burst's one staging submission waited for it on the GPU at most
|
||||
/// once, and only while the host had not seen it complete (`Device::staging_wait` in the
|
||||
/// runtime): a staging submission the copy engine ends before the scheduler's thread checks its
|
||||
/// wait needs none, which a fast device or a loaded host shows (the RTX 5080: 600 new textures'
|
||||
/// zeros). The wait itself is proved apart, with the staging submission held on the GPU until
|
||||
/// the batches were submitted (`tests::staging_waits` in the runtime).
|
||||
fn staging_waits_bounded(name: &str, read: &Path) {
|
||||
assert!(
|
||||
read.gpu_waits <= 1 + read.internal,
|
||||
"{name}: the batch waited for the staging submission on the GPU at most once (internal \
|
||||
submissions wait for it themselves): {} waits",
|
||||
read.gpu_waits
|
||||
);
|
||||
if read.gpu_waits == 0 {
|
||||
println!(
|
||||
"STAGING-BATCH {name}: the host saw the staging submission complete before the batch \
|
||||
was submitted; it did not wait for it"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// A new texture's first write lands after its zeros, whichever first reads it: a
|
||||
/// `replace_region` of part of it read back by `get_bytes` and by a later command buffer's blit,
|
||||
/// and a later command buffer's blit into part of it read back by `get_bytes`, each read zero
|
||||
|
||||
Reference in new issue
Block a user