Skip to content

Commit c03dee2

Browse files
Editorial review: Add GPUAdapterInfo.isFallbackAdapter... (mdn#41578)
* Add GPUAdapterInfo.isFallbackAdapter, and update GPUAdapter.isFallbackAdapter * Update files/en-us/web/api/gpuadapter/isfallbackadapter/index.md Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org> * Update files/en-us/web/api/gpuadapter/index.md Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org> --------- Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
1 parent 591a2a2 commit c03dee2

File tree

4 files changed

+61
-6
lines changed

4 files changed

+61
-6
lines changed

files/en-us/web/api/gpuadapter/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ A `GPUAdapter` object is requested using the {{domxref("GPU.requestAdapter()")}}
1717

1818
- {{domxref("GPUAdapter.features", "features")}} {{ReadOnlyInline}}
1919
- : A {{domxref("GPUSupportedFeatures")}} object that describes additional functionality supported by the adapter.
20-
- {{domxref("GPUAdapter.isFallbackAdapter", "isFallbackAdapter")}} {{ReadOnlyInline}} {{deprecated_inline}} {{non-standard_inline}}
21-
- : A boolean value. Returns `true` if the adapter is a [fallback adapter](/en-US/docs/Web/API/GPU/requestAdapter#fallback_adapters), and `false` if not.
2220
- {{domxref("GPUAdapter.info", "info")}} {{ReadOnlyInline}}
2321
- : A {{domxref("GPUAdapterInfo")}} object containing identifying information about the adapter.
2422
- {{domxref("GPUAdapter.limits", "limits")}} {{ReadOnlyInline}}
2523
- : A {{domxref("GPUSupportedLimits")}} object that describes the limits supported by the adapter.
2624

25+
### Deprecated properties
26+
27+
- {{domxref("GPUAdapter.isFallbackAdapter", "isFallbackAdapter")}} {{ReadOnlyInline}} {{deprecated_inline}} {{non-standard_inline}}
28+
- : A boolean value. Returns `true` if the adapter is a [fallback adapter](/en-US/docs/Web/API/GPU/requestAdapter#fallback_adapters), and `false` if not. This property has been removed from the web platform. Use {{domxref("GPUAdapterInfo.isFallbackAdapter")}} instead.
29+
2730
## Instance methods
2831

2932
- {{domxref("GPUAdapter.requestAdapterInfo", "requestAdapterInfo()")}} {{deprecated_inline}} {{non-standard_inline}}

files/en-us/web/api/gpuadapter/isfallbackadapter/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ browser-compat: api.GPUAdapter.isFallbackAdapter
1414
The **`isFallbackAdapter`** read-only property of the
1515
{{domxref("GPUAdapter")}} interface returns `true` if the adapter is a [fallback adapter](/en-US/docs/Web/API/GPU/requestAdapter#fallback_adapters), and `false` if not.
1616

17+
This property has been removed from the web platform. Use {{domxref("GPUAdapterInfo.isFallbackAdapter")}} instead.
18+
1719
## Value
1820

1921
A boolean.
@@ -31,8 +33,8 @@ async function init() {
3133
throw Error("Couldn't request WebGPU adapter.");
3234
}
3335

34-
const fallback = adapter.isFallbackAdapter;
35-
console.log(fallback);
36+
const isFallback = adapter.isFallbackAdapter;
37+
console.log(isFallback);
3638

3739
//
3840
}

files/en-us/web/api/gpuadapterinfo/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ This object allows developers to access specific details about the user's GPU so
2323
- : A human-readable string describing the adapter. Returns an empty string if it is not available.
2424
- {{domxref("GPUAdapterInfo.device", "device")}} {{ReadOnlyInline}}
2525
- : A vendor-specific identifier for the adapter. Returns an empty string if it is not available.
26-
- {{domxref("GPUAdapterInfo.vendor", "vendor")}} {{ReadOnlyInline}}
27-
- : The name of the adapter vendor. Returns an empty string if it is not available.
26+
- {{domxref("GPUAdapterInfo.isFallbackAdapter", "isFallbackAdapter")}} {{ReadOnlyInline}}
27+
- : A boolean value. Returns `true` if the adapter is a [fallback adapter](/en-US/docs/Web/API/GPU/requestAdapter#fallback_adapters), and `false` if not.
2828
- {{domxref("GPUAdapterInfo.subgroupMaxSize", "subgroupMaxSize")}} {{ReadOnlyInline}}
2929
- : The maximum supported [subgroup size](https://gpuweb.github.io/gpuweb/wgsl/#subgroup-size) for the {{domxref("GPUAdapter")}}.
3030
- {{domxref("GPUAdapterInfo.subgroupMinSize", "subgroupMinSize")}} {{ReadOnlyInline}}
3131
- : The minimum supported [subgroup size](https://gpuweb.github.io/gpuweb/wgsl/#subgroup-size) for the {{domxref("GPUAdapter")}}.
32+
- {{domxref("GPUAdapterInfo.vendor", "vendor")}} {{ReadOnlyInline}}
33+
- : The name of the adapter vendor. Returns an empty string if it is not available.
3234

3335
## Examples
3436

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "GPUAdapterInfo: isFallbackAdapter property"
3+
short-title: isFallbackAdapter
4+
slug: Web/API/GPUAdapterInfo/isFallbackAdapter
5+
page-type: web-api-instance-property
6+
browser-compat: api.GPUAdapterInfo.isFallbackAdapter
7+
---
8+
9+
{{APIRef("WebGPU API")}}{{SecureContext_Header}}{{AvailableInWorkers}}
10+
11+
The **`isFallbackAdapter`** read-only property of the
12+
{{domxref("GPUAdapterInfo")}} interface returns `true` if the adapter is a [fallback adapter](/en-US/docs/Web/API/GPU/requestAdapter#fallback_adapters), and `false` if not.
13+
14+
## Value
15+
16+
A boolean.
17+
18+
## Examples
19+
20+
```js
21+
async function init() {
22+
if (!navigator.gpu) {
23+
throw Error("WebGPU not supported.");
24+
}
25+
26+
const adapter = await navigator.gpu.requestAdapter();
27+
if (!adapter) {
28+
throw Error("Couldn't request WebGPU adapter.");
29+
}
30+
31+
const isFallback = adapter.info.isFallbackAdapter;
32+
console.log(isFallback);
33+
34+
//
35+
}
36+
```
37+
38+
## Specifications
39+
40+
{{Specifications}}
41+
42+
## Browser compatibility
43+
44+
{{Compat}}
45+
46+
## See also
47+
48+
- The [WebGPU API](/en-US/docs/Web/API/WebGPU_API)

0 commit comments

Comments
 (0)