Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-28 Thread Roland Scheidegger
Am 29.07.2014 00:01, schrieb Kenneth Graunke: > On Monday, July 28, 2014 05:34:59 PM Roland Scheidegger wrote: >> Looking all good, though it got me thinking about these numerous >> float-to-int rounding functions in mesa in various places a bit >> more. There is, for instance, a _mesa_round_to_ev

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-28 Thread Kenneth Graunke
On Monday, July 28, 2014 05:34:59 PM Roland Scheidegger wrote: > Looking all good, though it got me thinking about these numerous > float-to-int rounding functions in mesa in various places a bit more. > There is, for instance, a _mesa_round_to_even() function, which claims > that the c99 lrintf()

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-28 Thread Roland Scheidegger
Am 28.07.2014 20:38, schrieb Jason Ekstrand: > > > > On Mon, Jul 28, 2014 at 8:34 AM, Roland Scheidegger > wrote: > > Looking all good, though it got me thinking about these numerous > float-to-int rounding functions in mesa in various places a bit more. >

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-28 Thread Roland Scheidegger
Am 28.07.2014 20:38, schrieb Jason Ekstrand: > > > > On Mon, Jul 28, 2014 at 8:34 AM, Roland Scheidegger > wrote: > > Looking all good, though it got me thinking about these numerous > float-to-int rounding functions in mesa in various places a bit more. >

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-28 Thread Jason Ekstrand
On Mon, Jul 28, 2014 at 8:34 AM, Roland Scheidegger wrote: > Looking all good, though it got me thinking about these numerous > float-to-int rounding functions in mesa in various places a bit more. > There is, for instance, a _mesa_round_to_even() function, which claims > that the c99 lrintf() an

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-28 Thread Roland Scheidegger
Looking all good, though it got me thinking about these numerous float-to-int rounding functions in mesa in various places a bit more. There is, for instance, a _mesa_round_to_even() function, which claims that the c99 lrintf() and friends functions can't be used because the environment might use a

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-23 Thread Matt Turner
On Wed, Jul 23, 2014 at 12:01 PM, Jason Ekstrand wrote: > According to a quick micro-benchmark, this new version is 20% faster on my > Haswell laptop. > > v2: Removed the XXX note about x86_64 from the comment > v3: Use an intrinsic instead of an __asm__ block. This should give us MSVC > supp

[Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-23 Thread Jason Ekstrand
According to a quick micro-benchmark, this new version is 20% faster on my Haswell laptop. v2: Removed the XXX note about x86_64 from the comment v3: Use an intrinsic instead of an __asm__ block. This should give us MSVC support for free. Signed-off-by: Jason Ekstrand --- src/mesa/main/imp

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-23 Thread Matt Turner
On Tue, Jul 22, 2014 at 4:18 PM, Jason Ekstrand wrote: > On Mon, Jul 21, 2014 at 5:29 PM, Matt Turner wrote: >> >> On Mon, Jul 21, 2014 at 5:16 PM, Jason Ekstrand >> wrote: >> > Signed-off-by: Jason Ekstrand >> > --- >> > src/mesa/main/imports.h | 4 >> > 1 file changed, 4 insertions(+) >

[Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-22 Thread Jason Ekstrand
According to a quick micro-benchmark, this new version is 20% faster on my Haswell laptop. v2: Removed the XXX note about x86_64 from the comment Signed-off-by: Jason Ekstrand --- src/mesa/main/imports.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/impor

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-22 Thread Jason Ekstrand
On Mon, Jul 21, 2014 at 5:29 PM, Matt Turner wrote: > On Mon, Jul 21, 2014 at 5:16 PM, Jason Ekstrand > wrote: > > Signed-off-by: Jason Ekstrand > > --- > > src/mesa/main/imports.h | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/src/mesa/main/imports.h b/src/mesa/main/import

Re: [Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-21 Thread Matt Turner
On Mon, Jul 21, 2014 at 5:16 PM, Jason Ekstrand wrote: > Signed-off-by: Jason Ekstrand > --- > src/mesa/main/imports.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h > index af780b2..5d6486b 100644 > --- a/src/mesa/main/imports.h >

[Mesa-dev] [PATCH] Add an accelerated version of F_TO_I for x86_64

2014-07-21 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/mesa/main/imports.h | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index af780b2..5d6486b 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -285,6 +285,10 @@ static inline int F_TO