EDGE AND DEPTH PROCESSING HARDWARE
FIG3B is a schematic diagram showing the edge vectors for various primitives
Each primitive has a plurality of edge equations and a depth equation associated with them (i.e. the edge equations and depth equation define the primitive). In the case of a triangular primitive 31 there are three edge equations (as shown in FIG3B) whereas for a primitive which is rectangular 32 or a parallelogram 33, there are four edge equations (although in such cases there is a pre-defined relationship between the equations for opposite pairs of edges, as described below). Each of the edge equations is a vector of the form: fxy=Ax+By+C where A, B and C are constant coefficients specific to the polygon edge (and hence may be precalculated) and C has been pre-adjusted such that the scene origin is translated to the tile origin and these may be referred to herein as 'edge-specific coefficients'. As a primitive has multiple edges (e.g. three for a triangle primitive 31), the edge test is performed for each edge. If the edge equations for a primitive are defined so that the vectors rotate around the primitive in a clockwise direction (as shown graphically in FIG3B), then the subsample position is within the primitive if it lies on or to the right of each edge vector. Therefore, the subsample position is within the primitive if f(x,y) is not negative (i.e. it is zero or positive) for each of the edge vectors. Consequently, if the edge test hardware 302 outputs a single bit (e.g. the most-significant bit, MSB, of the result f(x,y)), then the outputs from the edge test hardware 302 for each of the edges (e.g. the three or four edges) can be combined using an AND gate and the subsample position is within the primitive if the output of the AND gate is a '1'. In other examples, the edge test hardware 302 may output more than a single bit (e.g. two bits) so that it can be determined if a subsample position lies exactly on the edge of a primitive.
schematic diagram
304
hardware
302
edge test hardware
33
parallelogram
31
primitive
212
depth calculation hardware
32
rectangle
['1. A graphics processing pipeline (200) arranged to render in a rendering space (100), wherein the rendering space (100) is sub-divided into a plurality of tiles (102), each tile is sub-divided into a plurality of microtiles (104), each microtile comprising an identical arrangement of pixels (106) and each pixel comprising an arrangement of one or more subsample positions (108), the graphics processing pipeline comprising edge test and/or depth calculation hardware (212) and wherein the edge test and/or depth calculation hardware comprises one or more hardware arrangements (400, 420) each arranged to perform an edge test or a depth calculation using a sum-of-products, each hardware arrangement comprising: a microtile component hardware element (402) comprising hardware logic arranged to calculate a first output using the sum-of-products and coordinates of a microtile within a tile in the rendering space; a plurality of pixel component hardware elements (404, 424), each comprising hardware logic arranged to calculate one of a plurality of second outputs using the sum-of-products and coordinates for different pixels defined relative to an origin of the microtile; one or more subsample component hardware elements (406), each comprising hardware logic arranged to calculate a third output using the sum-of-products and coordinates for a subsample position defined relative to an origin of a pixel; a plurality of adders arranged to generate a plurality of output results for the sum-of-products in parallel by combining, for each output result, a different combination of the first output, one of the plurality of second outputs and a third output.', '7. The graphics processing pipeline according to any of the preceding claims, wherein the edge test and/or depth calculation hardware comprises at least one hardware arrangement arranged to perform an edge test, wherein the sum-of-products corresponds to an edge vector of a primitive.']