[PATCH xserver 0/3] glamor: Accelerate XY format images

Keith Packard keithp at keithp.com
Sat Oct 1 05:43:59 UTC 2016


I took Adam's code to speed up XY format bitmaps and generalized that
for XY format pixmaps too; that speeds up small pixmaps by a
bunch. Then I went and wrote some much faster XY bitmap code which
expands the image with the GPU (just like core text). That turns out
to be faster for large images, but slower for small images due to GL
overhead.

On my Haswell laptop running Xephyr with -glamor-skip-present:

1: xy_old
2: xy_new

       1                 2                 Operation
------------   -------------------------   -------------------------
     10900.0        99900.0 (     9.165)   PutImage XY 10x10 square 
      1740.0         2160.0 (     1.241)   PutImage XY 100x100 square 
        83.2           90.4 (     1.087)   PutImage XY 500x500 square 
     11800.0       351000.0 (    29.746)   PutImage XYBitmap 10x10 square 
      6280.0        81600.0 (    12.994)   PutImage XYBitmap 100x100 square 
       752.0        14300.0 (    19.016)   PutImage XYBitmap 500x500 square 

I'd like to know why the GPU expansion version has so much GL
overhead; it "should" be faster for everything as it uploads a lot
less data to the GPU. I'd also like to try writing an XYPixmap that
did all of the plane merging in the fragment shader. That "should" be
faster for large images than merging on the CPU. I tried just using my
XYBitmap code in a loop with a rasterop, but that's actually slower
than using the CPU (at least on my machine). Presumably doing 24
texture uploads isn't all that fast?



More information about the xorg-devel mailing list