[Mesa-dev] [PATCH 0/3] Pixman for Mesa

Jason Ekstrand jason at jlekstrand.net
Thu Aug 28 09:18:30 PDT 2014


Juha-Pekka,
I'll try and look at the actual patches here next week.  For now, a couple
quick comments.


On Thu, Aug 28, 2014 at 5:51 AM, Juha-Pekka Heikkila <
juhapekka.heikkila at gmail.com> wrote:

> Here is new version of my patch set for using Pixman in Mesa
> for texture format conversions, mostly complete rewrite after recent
> changes in src/mesa/main/texstore.c. This set does not cause
> regressions in Piglit quick set on SNB.
>
> Here are some timings I came up from with this set when running
> glTexImage2d in a loop (on SNB, IVB was comparable):
>

Did you test this on HSW?  How did it look there?  Also, please provide the
type, format, and internal format that you're using in your tests.
differences between format and internal format can make a huge difference
on what path you hit.

                                      No Pixman       Pixman     %
> GL_UNSIGNED_INT_8_8_8_8,GL_BGRA     2816.648926  2148.145020  0.76
> GL_UNSIGNED_SHORT_5_6_5,GL_RGB     19560.732422  2062.745117  0.11
> GL_UNSIGNED_SHORT_5_6_5_REV,GL_RGB 19525.605469  4035.947998  0.21
>

I'm a little skeptical of the 8888 numbers.  In my testing on my HSW
laptop, the C path we have now was very close to the SSSE3 fast-path I
cooked up to test against.  There could be a difference in memory bandwidth
for certain instructions though.  That's why I'd like to see HSW, SNB, and
IVB numbers side-by-side for that one.

For 565, I can believe it.  I think we're doing something colossally stupid
inside mesa whenever the input is 565.  That said, this patch:
http://lists.freedesktop.org/archives/mesa-dev/2014-August/066529.html may
help with it some.  It should enable memcpy when you're doing a 565 upload
to a 565 texture.  That said, the 565 to anything else path is probably
still terrible.  It would be worth looking into what mesa is doing there
(look in pack.c).  Given the 5x or 10x speedup, we're probably converting
to float or something stupid like that.


> For these tests Mesa was compiled with "-march=native -O2". There were some
> formats which were clearly faster on current Mesa implementation than what
> Pixman gave me, for example RGB888 to RGBA8888 conversion took about twice
> the time of what current Mesa implementation does and r10g10b10a2 was even
> much slower. Generally 16 bit formats are much faster on Pixman but there
> are differences in formats and types which prevented from enabling some
> formats for now, most notable missing GL_UNSIGNED_SHORT_4_4_4_4
>
> /Juha-Pekka
>
> Juha-Pekka Heikkila (3):
>   mesa: Add Pixman library to configure.ac
>   mesa: Add Pixman usage to texstore.c
>   mesa: Pixman texture conversion for argb path
>
>  configure.ac             |  30 ++++++++++
>  src/mesa/main/texstore.c | 149
> +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 179 insertions(+)
>
> --
> 1.8.5.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140828/96fe183e/attachment.html>


More information about the mesa-dev mailing list