blob: a45002835df48518eacb8d7887791ee200c3e3c1 [file] [log] [blame]
/**
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
**/ import { assert } from '../../../common/framework/util/util.js';
export async function runRefTest(fn) {
assert(
typeof navigator !== 'undefined' && navigator.gpu !== undefined,
'No WebGPU implementation found'
);
const adapter = await navigator.gpu.requestAdapter();
assert(adapter !== null);
const device = await adapter.requestDevice();
assert(device !== null);
const queue = device.defaultQueue;
await fn({ device, queue });
takeScreenshotDelayed(50);
}