Commit 5b55edd8 by Qiankun Miao Committed by Commit Bot

Work around unpackHalf2x16 emulation for Intel Mac

Negative operator is buggy in an expression on Intel Mac. Use abs(v) to replace -v for negative value. BUG=chromium:644057 TEST=deqp/functional/gles3/shaderpackingfunction.html Change-Id: I6182e7a00b162e36ed9278c0e5a2fdd8fb480959 Reviewed-on: https://chromium-review.googlesource.com/381152 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent c28888b3
...@@ -163,7 +163,9 @@ void InitBuiltInFunctionEmulatorForGLSLMissingFunctions(BuiltInFunctionEmulator ...@@ -163,7 +163,9 @@ void InitBuiltInFunctionEmulatorForGLSLMissingFunctions(BuiltInFunctionEmulator
" float scale;\n" " float scale;\n"
" if(exponent < 0)\n" " if(exponent < 0)\n"
" {\n" " {\n"
" scale = 1.0 / (1 << -exponent);\n" " // The negative unary operator is buggy on OSX.\n"
" // Work around this by using abs instead.\n"
" scale = 1.0 / (1 << abs(exponent));\n"
" }\n" " }\n"
" else\n" " else\n"
" {\n" " {\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment