-
Notifications
You must be signed in to change notification settings - Fork 92
Add tests for mapping behavior around device.destroy() #4295
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
base: main
Are you sure you want to change the base?
Conversation
this.expectDeviceLost('destroyed'); | ||
|
||
this.expectValidationError(fn, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also fix a bug where some test code was running twice unintentionally.
fn
is already called below, it should not be called twice. We don't need to capture validation errors anymore because there are never any (and test teardown will check this). (Likely when this test was written, sometimes there were validation errors here.)
I'll revisit this after the WG discusses gpuweb/gpuweb#5102. |
const b1 = t.createBufferTracked({ size: 16, usage, mappedAtCreation: true }); | ||
t.expect(b1.mapState === 'mapped', 'b1 before destroy 1'); | ||
|
||
await t.executeAfterDestroy(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are still pending this decision right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Test mappedAtCreation and mapAsync behavior around device.destroy(). Searching for references to
GPUDevice.destroy
, I can't seem to find any other tests for this, except formap_detach
which I've also enhanced a tiny bit here.Spec: https://gpuweb.github.io/gpuweb/#dom-gpubuffer-mapasync
This tests the behavior currently written in the spec (modulo uncertainty around gpuweb/gpuweb#5101), but the specced behavior is weird; see gpuweb/gpuweb#5102.
Also fix a bug where some test code was running twice unintentionally.
Issue: None filed except for the spec issue
Requirements for PR author:
.unimplemented()
./** documented */
and new helper files are found inhelper_index.txt
.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.