A fragment processor includes a fragment shader distributor, a fragment
shader collector, and a plurality of fragment shader pipelines. Each
fragment shader pipeline executes a fragment shader program on a segment
of fragments. The plurality of fragment shader pipelines operate in
parallel, executing the same or different fragment shader programs. The
fragment shader distributor receives a stream of fragments from a
rasterization unit and dispatches a portion of the stream of fragments to
a selected fragment shader pipeline until the capacity of the selected
fragment shader pipeline is reached. The fragment shader distributor then
selects another fragment shader pipeline. The capacity of each of the
fragment shader pipelines is limited by several different resources. As
the fragment shader distributor dispatches fragments, it tracks the
remaining available resources of the selected fragment shader pipeline. A
fragment shader collector retrieves processed fragments from the
plurality of fragment shader pipelines.