Limited availability
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
The wgslLanguageFeatures
read-only property of the GPU
interface returns a WGSLLanguageFeatures
object that reports the WGSL language extensions supported by the WebGPU implementation.
Note: Not all WGSL language extensions are available to WebGPU in all browsers that support the API. We recommend you thoroughly test any extensions you choose to use.
ValueA WGSLLanguageFeatures
object instance. This is a setlike object.
if (!navigator.gpu) {
throw Error("WebGPU not supported.");
}
const wgslFeatures = navigator.gpu.wgslLanguageFeatures;
// Return the size of the set
console.log(wgslFeatures.size);
// Iterate through all the set values using values()
const valueIterator = wgslFeatures.values();
for (const value of valueIterator) {
console.log(value);
}
// â¦
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4