mgpuGetOwnDeviceObject function
Resolves minigpu's own device. Never uses the host-page gpuDevice global.
Implementation
JSObject? mgpuGetOwnDeviceObject() {
if (!isMinigpuModuleLoaded ||
!_hasMinigpuExport('_mgpuGetWGPUDeviceHandle')) return null;
try {
return getWebGpuJsObject(mgpuGetWGPUDeviceHandle());
} catch (_) {
return null;
}
}