Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / webgpu / mochitest / test_submit_compute_empty.html
blob4f20a0657e27826d277ab2af12bcc76eda9da7c7
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8" />
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
7 </head>
8 <body>
9 <script>
10 ok(
11 SpecialPowers.getBoolPref("dom.webgpu.enabled"),
12 "Pref should be enabled."
15 const func = async function () {
16 const adapter = await navigator.gpu.requestAdapter();
17 const device = await adapter.requestDevice();
18 const encoder = device.createCommandEncoder();
19 const pass = encoder.beginComputePass();
20 pass.end();
21 const command_buffer = encoder.finish();
22 device.queue.submit([command_buffer]);
23 ok(command_buffer !== undefined, "command_buffer !== undefined");
26 SimpleTest.waitForExplicitFinish();
27 func()
28 .catch(e => ok(false, "Unhandled exception " + e))
29 .finally(() => SimpleTest.finish());
30 </script>
31 </body>
32 </html>