[0008] In an embodiment of the invention, a fragment processing unit includes a fragment shader distributor, a fragment shader collector, and a plurality of fragment shader pipelines. Each fragment shader pipeline is adapted to execute 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. The fragment shader distributor 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 or until no more fragments arrive within a preset duration. The fragment shader distributor then selects another fragment shader pipeline. The portion of the stream of fragments that is sent to the selected fragment shader pipeline is called a fragment stream segment. 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. The fragment shader collector follows the same selection order as the fragment shader distributor to maintain the order of the stream of fragments.
[0009] In an embodiment, a graphics processing subsystem including a fragment processor adapted to determine at least one value for each fragment of a stream of fragments. The fragment processor comprises a first fragment shader pipeline adapted to execute at least a portion of a fragment shader program on a segment of fragments. The fragment processor also includes a fragment shader distributor. The fragment shader distributor is adapted to receive a stream of fragments, to select the first fragment shader pipeline to execute a first portion of the stream of fragments, and, for each received fragment of the stream, to determine if the received fragment fits within the segment of fragments of the selected fragment shader pipeline, and to dispatch the received fragment to the selected fragment shader pipeline in response to a determination that the received fragment does fit within the segment of fragments of the selected fragment shader pipeline. A fragment shader collector is adapted to select the first fragment shader pipeline and to retrieve each fragment in the segment of fragments from the fragment shader pipeline selected by the fragment shader collector in response to a signal indicating that the fragment shader pipeline selected by the fragment shader collector has completed the execution of the fragment shader program on the segment of fragments.
[0010] In a further embodiment, in being adapted to determine if the received fragment fits within the segment of fragments of the first fragment shader pipeline, the fragment shader distributor is adapted to determine some resource requirements of the received fragment, to determine a measurement of available resources of the selected fragment shader pipeline, and to generate a signal indicating that the received fragment fits within the segment of fragments of the selected fragment shader pipeline in response to a determination that the resource requirements of the received fragment do not exceed the measurement of the available resources of the selected fragment shader pipeline.
[0011] In another embodiment, the graphics processing subsystem includes a second fragment shader pipeline adapted to execute at least a portion of a fragment shader program on a segment of fragments. In response to a determination that the received fragment does fit within the segment of fragments of the selected fragment shader pipeline, the fragment shader distributor is adapted to select the second fragment shader pipeline and to dispatch the received fragment to the selected fragment shader pipeline. In an additional embodiment, the fragment shader collector is adapted to receive a signal indicating the selection of the second fragment shader pipeline. In response to the signal, the fragment shader collector is adapted to select the second fragment shader pipeline. The fragment shader collector is further adapted to retrieve each fragment in the segment of fragments from the fragment shader pipeline selected by the fragment shader collector in response to a signal indicating that the fragment shader pipeline selected by the fragment shader collector has completed the execution of the fragment shader program on the segment of fragments.