Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes error scope tests for Linux/Intel #3141

Merged
merged 7 commits into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/webgpu/api/validation/error_scope.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ 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,
},
})
);
assert(device !== null);
this._device = device;
}
Expand Down Expand Up @@ -146,7 +155,7 @@ Tests that popping an empty error scope stack should reject.
)
.fn(t => {
const promise = t.device.popErrorScope();
t.shouldReject('OperationError', promise);
lokokung marked this conversation as resolved.
Show resolved Hide resolved
t.shouldReject('OperationError', promise, { allowMissingStack: true });
});

g.test('parent_scope')
Expand Down Expand Up @@ -250,7 +259,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);
Expand Down Expand Up @@ -286,6 +295,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 });
}
});