A system and methods for implementing histogram computation, for example,
into the rasterization pipeline of a 3-D graphics system, are provided.
With the histogram computation mechanism, statistical histogram data may
be generated for input data of any kind or retrieved from any source that
may be specified in a 2-D array or specified in an immediate fashion to
specialized data processing hardware. Depending on the nature of the
input data, the data may be filtered before passing the data to data
processing hardware for further processing. The data processing hardware
may then apply an additional function to the input data set before
calculation of the histogram data. Then, at some point, the data
processing hardware may apply a function to the data to map the derived
data to a real-valued function that can then be quantized to a histogram
element in the range specified from zero to the number of histogram
elements minus one. The corresponding element in this histogram is then
incremented according to the data received as it passes through the
graphics processor. Advantageously, relatively expensive host computing
resources are conserved, and developers are insulated from the tedious
details required of implementing histogram computation from the ground up
each time it becomes desirable to compute histogram data in connection
with an application.