Skip to content

Commit

Permalink
Compatibility Mode: update to use featureLevel. (#5012)
Browse files Browse the repository at this point in the history
Now that GPUAdapter.featureLevel has landed in the core spec, remove
the GPUAdapter.compatibilityMode IDL change from the proposal.
Explain that setting GPUAdapter.featureLevel to "compatibility"
enables Compatibility Mode validation. Change the
GPUAdapter.isCompatibilityMode boolean to a "featureLevel" DOMString.
  • Loading branch information
SenorBlanco authored Dec 19, 2024
1 parent c7fc9bb commit 254de56
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions proposals/compatibility-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,17 @@ Since WebGPU Compatibility mode is a subset of WebGPU, all valid Compatibility m

## WebGPU Spec Changes

```webidl
partial dictionary GPURequestAdapterOptions {
boolean compatibilityMode = false;
}
```
When calling `GPU.requestAdapter()`, passing `featureLevel = "compatibility"` in the `GPURequestAdapterOptions` will indicate to the User Agent to select the Compatibility subset of WebGPU. Any Devices created from the resulting Adapter on supporting UAs will support only Compatibility mode. Calls to APIs unsupported by Compatibility mode will result in validation errors.

When calling `GPU.RequestAdapter()`, passing `compatibilityMode = true` in the `GPURequestAdapterOptions` will indicate to the User Agent to select the Compatibility subset of WebGPU. Any Devices created from the resulting Adapter on supporting UAs will support only Compatibility mode. Calls to APIs unsupported by Compatibility mode will result in validation errors.

Note that a supporting User Agent may return a `compatibilityMode = true` Adapter which is backed by a fully WebGPU-capable hardware adapter, such as D3D12, Metal or Vulkan, so long as it validates all subsequent API calls made on the Adapter and the objects it vends against the Compatibility subset.
Note that a supporting User Agent may return a `featureLevel = "compatibility"` Adapter which is backed by a fully WebGPU-capable hardware adapter, such as D3D12, Metal or Vulkan, so long as it validates all subsequent API calls made on the Adapter and the objects it vends against the Compatibility subset.

```webidl
partial interface GPUAdapter {
readonly attribute boolean isCompatibilityMode;
readonly attribute DOMstring featureLevel;
}
```

As a convenience to the developer, the Adapter returned will have the `isCompatibilityMode` property set to `true`.

As a convenience to the developer, the Adapter returned will have the `featureLevel` property set to `"compatibility"`.

```webidl
partial dictionary GPUTextureDescriptor {
Expand Down

0 comments on commit 254de56

Please sign in to comment.