Skip to content

Commit 9c1016b

Browse files
committed
Fix limits tests with new extra limits
The code was not checking if the limits actually exist. If they don't then the test would fail. Since these limits have not been added to the spec, they're still being discussed, they are not required and therefore the tests should still run without them.
1 parent b5532d4 commit 9c1016b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/webgpu/api/validation/capability_checks/limits/limit_utils.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,12 @@ export class LimitTestsImpl extends GPUTestBase {
417417
if (extraLimits) {
418418
for (const [extraLimitStr, limitMode] of Object.entries(extraLimits)) {
419419
const extraLimit = extraLimitStr as GPUSupportedLimit;
420-
requiredLimits[extraLimit] =
421-
limitMode === 'defaultLimit'
422-
? getDefaultLimitForAdapter(adapter, extraLimit)
423-
: (adapter.limits[extraLimit] as number);
420+
if (adapter.limits[extraLimit] !== undefined) {
421+
requiredLimits[extraLimit] =
422+
limitMode === 'defaultLimit'
423+
? getDefaultLimitForAdapter(adapter, extraLimit)
424+
: (adapter.limits[extraLimit] as number);
425+
}
424426
}
425427
}
426428

0 commit comments

Comments
 (0)