"It is possible to create, either intentionally or unintentionally, combinations of shaders and geometry that take an undesirably long time to render. This issue is analogous to that of long-running scripts, for which user agents already have safeguards. However, long-running draw calls can cause loss of interactivity for the entire window system, not just the user agent.
In the general case it is not possible to impose limits on the structure of incoming shaders to guard against this problem. Experimentation has shown that even very strict structural limits are insufficient to prevent long rendering times, and such limits would prevent shader authors from implementing common algorithms.
User agents should implement safeguards to prevent excessively long rendering times and associated loss of interactivity. Suggested safeguards include:
Splitting up draw calls with large numbers of elements into smaller draw calls. Timing individual draw calls and forbidding further rendering from a page if a certain timeout is exceeded. Using any watchdog facilities available at the user level, graphics API level, or operating system level to limit the duration of draw calls. Separating the graphics rendering of the user agent into a distinct operating system process which can be terminated and restarted without losing application state. The supporting infrastructure at the OS and graphics API layer is expected to improve over time, which is why the exact nature of these safeguards is not specified."