Expire GPUAdapter on the first successful requestDevice - #3936
Merged
Merged
Conversation
Contributor
|
Previews, as seen when this build job started (787deff): |
Co-authored-by: Austin Eng <213reeses@gmail.com>
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}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1630
Test issue: gpuweb/cts#2380