aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/webgpu/framework/gpu/implementation.js
blob: 726eeab4eed644d4b5c4e0693e2462dbf1a08c5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
**/

/// <reference types="@webgpu/types" />
let impl = undefined;
export function getGPU() {
  if (impl) {
    return impl;
  }

  if (typeof navigator === 'undefined' || navigator.gpu === undefined) {
    throw new Error('No WebGPU implementation found');
  }

  impl = navigator.gpu;
  return impl;
}
//# sourceMappingURL=implementation.js.map