You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reuse device handle in emscripten_webgpu_get_device (#18082)
Currently, this function creates a new wrapper each time it's called. As
a result, what is a single device in JavaScript looks like different
devices in C (the handles are different), and there is a new entry in
WebGPU.mgrDevice for each call.
With this change, the same handle is returned each time.
Note that each new device wrapper currently also leaks a queue wrapper
(see the comment at
<https://github.com/emscripten-core/emscripten/blob/0c4fba0371abc8c7219dc481a02ea4a464b14641/src/library_webgpu.js#L190>),
so this change also reduces the impact of that issue.
0 commit comments