主权项 |
1. A method of performing a depth test operation in a graphics processing pipeline that includes a plurality of processing stages including a rasteriser that rasterises input primitives to generate graphics fragments to be processed, each graphics fragment having one or more sampling points associated with it, and a renderer that processes fragments generated by the rasteriser to generate output fragment data; and in which the rasteriser, when it receives a primitive to be rasterised, for each of one or more patches representing respective different regions of a render output to be generated, tests the patch against the edges of the primitive to determine if the primitive at least partially covers the patch; the method comprising:
performing an early depth test for a primitive in respect of a patch of the render output that the primitive has been found by the rasteriser at least partially to cover, by: determining from depth test information associated with the patch, the number of different depth value regions associated with the patch, and if there is more than one depth value region associated with the patch, the distribution of the depth value regions within the patch; and using the determined number of different depth value regions associated with the patch, and if there is more than one depth value region associated with the patch, the distribution of the depth value regions within the patch, to determine the depth value region or regions associated with the patch that the primitive should be depth tested against; and performing a depth test or tests for the primitive in respect of the patch of the render output using depth values associated with the primitive and with the respective determined depth value region or regions associated with the patch. |