Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]
These attributes are now used exactly in the loops and ifs
that require them, limiting the number of failed compilations
due to excessive unrolling and flattening.
Also output Lod0 functions only when needed.
Adds unit tests for LOOP, FLATTEN and Lod0 generation.
The patch was tested against the WebGL CTS 1.0.4 for which all the
failures existed prior to this patch and seem to be unrelated to this
change. It also works correctly on the following sites that had trouble
with [[loop]] and [[unroll]]:
* dev.miaumiau.cat/rayTracer "Skull Demo"
* The turbulenz engine particle demo
* Lots of ShaderToy samples (including "Volcanic" and "Metropolis")
* Google Maps Earth mode
* Lots of Chrome Experiments
* Lagoa
* madebyevan.com/webgl-water
* SketchFab
* Unit Tests
BUG=angleproject:937
BUG=395048
Change-Id: If7baddae1cdae0b3a414aa49e5a4c4babedbfe50
Reviewed-on: https://chromium-review.googlesource.com/261263Reviewed-by:
Corentin Wallez <cwallez@chromium.org>
Tested-by:
Corentin Wallez <cwallez@chromium.org>
Showing
Please
register
or
sign in
to comment