Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesIs There a GLINT in Your Future?


October 1995 / Core Technologies / Is There a GLINT in Your Future?

A close look at a coprocessor that accelerates 3-D graphics

Trevor Marshall and John Davey

Both the Pentium and the PowerPC deliver sufficient horsepower to display 3-D images on desktop computers. But as powerful as these processors are, to offer real-time support of 3-D imagery, they require an assist from dedicated hardware.

The GLINT chip from 3Dlabs is the most mature of all the chips, from several manufacturers, that will bring true 3-D graphics display capabilities to the desktop over the next few years. These chips won't produce images like you see in Hollywood films because they use a technique called Gouraud shading instead of the more photo-realistic ray-tracing mechanism. But they do produce images tha t can move fast enough to fool the eye into the illusion of three dimensions.

In this article, we will explain how the GLINT 300SX chip connects to external hardware and how a GLINT board produces fast real-time 3-D displays. We will also look at a few features that 3Dlabs added to the chip to make 3-D displays really sizzle.

3-D Display Basics

A lot of hardware and software technology goes into producing a 3-D graphics display system. Chips such as the GLINT 300SX can produce 300,000 Gouraud-shaded triangles per second, but very few software packages are currently capable of driving them to this capacity. Even a 120-MHz Pentium processor with a fast PCI bus connected to the GLINT is capable of generating only about 200,000 triangles per second.

Several factors limit the speed of 3-D operations. A lot of information has to be passed over the bus. It takes 29 32-bit parameters to describe each of the two shaded triangles that make up a polygon. This translates into a sustained data rate of 10 MBps, which is impractical over an ISA bus and even difficult for the PCI bus (see "Fast Transit," October 1992 BYTE). The applications software itself also has to keep track of an extra dimension of parameters, which places a further load on the CPU. So a ton of thought has been put into ways in which the graphics processor can reduce the computing load on the host CPU.

The GLINT not only handles multiple display windows (so only part of a screen needs updating between frames), it also keeps track of Z-buffer data (used to plot only those objects in the "front" of the image). In addition, the chip manages the alpha blending (transparency); fogging (which enhances the illusion of depth ); copying (which moves a cube of 3-D data, not just a 2-D image plane); and dithering (a technique for interpolating colors to make surfaces look smoother).

To do all this, GLINT uses two memory systems: a VRAM frame buffer that contains the actual pixel information, and a DRAM-based local buffer that contains the Z-buffer, alpha blending, and other 3-D housekeeping bits associated with each pixel in the display buffer.

Why So Many Pins?

The GLINT chip comes in a 304-pin package. It's a gate array made for 3Dlabs by IBM Microelectronics, and it looks similar to IBM's PowerPC 601 CPU. The size of the silicon die, however, is larger than that of the 601, and it has more transistors. One of the reasons there aren't too many good 3-D graphics display chips available is that, as the die size indicates, they tend to be pretty complex beasts. Luckily, despite its internal complexity, the GLINT hardware interface makes it really quite simple to integrate into a display system design.

As the figure "GLINT 300SX Interfaces" shows, in a typical GLINT display system, the chip can simultaneously access data from the PCI bus, a 64-bit-wide VRAM frame buffer memory, and a 48-bit-wide DRAM local buffer. Pins are also required to handle the VRAM and DRAM address buses.

The GLINT connects directly to the PCI bus, which eliminates the glue logic normally required to communicate to the bus. This also reduces a graphics board's component count and cost. The GLINT has an internally set PCI manufacturer's ID of 0x3d3d (clever -- 3Dlabs) and supports all the signals and registers defined in the PCI 2.0 standard. It has internal DMA, which allows either command or data blocks to be burst over the bus at around 20 MBps. This capability is important -- without burst mode, you can get a data rate of only 3 to 8 MBps on a PCI bus.

Connecting VRAM and DRAM to the GLINT is very easy indeed. The address bus is internally multiplexed, so you can just connect the GLINT address pin through a damping resistor to the address lines on the memory. The control and data lines connect in the same way. Again, no glue logic is necessary.

When the GLINT powers up, it senses the state of some of the data lines (which are pulled either up or down by res istors) and configures its internal logic to address the amount of RAM present. It also automatically sizes the data bus widths (bus widths of 32, 48, or 64 bits are supported, depending on whether you're addressing DRAM or VRAM). This lets you customize the display system for the exact features you need. Once you've considered a few control lines and redundant power and ground lines, all 304 pins have been accounted for.

The VRAM has another 64-bit data bus, which passes the serial pixel data to a RAMDAC. The latter component assembles the 64-bit stream into pixels of different sizes. These 64-bit chunks of data can be modified to produce eight 8-bit (256 colors) pixels, four 16-bit (thousands of colors) pixels, or two 24-bit (millions of colors) pixels, as determined by the RAMDAC's display mode. This pixel bus operates at a maximum speed of 150 megapixels per second.

Having all these separate buses gives the GLINT massive processing power and throughput. It can be receiving a PCI command, writi ng a new pixel to the VRAM, and reading mask and Z-buffer information from the local DRAM, all during the same system cycle. It would not be possible to do these operations all at once with a general-purpose CPU, like the PowerPC 601, which handles only one 64-bit data access at a time.

Video Features

As important as throughput is to a display's performance, for 3-D imagery, additional image-processing capabilities are crucial for fast screen drawing. The GLINT provides hardware support in a number of areas. Three worth mentioning in detail are antialiasing, color dithering, and screen-buffer clearing.

Antialiasing: This important graphics operation helps convince the eye that an image appears "real" and not computer-generated. When the display system draws a diagonal line, it does so by illuminating a set of pixels on the screen. The pixels in this line appear as discrete steps, particularly at the transition (or boundaries) between screen pixels. Antia liasing adds extra pixels to the line, which smoothes out these sharp boundaries.

The GLINT chip does this automatically by calculating the correct color and position for each pixel so that such boundary effects are minimized. The host software tells the GLINT to draw a line in 3-D space, and the GLINT draws it with depth perception and automatic antialiasing characteristics. This allows the applications software to operate purely in a fast vector-drawing mode. The screen at left shows a typical 3-D vector program whose output has been enhanced using the built-in antialiasing and fogging effects.

Color dithering: When it is shading a surface, the GLINT calculates all the pixels with 32-bit accuracy. Only at the end of the pipeline does it convert them to the 24-, 16-, or 8-bit color display modes. A dithering unit at the end of the graphics pipeline takes the 32-bit color value and tries to display it so that, even if only 256 colors are available on-screen, the eye interpolates between the different colored pixels and perceives an intermediate color value. The GLINT does this interpolation inside a 4- by 4-pixel matrix (16 pixels) with no speed penalty at all. Surprisingly, it works very well, assisted by the additional pixel-averaging effect of the shadow mask apertures on your CRT.

Clearing the screen buffer: The frame buffer VRAM has a built-in "fast clear" hardware mode that allows it to be cleared very quickly indeed. But in a 3-D graphics display system, it is also important to clear all the Z-buffer and alpha information in the DRAM local buffer.

However, DRAM does not have a fast-clear hardware capability. To clear it, you typically have to write a new value to every memory cell. This is not practical to do at the typical 30 frames per second necessary to achieve smooth motion in a 3-D display environment. So the GLINT Z-buffer has a feature called "fast clear."

Instead of clearing the entire Z-buffer on every frame, the GLINT divides th e screen into 16 or 256 segments that get cleared only on sequential frames. The GLINT keeps track of which segments have been cleared, and if you are drawing into a section that hasn't been cleared recently, it uses a cleared pixel value when calculating the new Z-buffer value. Tag bits, kept in the local buffer DRAM memory, indicate whether or not a segment has been cleared.

The Future Is 3-D, but Faster

The GLINT is the first of a series of 3-D graphics controllers to come to market. While other manufacturers are producing similar chips that are less expensive, 3Dlabs is concentrating on building display controllers that define the state of the art for desktop graphics systems. Future versions of the GLINT chip will be able to directly handle texture mapping, and no doubt they'll run faster.


GLINT 300SX Interfaces

illustration_link (8 Kbytes)

The GLINT as a video controller in a PCI-bus display board. Little glue logic is required to connect the chip to the PCI and RAM buses.


Fogging Clears Up the Depth Issue

screen_link (67 Kbytes)

The GLINT displaying a 3-D object with fogging, which enhances the illusion of depth.


Trevor Marshall, a consulting editor for BYTE, is chairman of YARC Systems. John Davey is a project engineer at YARC S ystems who has worked on a GLINT display board. They can be reached on the Internet at trevor@yarc.com and john@yarc.com , respectively.

Up to the Core Technologies section contentsGo to next article: Weaving a ThreadSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network