Conservative Rasterization Using Gradients
AssigneeImagination Technologies Limited
InventorCasper Van Benthem
Life of this patent
Estimating the term…
Abstract
Conservative rasterization hardware comprises hardware logic arranged to perform an edge test calculation for each edge of a primitive and for two corners of each pixel in a microtile. The two corners that are used are selected based on the gradient of the edge and the edge test result for one corner is the inner coverage result and the edge test result for the other corner is the outer coverage result for the pixel. An overall outer coverage result for the pixel and the primitive is calculated by combining the outer coverage results for the pixel and each of the edges of the primitive in an AND gate. The overall inner coverage result for the pixel is calculated in a similar manner.
Claims20
A graphics processing pipeline arranged to render in a rendering space, wherein the rendering space is sub-divided into a plurality of tiles, each tile is sub-divided into a plurality of microtiles, each microtile comprising an identical arrangement of pixels, the graphics processing pipeline comprising conservative rasterization hardware, wherein the conservative rasterization hardware comprises:
- a plurality of first hardware sub-units each arranged to calculate, for a different edge of a primitive, an outer coverage result for the edge and an inner coverage result for the edge for each pixel in a microtile, and
- a plurality of second hardware sub-units each arranged to calculate, for a different pixel in a microtile, an outer coverage result for the primitive and an inner coverage result for the primitive;
- wherein each first hardware sub-unit comprises:
- quadrant selection hardware arranged to identify a first and a second pixel corner position using a gradient of a vector defining the edge of the primitive, and
- edge test calculation hardware arranged to calculate, for each pixel corner position in each of the pixels in the microtile a value indicating whether the pixel corner position is to the left of the edge, wherein the value for the first pixel corner position is the outer coverage result for the pixel and the value for the second pixel corner position is the inner coverage result for the pixel;
- and wherein each second hardware sub-unit comprises:
- a first plurality of AND gates, one for each pixel in the microtile, and each arranged to receive as inputs an outer coverage result for the pixel and each of the edges, one from each of the first hardware sub-units and wherein an output of the AND gate is the outer coverage result for the pixel and the primitive, and
- a second plurality of AND gates, one for each pixel in the microtile, and each arranged to receive as inputs an inner coverage result for the pixel and each of the edges, one from each of the first hardware sub-units and wherein an output of the AND gate is the inner coverage result for the pixel and the primitive.
A method of performing conservative rasterization in a graphics pipeline arranged to render in a rendering space, wherein the rendering space is sub-divided into a plurality of tiles, each tile is sub-divided into a plurality of microtiles, each microtile comprising an identical arrangement of pixels, the method comprising:
- for each edge of a primitive, identifying, based on a gradient of a vector defining the edge, a first and a second pixel corner position;
- and
- for each pixel in the microtile and for each edge of the primitive, calculating a first value indicating whether the first pixel corner position is to the left of the edge, wherein the first value is an outer coverage result for the pixel;
- and calculating a second value indicating whether the second pixel corner position is to the left of the edge, wherein the second value is an inner coverage result for the pixel;
- and
- combining outer coverage results for the pixel for each edge of the primitive in an AND gate to generate and output an outer coverage result for the pixel and the primitive;
- and
- combining inner coverage results for the pixel for each edge of the primitive in an AND gate to generate and output an inner coverage result for the pixel and the primitive.
A non-transitory computer readable storage medium having stored thereon computer executable code that when executed causes at least one processor to perform conservative rasterization in a graphics pipeline arranged to render in a rendering space, wherein the rendering space is sub-divided into a plurality of tiles, each tile is sub-divided into a plurality of microtiles, each microtile comprising an identical arrangement of pixels, by:
- for each edge of a primitive, identifying, based on a gradient of a vector defining the edge, a first and a second pixel corner position;
- and
- for each pixel in the microtile and for each edge of the primitive, calculating a first value indicating whether the first pixel corner position is to the left of the edge, wherein the first value is an outer coverage result for the pixel;
- and calculating a second value indicating whether the second pixel corner position is to the left of the edge, wherein the second value is an inner coverage result for the pixel;
- combining outer coverage results for the pixel for each edge of the primitive in an AND gate to generate and output an outer coverage result for the pixel and the primitive;
- and
- combining inner coverage results for the pixel for each edge of the primitive in an AND gate to generate and output an inner coverage result for the pixel and the primitive.
Dependencies are inferred from the claim text.