Work around pow() issue in NVIDIA 331.x drivers
pow(x, y) when y is a certain kind of a constant vector can cause issues on
NVIDIA 331 series drivers. Add an option to replace pow(x, y) with
exp2(y * log2(x)) when y is a constant to work around this issue.
This is done with an AST traverser instead of BuiltInFunctionEmulator, since
there's no mechanism in BuiltInFunctionEmulator to apply the replacements
only to calls where the second parameter is constant.
TEST=WebGL conformance tests
BUG=chromium:477306
Change-Id: Ifb327d72659fca36868439f24705203014b3ce53
Reviewed-on: https://chromium-review.googlesource.com/274279Tested-by:
Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by:
Zhenyao Mo <zmo@chromium.org>
Showing
src/compiler/translator/RemovePow.cpp
0 → 100644
src/compiler/translator/RemovePow.h
0 → 100644
Please
register
or
sign in
to comment