Optimizing a graphics rendering pipeline using early Z-mode
First Claim
1. A configurable graphics rendering pipeline for processing graphics primitives, the graphics rendering pipeline comprising:
- a setup engine configured to determine whether processing should proceed in early Z-mode or late Z-mode;
a raster engine configured to receive a geometry primitive from the setup engine and convert the geometry primitive into one or more pixel primitives;
a shader engine configured to perform shading operations on one or more samples associated with a pixel primitive;
a Z-raster operations (ZROP) unit configured to perform Z-testing on each of the samples; and
a pre-raster operations (PROP) unit configured to modify, via one or more multiplexers, a data flow path between the shader engine and the ZROP unit to support both early Z-mode and late Z-mode, wherein the PROP unit includes a Z-resolve engine that is configured in both early Z-mode and late Z-mode to discard samples that do not pass the Z-testing performed by the ZROP unit,wherein the samples associated with the pixel primitive are processed first by the ZROP unit and the Z-resolve engine and then by the shader engine when the graphics rendering pipeline is configured for early Z-mode, and the samples are processed first by the shader engine and then by the ZROP unit and the Z-resolve engine when the graphics rendering pipeline is configured for late Z-mode.
1 Assignment
0 Petitions
Accused Products
Abstract
One embodiment of the present invention sets forth an architecture for advancing the Z-test operation prior to pixel shading whenever possible. The current rendering state, as maintained by the setup engine, determines whether advancing the Z-test function above the shader engine for “early” Z-testing is possible or whether the Z-test function should be deferred until after shading operations for “late” Z-testing. Data is dynamically routed to each processing engine in the pipeline, so that the appropriate data flow for either early Z or late Z is dynamically constructed, as determined by the current rendering state. The same functional units are utilized in both early Z and late Z configurations.
22 Citations
20 Claims
-
1. A configurable graphics rendering pipeline for processing graphics primitives, the graphics rendering pipeline comprising:
-
a setup engine configured to determine whether processing should proceed in early Z-mode or late Z-mode; a raster engine configured to receive a geometry primitive from the setup engine and convert the geometry primitive into one or more pixel primitives; a shader engine configured to perform shading operations on one or more samples associated with a pixel primitive; a Z-raster operations (ZROP) unit configured to perform Z-testing on each of the samples; and a pre-raster operations (PROP) unit configured to modify, via one or more multiplexers, a data flow path between the shader engine and the ZROP unit to support both early Z-mode and late Z-mode, wherein the PROP unit includes a Z-resolve engine that is configured in both early Z-mode and late Z-mode to discard samples that do not pass the Z-testing performed by the ZROP unit, wherein the samples associated with the pixel primitive are processed first by the ZROP unit and the Z-resolve engine and then by the shader engine when the graphics rendering pipeline is configured for early Z-mode, and the samples are processed first by the shader engine and then by the ZROP unit and the Z-resolve engine when the graphics rendering pipeline is configured for late Z-mode. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer system configured to process graphics primitives, the computer system comprising:
-
a memory; and a processing unit that includes a configurable graphics rendering pipeline having; a setup engine configured to determine whether processing should proceed in early Z-mode or late Z-mode; a raster engine configured to receive a geometry primitive from the setup engine and convert the geometry primitive into one or more pixel primitives; a shader engine configured to perform shading operations on one or more samples associated with a pixel primitive; a Z-raster operations (ZROP) unit configured to perform Z-testing on each of the samples; and a pre-raster operations (PROP) unit configured to modify, via one or more multiplexers, a data flow path between the shader engine and the ZROP unit to support both early Z-mode and late Z-mode, wherein the PROP unit includes a Z-resolve engine that is configured in both early Z-mode and late Z-mode to discard samples that do not pass the Z-testing performed by the ZROP unit, wherein the samples associated with the pixel primitive are processed first by the ZROP unit and the Z-resolve engine and then by the shader engine when the graphics rendering pipeline is configured for early Z-mode, and the samples are processed first by the shader engine and then by the ZROP unit and the Z-resolve engine when the graphics rendering pipeline is configured for late Z-mode. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A method for switching the configuration of a graphics rendering pipeline between early Z-mode and late Z-mode, the method comprising:
-
receiving a geometry primitive; determining whether the graphics rendering pipeline is configured for early Z-mode or for late Z-mode; determining whether to switch, via one or more multiplexers included in a pre-raster operations (PROP) unit, the configuration of the graphics rendering pipeline from early Z-mode to late Z-mode or from late Z-mode to early Z-mode, wherein the PROP unit further includes a Z-resolve engine that is configured in both early Z-mode and late Z-mode to discard samples that do not pass the Z-testing performed by a Z-raster operations (ZROP) unit; and executing a flush operation to complete in-progress work in the graphics rendering pipeline, if the configuration of the graphics rendering pipeline is to be switched. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification