let isWebgpuSupported = false
try {
const adapter = await navigator?.gpu?.requestAdapter?.()
- isWebgpuSupported = (adapter instanceof GPUAdapter)
+ const device = await adapter?.requestDevice?.()
+ isWebgpuSupported = (adapter instanceof GPUAdapter && device instanceof GPUDevice)
} catch (err) {
console.warn('WebGPU is not supported in this environment.\n', err)
isWebgpuSupported = false
//! SPDX-License-Identifier: GPL-3.0-or-later
/**
-* Override console logging to provide an informative prefix for each entry and
-* to only output when debug mode is enabled.
-*/
+ * Override console logging to provide an informative prefix for each entry and
+ * to only output when debug mode is enabled.
+ */
export class Logger {
isEnabled: boolean = false
groups: { [key: string]: boolean } = {}