Sitelet https://github.com/gpuweb/gpuweb/pull/3936
Skip to content

Expire GPUAdapter on the first successful requestDevice - #3936

Merged
kainino0x merged 2 commits into
gpuweb:mainfrom
kainino0x:stale-on-requestDevice
Mar 17, 2023
Merged

kainino0x merged 2 commits into
gpuweb:mainfrom
kainino0x:stale-on-requestDevice

Conversation

@kainino0x

@kainino0x kainino0x commented Mar 8, 2023 •

Copy link
Copy Markdown
Contributor

Fixes #1630

Test issue: gpuweb/cts#2380

@kainino0x kainino0x added the copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.) label Mar 8, 2023
@kainino0x kainino0x added this to the V1.0 milestone Mar 8, 2023
@kainino0x
kainino0x requested a review from toji March 8, 2023 00:27

@austinEng austinEng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by comment

Comment thread spec/index.bs Outdated
@github-actions

github-actions Bot commented Mar 8, 2023 •

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (787deff):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

Co-authored-by: Austin Eng <213reeses@gmail.com>

@toji toji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kainino0x
kainino0x merged commit 1af4b31 into gpuweb:main Mar 17, 2023
@kainino0x
kainino0x deleted the stale-on-requestDevice branch March 17, 2023 01:13
aarongable pushed a commit to chromium/chromium that referenced this pull request Mar 22, 2023
The WebGPU spec changed to make GPUAdapter a single-use object: once it
successfully creates a device, it cannot create more devices.
gpuweb/gpuweb#3936

The spec returns an already-lost device, and this should be implemented
in Dawn eventually, but as a first step for V1, we implement this as a
requestDevice() rejection in Blink. We could inject a device loss (as
the deleted code in this CL does), but an exception gives us more leeway
to change the behavior/spec in a pseudo-non-breaking way.

Finally, the old GPUAdapter invalidation code is removed, because it's
obsoleted by this change: the adapter is already necessarily invalidated
by the time a device coming from it could be lost.

Test: adapter_single_use.https.html
Bug: 1234617
Change-Id: I8b68648bca415e067cafca01cc2572d6949f1c27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4358569
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120580}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should "mark adapters stale" be called more quickly?

3 participants