摘要 |
A graphics processing unit (GPU) efficiently performs 3-dimensional (3-D) clipping using processing units used for other graphics functions. The GPU includes first and second hardware units and at least one buffer. The first hardware unit performs 3-D clipping of primitives using a first processing u nit used for a first graphics function, e.g., an ALU used for triangle setup , depth gradient setup, etc. The first hardware unit may perform 3-D clippin g by (a) computing clip codes for each vertex of each primitive, (b) determi ning whether to pass, discard or clip each primitive based on the clip codes for all vertices of the primitive, and (c) clipping each primitive to be cl ipped against clipping planes. The second hardware unit computes attribute c omponent values for new vertices resulting from the 3-D clipping, e.g., usin g an ALU used for attribute gradient setup, attribute interpolation, etc. Th e buffer(s) store intermediate results of the 3-D clipping. |