Skip to content

Commit 17522c8

Browse files
committed
fix requestAdapter test.
Sorry, the PR was old. Needed updating for the latest API
1 parent 5a5838d commit 17522c8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/webgpu/api/operation/adapter/requestAdapter.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ async function testAdapter(adapter: GPUAdapter | null) {
3434
assert(device !== null, 'Failed to get device.');
3535

3636
const kOffset = 1230000;
37-
const pipeline = await device.createComputePipeline({
37+
const pipeline = device.createComputePipeline({
38+
layout: 'auto',
3839
compute: {
3940
module: device.createShaderModule({
4041
code: `
41-
struct Buffer { data: array<u32>; };
42+
struct Buffer { data: array<u32>, };
4243
4344
@group(0) @binding(0) var<storage, read_write> buffer: Buffer;
44-
@stage(compute) @workgroup_size(1u) fn main(
45+
@compute @workgroup_size(1u) fn main(
4546
@builtin(global_invocation_id) id: vec3<u32>) {
4647
buffer.data[id.x] = id.x + ${kOffset}u;
4748
}

0 commit comments

Comments
 (0)