Avoid moving the Atlas into on_submitted_work_done

This commit is contained in:
Héctor Ramón Jiménez 2025-10-24 17:40:30 +02:00
parent cb8d2710da
commit 47a3fc0b9a
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -205,6 +205,7 @@ impl Cache {
}
}
#[cfg(feature = "image")]
impl Drop for Cache {
fn drop(&mut self) {
// Stop worker gracefully
@ -389,11 +390,13 @@ impl Worker {
let submission = self.queue.submit([encoder.finish()]);
self.belt.recall();
let bind_group = atlas.bind_group().clone();
self.queue.on_submitted_work_done(move || {
let _ = output.send(Work::Upload {
handle,
entry,
bind_group: atlas.bind_group().clone(),
bind_group,
});
callback(&shell);