[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Spec modification regarding out-of-range array indexing in shaders

Security in the WebGL API is paramount. In order to support WebGL
unconditionally on the web, it's been necessary to precisely define
many behaviors left undefined in the OpenGL ES specifications.

One significant area where the WebGL specification defines previously
undefined behavior is out-of-range array indexing in shaders. Up to
this point, the WebGL spec has been overly cautious in the name of
security. However, unfortunately, on many GPUs this definition has
significantly impacted the performance of shaders.

Most GPUs nowadays implement the required security properties for
WebGL in hardware. In order to take advantage of this support, the
specification has been modified. The new behavior is defined here:


and was incorporated in this pull request:


This new behavior is in line with the KHR_robustness [1] and
KHR_robust_buffer_access_behavior [2] specifications, as well as the
Direct3D 10 specification which first introduced these security
properties. On most GPUs this will simplify the browsers'
transformations of shaders and speed up shader execution.

If you have any concerns about this change please post them to the list.



[1] https://www.opengl.org/registry/specs/KHR/robustness.txt
[2] https://www.opengl.org/registry/specs/KHR/robust_buffer_access_behavior.txt

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl