Skip to content

Commit 427ac42

Browse files
fix: #322 update documentation for existing feature
1 parent 96db402 commit 427ac42

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ NOTE: documentation is slightly out of date for the upcoming release of v2. We
9090
* [Flattened typed array support](#flattened-typed-array-support)
9191
* [Precompiled and Lighter Weight Kernels](#precompiled-and-lighter-weight-kernels)
9292
* [Supported Math functions](#supported-math-functions)
93+
* [How to check what is supported](#how-to-check-what-is-supported)
9394
* [Typescript Typings](#typescript-typings)
9495
* [Full API reference](#full-api-reference)
9596
* [Automatically-built Documentation](#automatically-built-documentation)
@@ -838,6 +839,22 @@ This is a list of the supported ones:
838839
* `Math.sqrt()`
839840
* `Math.tan()`
840841

842+
## How to check what is supported
843+
844+
To assist with mostly unit tests, but perhaps in scenarios outside of GPU.js, there are the following logical checks to determine what support level the system executing a GPU.js kernel may have:
845+
* `GPU.disableValidation()` - turn off all kernel validation
846+
* `GPU.enableValidation()` - turn on all kernel validation
847+
* `GPU.isGPUSupported`: `boolean` - checks if GPU is in-fact supported
848+
* `GPU.isKernelMapSupported`: `boolean` - checks if kernel maps are supported
849+
* `GPU.isOffscreenCanvasSupported`: `boolean` - checks if offscreen canvas is supported
850+
* `GOU.isWebGLSupported`: `boolean` - checks if WebGL v1 is supported
851+
* `GOU.isWebGL2Supported`: `boolean` - checks if WebGL v2 is supported
852+
* `GPU.isHeadlessGLSupported`: `boolean` - checks if headlessgl is supported
853+
* `GPU.isCanvasSupported`: `boolean` - checks if canvas is supported
854+
* `GPU.isGPUHTMLImageArraySupported`: `boolean` - checks if the platform supports HTMLImageArray's
855+
* `GPU.isSinglePrecisionSupported`: `boolean` - checks if the system supports single precision float 32 values
856+
```
857+
841858
## Typescript Typings
842859
Typescript is supported! Typings can be found [here](src/index.d.ts)!
843860

0 commit comments

Comments
 (0)