WebGPU: implement requestAdapter()'s featureLevel placeholder
- Category
- Graphics
- Type
- Chromium catches up
- Status
- In developer trial (Behind a flag) (Chrome In developer trial (Behind a flag))
- Intent stage
- None
Summary
In preparation for future changes, the WebGPU Working Group has added a `featureLevel` member in `GPURequestAdapterOptions` (the options passed to `navigator.gpu.requestAdapter()`). It must have one of two valid values, but both have no effect.
Motivation
This "reserves" a way for applications to request the upcoming (not yet standardized, not yet shipped) WebGPU Compatibility Mode without implementing it. In practice, shipping this change does two things: (1) it allows us to emit a warning when we ignore it, so developers know their site may break once we ship Compatibility Mode, if not tested, and (2) ensures that any developers who do use this field experimentally (as early adopters) set it to a valid value. Per spec it does nothing right now except produce a warning; when we ship Compatibility Mode, it will trigger new restrictions. More substantial changes (and full review, TAG review, I2S, etc.) are forthcoming for WebGPU Compatibility Mode itself.
Standards & signals
- Specification: https://www.w3.org/TR/webgpu/#adapter-selection
- Firefox: No signal — Mozilla members have requested during weekly standardization meetings that we postpone filing standard positions until we reach Candidate Recommendation (CR) status in Q4.
- Safari: Positive — PR approval is a positive signal per https://github.com/WebKit/standards-positions/issues/294#issuecomment-1877411933
- Web developers: Positive
- Tracking bug: https://crbug.com/366151404
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=webgpu-implement-requestadapter-s-featurelevel-placeholder
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+WebGPU%3A%20implement%20requestAdapter()'s%20featureLevel%20placeholder
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=WebGPU%3A%20implement%20requestAdapter()'s%20featureLevel%20placeholder
- Baseline status: https://webstatus.dev/?q=WebGPU%3A%20implement%20requestAdapter()'s%20featureLevel%20placeholder