|
5fec7ab2
|
2018-04-04T11:58:33
|
|
Identify functions by unique id in BuiltInFunctionEmulator
Now that unique ids of all builtins are compile-time constants, we can
use them to look up functions in BuiltInFunctionEmulator. This is
simpler than using a custom struct with the name and parameters for
identifying functions.
This requires that we store a reference to a TFunction in those
TIntermUnary nodes that were created based on a function.
This decreases shader_translator binary size by about 6 KB on Windows.
BUG=angleproject:2267
BUG=chromium:823856
TEST=angle_unittests
Change-Id: Idd5a00c772c6f26dd36fdbbfbe161d22ab27c2fe
Reviewed-on: https://chromium-review.googlesource.com/995372
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
c634a637
|
2017-05-18T14:09:49
|
|
Remove webgl_ prefix from emulated function names
The prefix is unnecessary now that user-defined names are prefixed in
both GLSL and HLSL output. Removing the prefix makes compiler output
a bit simpler to read.
BUG=angleproject:2038
TEST=angle_unittests
Change-Id: I9ffc508f50d6146a2d85798875c88e2c385b83fe
Reviewed-on: https://chromium-review.googlesource.com/508730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
8033165b
|
2017-06-23T10:59:51
|
|
Don't use constexpr pair constructor in translator.
Although this seems to compile and pass on our bots, the std::pair
constructor with arguments is not constexpr until c++14. Instead
use a helper struct which achieves the same goal.
BUG=chromium:697758
Change-Id: I0f9873729485a5059f79af969cb56f84706e6c98
Reviewed-on: https://chromium-review.googlesource.com/545796
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
35bcad42
|
2017-06-06T15:12:27
|
|
Optimize builtin function emulator class.
This refactor uses a generator to produce static arrays instead of
using a bunch of std::map inserting statements. It speeds up shader
translation because every shader compile would create and tear down
this table.
Currently it is implemented as a flat array, but in the future we
could use compile-time hashing to implement faster lookup.
BUG=chromium:697758
Change-Id: I689f7de4d9b2c8c76095bb313f4c040116fc61d2
Reviewed-on: https://chromium-review.googlesource.com/521226
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|