Re: [Mesa-dev] [PATCH] compiler/glsl: fix precision problem of tanh

2016-12-08 Thread Jason Ekstrand
On Thu, Dec 8, 2016 at 5:03 PM, Haixia Shi wrote: > Clamp input scalar value to range [-10, +10] to avoid precision problems > when the absolute value of input is too large. > > Fixes dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.* > test > failures. > > Signed-off-by: Haixia Shi

[Mesa-dev] [PATCH] compiler/glsl: fix precision problem of tanh

2016-12-08 Thread Haixia Shi
Clamp input scalar value to range [-10, +10] to avoid precision problems when the absolute value of input is too large. Fixes dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.* test failures. Signed-off-by: Haixia Shi Cc: Jason Ekstrand , Cc: Stéphane Marchesin , Cc: Kenneth Graunk