We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3aeba35 commit 2ed2de7Copy full SHA for 2ed2de7
test/index.js
@@ -1,5 +1,6 @@
1
/* global mocha */
2
3
+import './tests/gpu-info.js';
4
import './tests/attribute-buffer-tests.js';
5
import './tests/framebuffer-tests.js';
6
import './tests/helper-tests.js';
test/tests/gpu-info.js
@@ -0,0 +1,14 @@
+import {describe, it} from '../mocha-support.js';
+
+function getGPUInfo(gl, ext) {
+ return ext
+ ? ['UNMASKED_VENDOR_WEBGL', 'UNMASKED_RENDERER_WEBGL'].map(pname => `${pname}: ${gl.getParameter(ext[pname])}`).join(',\n')
+ : 'unavailable';
7
+}
8
9
+describe('gpu info', () => {
10
+ const gl = new OffscreenCanvas(1, 1).getContext('webgl2');
11
+ const ext = gl.getExtension('WEBGL_debug_renderer_info');
12
+ const title = getGPUInfo(gl, ext);
13
+ it(title, () => {});
14
+});
0 commit comments