From 0973e612a56521a891ed8a3dca00df5b0e314199 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Wed, 3 Jan 2024 13:34:44 -0800 Subject: [PATCH] Compat: make atomicCOmpareExchangeWeak tests handle limits --- .../builtin/atomics/atomicCompareExchangeWeak.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/webgpu/shader/execution/expression/call/builtin/atomics/atomicCompareExchangeWeak.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/atomics/atomicCompareExchangeWeak.spec.ts index 2556bb744ba9..85cc5cce4dec 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/atomics/atomicCompareExchangeWeak.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/atomics/atomicCompareExchangeWeak.spec.ts @@ -339,6 +339,11 @@ struct __atomic_compare_exchange_result { const numInvocations = t.params.workgroupSize; const scalarType = t.params.scalarType; + t.skipIf( + numInvocations > t.device.limits.maxComputeWorkgroupSizeX, + `${numInvocations} > maxComputeWorkgroupSizeX(${t.device.limits.maxComputeWorkgroupSizeX})` + ); + // Number of times each workgroup attempts to exchange the same value to the same memory address const numWrites = 4; @@ -556,6 +561,11 @@ struct __atomic_compare_exchange_result { const numInvocations = t.params.workgroupSize; const scalarType = t.params.scalarType; + t.skipIf( + numInvocations > t.device.limits.maxComputeWorkgroupSizeX, + `${numInvocations} > maxComputeWorkgroupSizeX(${t.device.limits.maxComputeWorkgroupSizeX})` + ); + // Number of times each workgroup attempts to exchange the same value to the same memory address const numWrites = 4;