fix(gpu): submit buffer comparisons after state decay
Submit the comparison list separately before signaling the fence so implicitly promoted title buffers can decay to COMMON. This fixes D3D12 error 538.
This commit is contained in:
1 parent
033be27f33
commit
d1fe0bd015
1 file changed
+11
-5
@@ -5649,9 +5649,10 @@ impl Host {
|
||||
for (shadow, at, bytes) in batch.placed.drain(..) {
|
||||
shadow.placed_copy(at, &bytes);
|
||||
}
|
||||
if let Some(check) = card.as_ref().and_then(|c| c.check.clone()) {
|
||||
lists.push(Some(check));
|
||||
}
|
||||
// A title list can leave a buffer promoted to COPY_DEST. Buffers
|
||||
// decay to COMMON between ExecuteCommandLists calls, so submit
|
||||
// the compare separately before signalling this submission's fence.
|
||||
let check = card.as_ref().and_then(|c| c.check.clone()).map(|list| [Some(list)]);
|
||||
#[cfg(feature = "diagnostics")]
|
||||
split.part(4);
|
||||
stage.next("submit: waiting for the heaps' records");
|
||||
@@ -5690,6 +5691,9 @@ impl Host {
|
||||
self.queue.ExecuteCommandLists(&lists[from..to]);
|
||||
from = to;
|
||||
}
|
||||
if let Some(check) = &check {
|
||||
self.queue.ExecuteCommandLists(check);
|
||||
}
|
||||
self.queue.Signal(&self.fence, *submitted)
|
||||
};
|
||||
awake::sent(&self.device);
|
||||
@@ -5743,6 +5747,9 @@ impl Host {
|
||||
// SAFETY: closed lists; the fence and event are ours.
|
||||
unsafe {
|
||||
self.queue.ExecuteCommandLists(group);
|
||||
if i + 1 == groups.len() && let Some(check) = &check {
|
||||
self.queue.ExecuteCommandLists(check);
|
||||
}
|
||||
self.card_sent();
|
||||
let waited = self
|
||||
.queue
|
||||
@@ -5762,8 +5769,7 @@ impl Host {
|
||||
Err(e) => tracing::warn!(error = %e, "host submission not waited for"),
|
||||
}
|
||||
}
|
||||
// With timing on each group is one of `runs` (and the compare
|
||||
// of copies in the card's memory, with the last): every
|
||||
// With timing on each group is one of `runs`: every
|
||||
// command's time on the card goes to the sums by pipeline.
|
||||
#[cfg(feature = "diagnostics")]
|
||||
if timing() {
|
||||
|
||||
Reference in new issue
Block a user