Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
X

Glamor, X11's OpenGL-Based 2D Acceleration Driver, Is Becoming Useful 46

The Glamor driver for X11 has sought for years to replace all of the GPU-specific 2D rendering acceleration code in X.org with portable, high performance OpenGL. Unfortunately, that goal was hampered by the project starting in the awkward time when folks thought fixed-function hardware was still worth supporting. But, according to Keith Packard, the last few months have seen the code modernized and finally maturing as a credible replacement for many of the hardware-specific 2D acceleration backends. From his weblog: "Fast forward to the last six months. Eric has spent a bunch of time cleaning up Glamor internals, and in fact he’s had it merged into the core X server for version 1.16 which will be coming up this July. Within the Glamor code base, he's been cleaning some internal structures up and making life more tolerable for Glamor developers. ... A big part of the cleanup was a transition all of the extension function calls to use his other new project, libepoxy, which provides a sane, consistent and performant API to OpenGL extensions for Linux, Mac OS and Windows." Keith Packard dove in and replaced the Glamor acceleration for core text and points (points in X11 are particularly difficult to accelerate quickly) in just a few days. Text performance is now significantly faster than the software version (not that anyone is using core text any more, but "they’re often one of the hardest things to do efficiently with a heavy weight GPU interface, and OpenGL can be amazingly heavy weight if you let it."). For points, he moved vertex transformation to the GPU getting it up to the same speed as the software implementation. Looking forward, he wrote "Having managed to accelerate 17 of the 392 operations in x11perf, it’s pretty clear that I could spend a bunch of time just stepping through each of the remaining ones and working on them. Before doing that, we want to try and work out some general principles about how to handle core X fill styles. Moving all of the stipple and tile computation to the GPU will help reduce the amount of code necessary to fill rectangles and spans, along with improving performance, assuming the above exercise generalizes to other primitives." Code is available in anholt's and keithp's xserver branches.
This discussion has been archived. No new comments can be posted.

Glamor, X11's OpenGL-Based 2D Acceleration Driver, Is Becoming Useful

Comments Filter:
  • Vs compositing? (Score:3, Interesting)

    by Anonymous Coward on Friday March 07, 2014 @12:12PM (#46428291)

    I wonder, how does it relate to compositing engine? Ain't surfaces already drawn using GPU accelerated function when using GL-based compositing ?

  • by pavon ( 30274 ) on Friday March 07, 2014 @12:51PM (#46428601)

    The cairo-ickle blog [wordpress.com] has maintained very interesting benchmarks of the different cairo [cairographics.org] rendering backends. The short story is that every hardware accelered backend except for sandybridge SNA has performed worse than the software implementation. And in some cases the hardware acceleration is significantly less stable. I'm curious to see if this finally pushes Glamor over the hump and makes it faster than the software path.

  • by Chemisor ( 97276 ) on Friday March 07, 2014 @02:04PM (#46429203)

    I wonder if the differences are due to extracting the result from the GPU. There is no doubt whatsoever that doing 2D with OpenGL on the GPU will be faster than a software rasterizer - what kills the performance in these tests is having to copy the result back to the CPU so it can be displayed in an X window. Once X windows are fully composited and output graphics never leave the GPU memory, the hardware acceleration will no doubt prove to be the fastest.

  • Comment removed (Score:4, Interesting)

    by account_deleted ( 4530225 ) on Friday March 07, 2014 @03:16PM (#46429797)
    Comment removed based on user account deletion

"Gravitation cannot be held responsible for people falling in love." -- Albert Einstein

Working...