webgl angle glsl "pow" function bug
Reported by
tweektw...@gmail.com,
Dec 7 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36 Steps to reproduce the problem: 1. create any shader with simple code "float bar = pow(foo, 2.5)" 2. use WEBGL_debug_shaders extension to debug shader source 3. look at source, it will look like float _webgl_44a9acbe7629930d = (s897 * s897); this is not good! What is the expected behavior? source must look like float _webgl_44a9acbe7629930d = pow(_webgl_2420662cd003acfa, 2.5); What went wrong? angle translate "pow" function wrong way if exponent argument >= 2 AND fraction part >= 0.5 then angle floor exponent argument to nearest integer if exponent argument < 2 OR fraction part < 0.5 all is OK Did this work before? N/A Chrome version: 63.0.3239.84 Channel: stable OS Version: 10.0 Flash Version:
,
Dec 7 2017
test case (test.html) and my "gpu" (gpu.html) test case: LEFT SIDE exponent = 2.4 angle translate to float _webgl_75c422100f18a043 = pow(_webgl_4fc82888d13de398, 2.4000001); this is OK RIGHT SIDE exponent = 2.5 angle translate to float _webgl_75c422100f18a043 = (s818 * s818); this is NOT OK
,
Dec 8 2017
i made screenshot for illustration
,
Dec 8 2017
Assigning +oetuaho for shader translator, feel free to reassign if needed
,
Dec 11 2017
This is a bug in the HLSL integer pow workaround. Fix here: https://chromium-review.googlesource.com/c/angle/angle/+/817299
,
Dec 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/angle/angle/+/629a64498dde1898aa45e236f1a8cbb75eb5db10 commit 629a64498dde1898aa45e236f1a8cbb75eb5db10 Author: Olli Etuaho <oetuaho@nvidia.com> Date: Tue Dec 12 08:14:17 2017 Fix HLSL integer pow workaround The exponent should be rounded prior to casting it to an integer. Also if the exponent has a significant fractional part the expression should not be turned into a multiplication. The previous code failed to check this correctly if the exponent's fractional part was greater than 0.5. The test case is expanded to cover the previously failing cases. BUG= chromium:793115 TEST=angle_end2end_tests Change-Id: Ic72cd6ddc7f3d2495f7c87a3e3cfac5791445e72 Reviewed-on: https://chromium-review.googlesource.com/817299 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> [modify] https://crrev.com/629a64498dde1898aa45e236f1a8cbb75eb5db10/src/tests/gl_tests/GLSLTest.cpp [modify] https://crrev.com/629a64498dde1898aa45e236f1a8cbb75eb5db10/src/compiler/translator/ExpandIntegerPowExpressions.cpp
,
Dec 12 2017
The following revision refers to this bug: https://skia.googlesource.com/skia/+/ba096c0dc3ba2bd2e7f3bc765b2c43472b2faf31 commit ba096c0dc3ba2bd2e7f3bc765b2c43472b2faf31 Author: angle-deps-roller@chromium.org <angle-deps-roller@chromium.org> Date: Tue Dec 12 09:05:28 2017 Roll skia/third_party/externals/angle2/ c7abc0803..629a64498 (1 commit) https://chromium.googlesource.com/angle/angle.git/+log/c7abc08034a3..629a64498dde $ git log c7abc0803..629a64498 --date=short --no-merges --format='%ad %ae %s' 2017-12-11 oetuaho Fix HLSL integer pow workaround Created with: roll-dep skia/third_party/externals/angle2 BUG= 793115 The AutoRoll server is located here: https://angle-skia-roll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE,Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE,Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE,Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE,Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE,Build-Debian9-Clang-x86_64-Release-ANGLE TBR=liyuqian@google.com Change-Id: I73a2bee4cae25f79d0ccd1fe68e13bc62f9f7a63 Reviewed-on: https://skia-review.googlesource.com/83800 Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org> Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org> [modify] https://crrev.com/ba096c0dc3ba2bd2e7f3bc765b2c43472b2faf31/DEPS
,
Dec 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ee522f0cf770b3373165c02408ff6043ac24209d commit ee522f0cf770b3373165c02408ff6043ac24209d Author: angle-deps-roller@chromium.org <angle-deps-roller@chromium.org> Date: Tue Dec 12 10:16:18 2017 Roll src/third_party/angle/ c7abc0803..629a64498 (1 commit) https://chromium.googlesource.com/angle/angle.git/+log/c7abc08034a3..629a64498dde $ git log c7abc0803..629a64498 --date=short --no-merges --format='%ad %ae %s' 2017-12-11 oetuaho Fix HLSL integer pow workaround Created with: roll-dep src/third_party/angle BUG= 793115 The AutoRoll server is located here: https://angle-chromium-roll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel TBR=cwallez@chromium.org Change-Id: I838b7ab46d5c9f4573da56c3232511bb6ea72d23 Reviewed-on: https://chromium-review.googlesource.com/822052 Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org> Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org> Cr-Commit-Position: refs/heads/master@{#523389} [modify] https://crrev.com/ee522f0cf770b3373165c02408ff6043ac24209d/DEPS
,
Dec 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b7ee52595cf0dc6be18f199301c4b208690304ce commit b7ee52595cf0dc6be18f199301c4b208690304ce Author: skia-deps-roller@chromium.org <skia-deps-roller@chromium.org> Date: Tue Dec 12 10:51:36 2017 Roll src/third_party/skia/ 40ca2087e..ba096c0dc (1 commit) https://skia.googlesource.com/skia.git/+log/40ca2087ef07..ba096c0dc3ba $ git log 40ca2087e..ba096c0dc --date=short --no-merges --format='%ad %ae %s' 2017-12-12 angle-deps-roller Roll skia/third_party/externals/angle2/ c7abc0803..629a64498 (1 commit) Created with: roll-dep src/third_party/skia BUG= 793115 The AutoRoll server is located here: https://autoroll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel TBR=liyuqian@chromium.org Change-Id: Ie18d4d01aee31720b5698d251c2f4a26210676b4 Reviewed-on: https://chromium-review.googlesource.com/822034 Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org> Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org> Cr-Commit-Position: refs/heads/master@{#523394} [modify] https://crrev.com/b7ee52595cf0dc6be18f199301c4b208690304ce/DEPS
,
Jan 2 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by kbr@chromium.org
, Dec 7 2017