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

2016-12-20 Thread Roland Scheidegger
Am 20.12.2016 um 22:12 schrieb Giuseppe Bilotta: > On Tue, Dec 20, 2016 at 2:17 AM, Matt Turner wrote: >> On Mon, Dec 19, 2016 at 5:12 PM, Giuseppe Bilotta >> wrote: >>> Just one question though —not knowing much of the shader language, can >>> I

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

2016-12-20 Thread Giuseppe Bilotta
On Tue, Dec 20, 2016 at 2:17 AM, Matt Turner wrote: > On Mon, Dec 19, 2016 at 5:12 PM, Giuseppe Bilotta > wrote: >> Just one question though —not knowing much of the shader language, can >> I expect expm1 to be available? > > No, expm1 doesn't

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

2016-12-19 Thread Roland Scheidegger
Am 20.12.2016 um 00:12 schrieb Giuseppe Bilotta: > Hello, > > I realize that I'm a little late to comment about this, but I think > the formula used for > tanh should be changed again. Specifically, as suggested by Roland > > On Fri, Dec 9, 2016 at 5:41 AM, Roland Scheidegger

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

2016-12-19 Thread Ilia Mirkin
On Mon, Dec 19, 2016 at 8:17 PM, Matt Turner wrote: > On Mon, Dec 19, 2016 at 5:12 PM, Giuseppe Bilotta > wrote: >> Just one question though —not knowing much of the shader language, can >> I expect expm1 to be available? > > No, expm1 doesn't

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

2016-12-19 Thread Matt Turner
On Mon, Dec 19, 2016 at 5:12 PM, Giuseppe Bilotta wrote: > Just one question though —not knowing much of the shader language, can > I expect expm1 to be available? No, expm1 doesn't exist in GLSL. ___ mesa-dev mailing list

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

2016-12-19 Thread Giuseppe Bilotta
Hello, I realize that I'm a little late to comment about this, but I think the formula used for tanh should be changed again. Specifically, as suggested by Roland On Fri, Dec 9, 2016 at 5:41 AM, Roland Scheidegger wrote: > btw I'm wondering if some vendors wouldn't implement

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

2016-12-09 Thread Jason Ekstrand
On Thu, Dec 8, 2016 at 5:50 PM, Kenneth Graunke wrote: > On Thursday, December 8, 2016 5:41:02 PM PST 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

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

2016-12-08 Thread Kenneth Graunke
On Thursday, December 8, 2016 9:17:04 PM PST Jason Ekstrand wrote: > On Thu, Dec 8, 2016 at 8:41 PM, Roland Scheidegger > wrote: > > > I'm wondering, isn't that actually a problem of the test, that is it > > can't actually expect reasonable results with such input values? > >

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

2016-12-08 Thread Jason Ekstrand
On Thu, Dec 8, 2016 at 8:41 PM, Roland Scheidegger wrote: > I'm wondering, isn't that actually a problem of the test, that is it > can't actually expect reasonable results with such input values? > Since within the shader languages those functions which are composed of >

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

2016-12-08 Thread Roland Scheidegger
I'm wondering, isn't that actually a problem of the test, that is it can't actually expect reasonable results with such input values? Since within the shader languages those functions which are composed of multiple other functions are usually allowed to basically accumulate all the errors of said

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

2016-12-08 Thread Kenneth Graunke
On Thursday, December 8, 2016 5:41:02 PM PST 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. > > v2: added

[Mesa-dev] [PATCH v3] 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. v2: added more explanation in the comment. v3: fixed a typo in the comment.