gfx-rs / wgpu-native

Native WebGPU implementation based on wgpu-core
Apache License 2.0
843 stars 96 forks source link

workaround queue references on single QueueId #357

Closed rajveermalviya closed 7 months ago

rajveermalviya commented 7 months ago

Previously, we created a WGPUQueueImpl from the same queue_id that was created when requesting device, this behavior resulted in a bug where any call to wgpuQueueRelease would drop the queue_id, making the ref-counting useless.

This PR fixes it by instead storing an Arc of QueueId in WGPUQueueImpl, allowing us to correctly provide the ref-counting over the single queue_id we get during device initialization.

Fixes #356

Testing

Ran the repro code in the mentioned issue.