Commit 83498433fc73cc016e0d81cd35c69088946713d5

Olli Etuaho 2017-05-19T14:57:23

Put global init code inside main() instead in a function Otherwise we may run into a name conflict issue if the shader code is run through the translator twice, since neither user-defined function names or internal function names are currently being prefixed in GLSL output. This could be fixed by prefixing user-defined variables in GLSL output, but this solution is much simpler. BUG=angleproject:1966 TEST=angle_end2end_tests, WebGL conformance tests Change-Id: I15c8de5a0a5e596fafe9f55e8d370345c790d5cc Reviewed-on: https://chromium-review.googlesource.com/509688 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>