SharedArrayBuffer in WebGLLimited availability
SharedArrayBuffer objects can be used in WebGL APIs that previously only worked with ArrayBuffer objects.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–59Not supported
60+Supportedsince Jul 25, 2017
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–78Not supported
79+Supportedsince Jul 28, 2020
Current: 157Safari
✕Not supportedup to 27
Current: 27MobileChrome Android
18–59Not supported
60+Supportedsince Aug 1, 2017
Current: 155Firefox Android
4–68Not supported
79+Supportedsince Jul 28, 2020
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Safari, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN — see the links below.
Feature detection
JS · check before using
if ("WebGL2RenderingContext" in globalThis && "bufferData" in WebGL2RenderingContext.prototype) {
// WebGL2RenderingContext.bufferData is available
}Sub-features
Support for each part of the feature (32). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| WebGL2RenderingContext.bufferData.srcData_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.bufferSubData.srcData_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.clearBufferfv.values_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.clearBufferiv.values_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.clearBufferuiv.values_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.compressedTexImage2D.pixels_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.compressedTexImage3D.pixels_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.compressedTexSubImage2D.srcData_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.getBufferSubData.dstData_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.readPixels.pixels_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.texImage3D.srcData_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.texSubImage3D.srcData_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.uniformMatrix2fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.uniformMatrix2x3fv.data_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.uniformMatrix2x4fv.data_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.uniformMatrix3fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.uniformMatrix3x2fv.data_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.uniformMatrix3x4fv.data_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.uniformMatrix4fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.uniformMatrix4x2fv.data_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
Show 12 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| WebGL2RenderingContext.uniformMatrix4x3fv.data_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.vertexAttrib1fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.vertexAttrib2fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.vertexAttrib3fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.vertexAttrib4fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.vertexAttribI4iv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGL2RenderingContext.vertexAttribI4uiv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGLRenderingContext.compressedTexImage2D.pixels_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGLRenderingContext.vertexAttrib1fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGLRenderingContext.vertexAttrib2fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGLRenderingContext.vertexAttrib3fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |
| WebGLRenderingContext.vertexAttrib4fv.value_param_accepts_SharedArrayBuffer | 60 | 79 | 79 | ✕ | 60 | 79 | ✕ |