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:
parent
7bb877bd55
commit
134c2019b1
2 changed files with 5 additions and 2 deletions
|
|
@ -902,7 +902,7 @@ const queue_vtable = Queue.VTable{
|
|||
wgpu_queue,
|
||||
signal_value,
|
||||
cCallback,
|
||||
&queue.on_submitted_work_done,
|
||||
queue.on_submitted_work_done,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue