Computer graphics display systems typically comprise a frame buffer memory which stores the color and Z coordinate associated with each pixel to be displayed on the monitor of the computer graphics display system. A frame buffer controller of the computer graphics display system controls the process of writing the Z coordinates and the colors of the pixels to the frame buffer memory. In many high-performance computer graphics display systems, Z buffer depth comparison tests are used to determine whether a new Z coordinate received in the frame buffer controller corresponds to a pixel that will be visible when displayed, or whether the pixel associated with the new Z coordinate will be occluded or hidden if displayed. If the pixel will be occluded, it is unnecessary to write the Z coordinate and the associated color to the frame buffer memory and the pixel can be discarded. On the other hand, if the pixel will be visible, the Z coordinate and the associated color must be written to the frame buffer memory.
In these types of systems, Z buffer depth comparison tests are performed by reading the old Z coordinate for the pixel from the Z buffer, comparing the old Z coordinate with the new Z coordinate, and, if the new Z coordinate passes the Z buffer depth comparison test, writing the new Z coordinate and the associated pixel color into the Z buffer and image buffer, respectively, of the frame buffer memory. Once these steps have been performed, the next pixel is processed in an identical manner.
Although this type of depth comparison test is needed to occlude hidden surfaces, performing depth comparison operations for each new Z coordinate received in the frame buffer controller requires significant memory bandwidth for reading the Z coordinates from the Z buffer.
Accordingly, a need exists for a method and apparatus for performing Z buffer depth comparison tests which reduce the number of reads to the frame buffer memory and thereby improve memory bandwidth efficiency.