Skip to content

Commit

Permalink
Fixes flaky test because parameters were changed when the test was ra…
Browse files Browse the repository at this point in the history
…n. (#3096)
  • Loading branch information
lokokung authored Oct 25, 2023
1 parent 2be0e90 commit e5f120e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/webgpu/api/validation/compute_pipeline.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Tests calling createComputePipeline(Async) validation for compute workgroup_size
[1, 1, 63],
[1, 1, 64],
[1, 1, 65],
])
] as const)
)
.fn(t => {
const { isAsync, size } = t.params;
Expand All @@ -251,13 +251,14 @@ Tests calling createComputePipeline(Async) validation for compute workgroup_size
},
};

size[1] = size[1] ?? 1;
size[2] = size[2] ?? 1;
const workgroupX = size[0];
const workgroupY = size[1] ?? 1;
const workgroupZ = size[2] ?? 1;

const _success =
size[0] <= t.device.limits.maxComputeWorkgroupSizeX &&
size[1] <= t.device.limits.maxComputeWorkgroupSizeY &&
size[2] <= t.device.limits.maxComputeWorkgroupSizeZ;
workgroupX <= t.device.limits.maxComputeWorkgroupSizeX &&
workgroupY <= t.device.limits.maxComputeWorkgroupSizeY &&
workgroupZ <= t.device.limits.maxComputeWorkgroupSizeZ;
t.doCreateComputePipelineTest(isAsync, _success, descriptor);
});

Expand Down

0 comments on commit e5f120e

Please sign in to comment.