Skip to content

Commit

Permalink
don't call drain_transitions() of we drop the results
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Jul 4, 2024
1 parent 429ef55 commit 672d6bb
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions wgpu-core/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,14 +609,13 @@ impl<A: HalApi> Buffer<A> {
};
}

let snatch_guard = device.snatchable_lock.read();
{
let mut trackers = device.as_ref().trackers.lock();
trackers.buffers.set_single(self, internal_use);
//TODO: Check if draining ALL buffers is correct!
let _ = trackers.buffers.drain_transitions(&snatch_guard);
}
drop(snatch_guard);
// TODO: we are ignoring the transition here, I think we need to add a barrier
// at the end of the submission
device
.trackers
.lock()
.buffers
.set_single(self, internal_use);

device.lock_life().map(self);

Expand Down

0 comments on commit 672d6bb

Please sign in to comment.