src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp


Log

Author Commit Date CI Message
Jamie Madill 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>
Jamie Madill 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>