GPU: wgslLanguageFeatures プロパティ
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
GPU
インターフェイスの読み取り専用プロパティ wgslLanguageFeatures
は、この WebGPU の実装が対応している WGSL 言語の拡張を報告する WGSLLanguageFeatures
オブジェクトを返します。
メモ: API に対応しているすべてのブラウザーの WebGPU ですべての WGSL 言語の拡張が利用可能なわけではありません。使用することを決めたすべての拡張を徹底的にテストすることを推奨します。
値
WGSLLanguageFeatures
オブジェクトのインスタンスです。これは Set 風オブジェクトです。
例
js
if (!navigator.gpu) {
throw Error("WebGPU に対応していません。");
}
const wgslFeatures = navigator.gpu.wgslLanguageFeatures;
// 集合のサイズを返す
console.log(wgslFeatures.size);
// values() を用いて集合の要素すべてを走査する
const valueIterator = wgslFeatures.values();
for (const value of valueIterator) {
console.log(value);
}
// ...
仕様書
Specification |
---|
WebGPU # dom-gpu-wgsllanguagefeatures |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wgslLanguageFeatures |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- In development. Supported in a pre-release version.
- In development. Supported in a pre-release version.
- No support
- No support
- Experimental. Expect behavior to change in the future.
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.