Follow Slashdot stories on Twitter


Forgot your password?

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 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:
  • Yay! (Score:4, Insightful)

    by buchner.johannes ( 1139593 ) on Friday March 07, 2014 @12:25PM (#46428395) Homepage Journal

    Cheers to the heros working on improving X. It's probably the most important piece of software on GNU/Linux. Real hackers working there on the most complex issues.

  • Re:Why? (Score:5, Insightful)

    by squiggleslash ( 241428 ) on Friday March 07, 2014 @01:38PM (#46428967) Homepage Journal

    The concept, as I understand it, is that at the moment in order to write a device driver for X11 you have to separately manage code that implements 2D and 3D graphic primitives. Given 2D operations are themselves a subset of 3D operations (even if the API doesn't reflect that), it makes sense to simply have device drivers implement the 3D parts. Then common wrapper code can implement the 2D, alleviating the driver developer of the burden of building and testing an entirely new block of code.

    It should make more reliable, as the same 2D code will be used for all drivers, and should end up being pretty solid. In the mean time, driver developers have more time to polish their 3D driver implementations. Win win. Maybe a slight performance hit, but probably not a significant one.

Genius is ten percent inspiration and fifty percent capital gains.