Store the std140 layout offsets in a pre-pass.

Instead of recording data and mutating a local table as we parse,
store all of the offsets for the std140 structs when we first
generate the struct. This should have no behavioural change, as
structs should always be defined first in any case.

BUG=angle:466

Change-Id: I1b732d67bd4f5b908211410e5e7796d72d836174
Reviewed-on: https://chromium-review.googlesource.com/202910
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
2 files changed