From b7154a201d3b8c8ebbe9e1996812f1c2420acd14 Mon Sep 17 00:00:00 2001 From: Loko Kung Date: Wed, 25 Oct 2023 15:09:44 -0700 Subject: [PATCH] Fixes flaky test because parameters were changed when the test was ran. --- src/webgpu/api/validation/compute_pipeline.spec.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/webgpu/api/validation/compute_pipeline.spec.ts b/src/webgpu/api/validation/compute_pipeline.spec.ts index c552fed50af8..3a0a51b363c6 100644 --- a/src/webgpu/api/validation/compute_pipeline.spec.ts +++ b/src/webgpu/api/validation/compute_pipeline.spec.ts @@ -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; @@ -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); });