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