Skip to content

Commit

Permalink
Fixes flaky test because parameters were changed when the test was ran.
Browse files Browse the repository at this point in the history
  • Loading branch information
lokokung committed Oct 25, 2023
1 parent e5e7ee1 commit b7154a2
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 b7154a2

Please sign in to comment.