Re: [Mesa-dev] [PATCH 0/6] Enable Pixman for Mesa

2014-07-17 Thread Jason Ekstrand
Juha-Pekka,
The patch I just sent to the list here:

http://lists.freedesktop.org/archives/mesa-dev/2014-July/063501.html

Should also help with chrome performance.  We have had a fast-path inside
the intel driver for some time to do BGRA/RGBA - BGRA conversions.  For
some reason, chrome seems to have switched to using RGBA textures (they
used to use BGRA).  The above patch enables the fastpath for converting to
RGBA as well as BGRA.  Because this fastpath is in the driver itself and
handles tiling directly, it's much faster than anything that goes through
the paths in main/texstore.c. It would be interesting to note what that
does to power consumption.
--Jason Ekstrand



On Wed, Jun 25, 2014 at 5:38 AM, Juha-Pekka Heikkila 
juhapekka.heikk...@gmail.com wrote:

 This is my old set which enable using Pixman on Mesa for some texture
 conversion fast paths. As is this passes Piglit quick set on my IVB.

 For general case this does not offer essentially better fps or such but
 these were recently tested on Chromebook with HSW inside where it showed
 promising drop on Watt drain. With/without Pixman Mesa was compiled
 with march=corei7

 Number here indicate % change in Watts, for comparison was used averages
 of multiple runs. While Watt drain reduced performance remained +/- on
 the same level.

 Javascript - Octane v20.457%
 Page Rendering - Page Loading-0.280%
 HTML5 Games - JSGameBench-2.275%
 HTML5 Games - AngryBirds -4.483%
 Canvas 2D - CanvasEarth  -4.003%
 Canvas2D - FishTank 250 fish -3.176%
 WebGL - EarthScreen  -2.959%
 Browser Performance - RoboHornet -5.833%
 WebGL - Aquarium 50 fish -4.448%
 WebGL - Aquarium 100 fish-4.094%

 /Juha-Pekka

 Juha-Pekka Heikkila (6):
   mesa: Add Pixman library to configure.ac
   mesa: Add Pixman usage to texstore.c
   mesa: Pixman texture conversion rgb to abgr
   mesa: Pixman texture conversion argb to abgr
   mesa: Pixman texture conversion argb to rgb
   mesa: Pixman texture conversion rgb to rgb565 and rgb565_rev

  configure.ac |  32 +++
  src/mesa/main/texstore.c | 105
 +--
  2 files changed, 134 insertions(+), 3 deletions(-)

 --
 1.8.1.2

 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 0/6] Enable Pixman for Mesa

2014-06-30 Thread Juha-Pekka Heikkila
On 25.06.2014 23:47, Matt Turner wrote:
 On Wed, Jun 25, 2014 at 5:38 AM, Juha-Pekka Heikkila
 juhapekka.heikk...@gmail.com wrote:
 This is my old set which enable using Pixman on Mesa for some texture
 conversion fast paths. As is this passes Piglit quick set on my IVB.
 
 Pixman doesn't actually have fast paths for swizzling, like we're
 using in this series. I imagine improvements we're seeing here are
 simply because Mesa's code is slow.
 
 I never pursued this idea for a couple of reasons. One is that we
 should probably use the GPU to do the conversions in the ideal case.
 Also, pixman doesn't support floating-point formats. Some work has
 been done in the last year or so to make this much easier to implement
 though.
 
 The first reason above shouldn't block other improvements, and the
 second reason is fixable with some contributions to pixman. And pixman
 is really a trivial dependency, so that shouldn't be a problem.
 
 Soren thinks this is worth doing and I trust him.
 
 I think a worthwhile goal would be to add support to pixman for doing
 a bunch of the conversions Mesa requires and then dropping the code in
 Mesa. Are you interested in doing that? I know Jason (Cc'd) is working
 on cleaning up a bunch of this code.
 
 Are you planning to contribute swizzling fast paths to pixman? The
 power-of-two-sized-component formats should be really easy to optimize
 using the SSE shuffle instructions.
 

Hi Matt, Jason,

Which parts of texture conversion are you Jason touching, does your
changes overlap with the patches I put here?

As for doing (more) Pixmanization for Mesa on this part I think I can do
it and start to look into making patches for Pixman to support Mesa
better. I hope to be away from keyboards for few weeks so it'll be
August when I start anything on this.

/Juha-Pekka
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 0/6] Enable Pixman for Mesa

2014-06-30 Thread Jason Ekstrand
On Mon, Jun 30, 2014 at 3:18 AM, Juha-Pekka Heikkila 
juhapekka.heikk...@gmail.com wrote:

 On 25.06.2014 23:47, Matt Turner wrote:
  On Wed, Jun 25, 2014 at 5:38 AM, Juha-Pekka Heikkila
  juhapekka.heikk...@gmail.com wrote:
  This is my old set which enable using Pixman on Mesa for some texture
  conversion fast paths. As is this passes Piglit quick set on my IVB.
 
  Pixman doesn't actually have fast paths for swizzling, like we're
  using in this series. I imagine improvements we're seeing here are
  simply because Mesa's code is slow.
 
  I never pursued this idea for a couple of reasons. One is that we
  should probably use the GPU to do the conversions in the ideal case.
  Also, pixman doesn't support floating-point formats. Some work has
  been done in the last year or so to make this much easier to implement
  though.
 
  The first reason above shouldn't block other improvements, and the
  second reason is fixable with some contributions to pixman. And pixman
  is really a trivial dependency, so that shouldn't be a problem.
 
  Soren thinks this is worth doing and I trust him.
 
  I think a worthwhile goal would be to add support to pixman for doing
  a bunch of the conversions Mesa requires and then dropping the code in
  Mesa. Are you interested in doing that? I know Jason (Cc'd) is working
  on cleaning up a bunch of this code.
 
  Are you planning to contribute swizzling fast paths to pixman? The
  power-of-two-sized-component formats should be really easy to optimize
  using the SSE shuffle instructions.
 

 Hi Matt, Jason,

 Which parts of texture conversion are you Jason touching, does your
 changes overlap with the patches I put here?


Juha-Pekka,
Sorry, I haven't had much of a chance to look at your patchs.  My stuff is
probably going to touch all of the texture upload code and (hopefully) give
us some speed improvements all-around.  In particular, I'm hoping to reduce
conversion to/from floating point and add generalized fast-paths whenever
possible.  That said, going directly to pixman may still be better in some
certain cases.  As Ken said, I'm not sure if pixman has actual fast-paths,
so it would be worth looking into what Mesa is doing different from Pixman.



 As for doing (more) Pixmanization for Mesa on this part I think I can do
 it and start to look into making patches for Pixman to support Mesa
 better. I hope to be away from keyboards for few weeks so it'll be
 August when I start anything on this.


Actually, that will work out fairly well.  I'm going to be hitting the
texture upload code pretty hard the next week or two and should have
results by the time you have a chance to start back up.  That way we won't
be stepping on each other too badly.

Also, what was your set-up for doing power comparisons?  As I dive into
this, I'd like to see how my results compare.

Thanks,
--Jason Ekstrand
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 0/6] Enable Pixman for Mesa

2014-06-25 Thread Juha-Pekka Heikkila
This is my old set which enable using Pixman on Mesa for some texture
conversion fast paths. As is this passes Piglit quick set on my IVB.

For general case this does not offer essentially better fps or such but
these were recently tested on Chromebook with HSW inside where it showed 
promising drop on Watt drain. With/without Pixman Mesa was compiled 
with march=corei7

Number here indicate % change in Watts, for comparison was used averages
of multiple runs. While Watt drain reduced performance remained +/- on 
the same level.

Javascript - Octane v20.457%
Page Rendering - Page Loading-0.280%
HTML5 Games - JSGameBench-2.275%
HTML5 Games - AngryBirds -4.483%
Canvas 2D - CanvasEarth  -4.003%
Canvas2D - FishTank 250 fish -3.176%
WebGL - EarthScreen  -2.959%
Browser Performance - RoboHornet -5.833%
WebGL - Aquarium 50 fish -4.448%
WebGL - Aquarium 100 fish-4.094%

/Juha-Pekka

Juha-Pekka Heikkila (6):
  mesa: Add Pixman library to configure.ac
  mesa: Add Pixman usage to texstore.c
  mesa: Pixman texture conversion rgb to abgr
  mesa: Pixman texture conversion argb to abgr
  mesa: Pixman texture conversion argb to rgb
  mesa: Pixman texture conversion rgb to rgb565 and rgb565_rev

 configure.ac |  32 +++
 src/mesa/main/texstore.c | 105 +--
 2 files changed, 134 insertions(+), 3 deletions(-)

-- 
1.8.1.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 0/6] Enable Pixman for Mesa

2014-06-25 Thread Matt Turner
On Wed, Jun 25, 2014 at 5:38 AM, Juha-Pekka Heikkila
juhapekka.heikk...@gmail.com wrote:
 This is my old set which enable using Pixman on Mesa for some texture
 conversion fast paths. As is this passes Piglit quick set on my IVB.

Pixman doesn't actually have fast paths for swizzling, like we're
using in this series. I imagine improvements we're seeing here are
simply because Mesa's code is slow.

I never pursued this idea for a couple of reasons. One is that we
should probably use the GPU to do the conversions in the ideal case.
Also, pixman doesn't support floating-point formats. Some work has
been done in the last year or so to make this much easier to implement
though.

The first reason above shouldn't block other improvements, and the
second reason is fixable with some contributions to pixman. And pixman
is really a trivial dependency, so that shouldn't be a problem.

Soren thinks this is worth doing and I trust him.

I think a worthwhile goal would be to add support to pixman for doing
a bunch of the conversions Mesa requires and then dropping the code in
Mesa. Are you interested in doing that? I know Jason (Cc'd) is working
on cleaning up a bunch of this code.

Are you planning to contribute swizzling fast paths to pixman? The
power-of-two-sized-component formats should be really easy to optimize
using the SSE shuffle instructions.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev