diff options
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/error_scope.spec.ts')
-rw-r--r-- | dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/error_scope.spec.ts | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/error_scope.spec.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/error_scope.spec.ts index cb5581fed6..8a8369dc3b 100644 --- a/dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/error_scope.spec.ts +++ b/dom/webgpu/tests/cts/checkout/src/webgpu/api/validation/error_scope.spec.ts @@ -26,7 +26,17 @@ class ErrorScopeTests extends Fixture { const gpu = getGPU(this.rec); const adapter = await gpu.requestAdapter(); assert(adapter !== null); - const device = await adapter.requestDevice(); + + // We need to max out the adapter limits related to texture dimensions to more reliably cause an + // OOM error when asked for it, so set that on the device now. + const device = this.trackForCleanup( + await adapter.requestDevice({ + requiredLimits: { + maxTextureDimension2D: adapter.limits.maxTextureDimension2D, + maxTextureArrayLayers: adapter.limits.maxTextureArrayLayers, + }, + }) + ); assert(device !== null); this._device = device; } @@ -146,7 +156,7 @@ Tests that popping an empty error scope stack should reject. ) .fn(t => { const promise = t.device.popErrorScope(); - t.shouldReject('OperationError', promise); + t.shouldReject('OperationError', promise, { allowMissingStack: true }); }); g.test('parent_scope') @@ -250,7 +260,7 @@ Tests that sibling error scopes need to be balanced. { // Trying to pop an additional non-existing scope should reject. const promise = t.device.popErrorScope(); - t.shouldReject('OperationError', promise); + t.shouldReject('OperationError', promise, { allowMissingStack: true }); } const errors = await Promise.all(promises); @@ -286,6 +296,6 @@ Tests that nested error scopes need to be balanced. { // Trying to pop an additional non-existing scope should reject. const promise = t.device.popErrorScope(); - t.shouldReject('OperationError', promise); + t.shouldReject('OperationError', promise, { allowMissingStack: true }); } }); |