gpu: remove Queue.WorkDownCallback lifetime footgun

The previous implementation required the specific Queue struct that
submit() was called on to be valid when the callback is triggered. By
storing a pointer instead, the Queue does not need to be valid, only the
callback itself.
This commit is contained in:
dweiller 2022-06-23 14:10:32 +10:00 committed by Stephen Gutekanst
parent 7bb877bd55
commit 134c2019b1
2 changed files with 5 additions and 2 deletions

View file

@ -902,7 +902,7 @@ const queue_vtable = Queue.VTable{
wgpu_queue,
signal_value,
cCallback,
&queue.on_submitted_work_done,
queue.on_submitted_work_done,
);
}