diff --git a/test/index.js b/test/index.js index 4fb5ee2f..6689dc48 100644 --- a/test/index.js +++ b/test/index.js @@ -1,5 +1,6 @@ /* global mocha */ +import './tests/gpu-info.js'; import './tests/attribute-buffer-tests.js'; import './tests/framebuffer-tests.js'; import './tests/helper-tests.js'; diff --git a/test/tests/gpu-info.js b/test/tests/gpu-info.js new file mode 100644 index 00000000..a98ac0a9 --- /dev/null +++ b/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'; +} + +describe('gpu info', () => { + const gl = new OffscreenCanvas(1, 1).getContext('webgl2'); + const ext = gl.getExtension('WEBGL_debug_renderer_info'); + const title = getGPUInfo(gl, ext); + it(title, () => {}); +});