Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-10-11 Thread Erik Faye-Lund
On Fri, Oct 10, 2014 at 8:44 PM, Olivier Galibert wrote: > Applied. Thanks :) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-10-10 Thread Olivier Galibert
Applied. OG. On Fri, Sep 26, 2014 at 6:11 PM, Erik Faye-Lund wrote: > Our current atan()-approximation is pretty inaccurate at 1.0, so > let's try to improve the situation by doing a direct approximation > without going through atan. > > This new implementation uses an 11th degree polynomial t

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-10-10 Thread Erik Faye-Lund
On Fri, Oct 10, 2014 at 12:22 PM, Timothy Arceri wrote: > On Mon, 2014-10-06 at 17:03 +0200, Erik Faye-Lund wrote: >> On Fri, Sep 26, 2014 at 6:11 PM, Erik Faye-Lund wrote: >> > Our current atan()-approximation is pretty inaccurate at 1.0, so >> > let's try to improve the situation by doing a dir

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-10-10 Thread Timothy Arceri
On Mon, 2014-10-06 at 17:03 +0200, Erik Faye-Lund wrote: > On Fri, Sep 26, 2014 at 6:11 PM, Erik Faye-Lund wrote: > > Our current atan()-approximation is pretty inaccurate at 1.0, so > > let's try to improve the situation by doing a direct approximation > > without going through atan. > > > > This

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-10-06 Thread Erik Faye-Lund
On Fri, Sep 26, 2014 at 6:11 PM, Erik Faye-Lund wrote: > Our current atan()-approximation is pretty inaccurate at 1.0, so > let's try to improve the situation by doing a direct approximation > without going through atan. > > This new implementation uses an 11th degree polynomial to approximate > a

[Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-09-26 Thread Erik Faye-Lund
Our current atan()-approximation is pretty inaccurate at 1.0, so let's try to improve the situation by doing a direct approximation without going through atan. This new implementation uses an 11th degree polynomial to approximate atan in the [-1..1] range, and the following identitiy to reduce the

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-09-25 Thread Erik Faye-Lund
On Thu, Sep 25, 2014 at 4:54 PM, Erik Faye-Lund wrote: > On Wed, Sep 24, 2014 at 1:35 PM, Erik Faye-Lund wrote: >> Hm. Don't I need to expand this last immediate to a vector of >> type->components() size as well? >> >> If so, this patch should go on top: >> >> diff --git a/src/glsl/builtin_functi

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-09-25 Thread Erik Faye-Lund
On Wed, Sep 24, 2014 at 1:35 PM, Erik Faye-Lund wrote: > Hm. Don't I need to expand this last immediate to a vector of > type->components() size as well? > > If so, this patch should go on top: > > diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp > index 1820dd5..bfa46e

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-09-24 Thread Erik Faye-Lund
On Wed, Sep 24, 2014 at 4:10 AM, Ian Romanick wrote: > On 09/23/2014 03:39 PM, Erik Faye-Lund wrote: >> Our current atan()-approximation is pretty inaccurate at 1.0, so >> let's try to improve the situation by doing a direct approximation >> without going through atan. >> >> This new implementatio

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-09-23 Thread Ian Romanick
On 09/23/2014 03:39 PM, Erik Faye-Lund wrote: > Our current atan()-approximation is pretty inaccurate at 1.0, so > let's try to improve the situation by doing a direct approximation > without going through atan. > > This new implementation uses an 11th degree polynomial to approximate > atan in th

Re: [Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-09-23 Thread Erik Faye-Lund
On Wed, Sep 24, 2014 at 12:39 AM, Erik Faye-Lund wrote: > This fixes the following piglit test: > shaders/glsl-const-folding-01 Forgot to mention: no piglit regressions seen on Ivybridge. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://l

[Mesa-dev] [PATCH] glsl: improve accuracy of atan()

2014-09-23 Thread Erik Faye-Lund
Our current atan()-approximation is pretty inaccurate at 1.0, so let's try to improve the situation by doing a direct approximation without going through atan. This new implementation uses an 11th degree polynomial to approximate atan in the [-1..1] range, and the following identitiy to reduce the