Wednesday, May 30, 2012

Path rendering on the GPU

Archimedes of Syracuse famously claimed "give me a place to stand on, and I will move the Earth." Understanding the principle of the lever is key for being successful in technology.

In the early days of computer graphics, the general principle was to draw wireframe diagrams using hardware that can change the voltages in a CRT to move a point that can be on or off, thus tracing vectors. A programmer would write a sequence of commands, called display list, that the hardware would interpret in a loop.

John Warnock, a researcher at the Evans & Sutherland research lab on Castro Street in Mountain View, invented a lever based on the idea of using something like the richer programming language Forth instead of the rigid command sequence in the display list. He moved to PARC and with Martin Newell created JaM, for John and Martin.

At that time, PARC had invented a new kind of raster display called the bitmap display. Basically, a portion of the RAM was mapped on the raster display, and a barrel shifter made operating on individual pixels very fast via RasterOp or BitBlt and CharBlt procedures.

John invented a second lever: the path as a new primitive for JaM, replacing the line segment and Bresenham. This made possible the creation of rich graphics instead of the wireframe diagrams of the past. Because JaM was a program, it was resolution independent and enabled WYSIWYG. A particular object of interest was the glyph, which could be represented as an outline instead of a bitmap, thus enabling desktop publishing (DTP).

JaM had some performance issues and also some design flaws, like the print order of pages could not be changed. Fortunately, PARC had top rated microcode specialists who could make primitives run very fast, and computer language experts that could express concepts very cleanly and general. Also, the pixel arithmetic had to be absolutely bullet-proof. Thus Interpress was born.

Unfortunately, Xerox refused to understand what they had and senior management decided to go into the typewriter business instead (no, the $4,900 Memorywriter was not a joke, they really believed it was better than a PC). Warnock and his boss Chuck Geschke left to start Adobe. Xerox let them have JaM, which evolved into Postscript. A few years later Interpress, with some ideas from Interscript, became PDF. In all this, path rendering was the key lever.

Recently this lever raised to a new level with a contribution by Mark Kilgard, who succeeded in implementing a path renderer on the GPU. This is critical for low-power mobile devices and the new HTML5 technology.

If you missed GTC 2012, you can view his detailed presentation at this link:, and if you want to try out the new OpenGL drivers, you can find everything you need at this link: