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 at least one pixel primitive;
a shader engine configured to perform shading operations on pixels associated with the at least one pixel primitive;
a Z-raster operations (ZROP) unit configured to compute Z-data for each of the pixels;
a Z-resolve engine configured to determine, for each pixel, whether the pixel is to be kept or discarded based on the Z-data associated with the pixel; and
a pre-raster operations (PROP) unit configured to modify a data flow path between the shader engine and the ZROP unit to support both early Z-mode and late Z-mode, wherein the pixels associated with the at least one 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 pixels 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 optimizing graphics rendering efficiency by 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. Efficiency is gained by relieving the shader engine of unnecessary work whenever possible by discarding pixels before they enter the shader engine. The same functional units are utilized in both early Z and late Z configurations, minimizing any additional hardware required for implementation.
39 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 at least one pixel primitive;
a shader engine configured to perform shading operations on pixels associated with the at least one pixel primitive;
a Z-raster operations (ZROP) unit configured to compute Z-data for each of the pixels;
a Z-resolve engine configured to determine, for each pixel, whether the pixel is to be kept or discarded based on the Z-data associated with the pixel; and
a pre-raster operations (PROP) unit configured to modify a data flow path between the shader engine and the ZROP unit to support both early Z-mode and late Z-mode, wherein the pixels associated with the at least one 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 pixels 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 at least one pixel primitive;
a shader engine configured to perform shading operations on pixels associated with the at least one pixel primitive;
a Z-raster operations (ZROP) unit configured to compute Z-data for each of the pixels;
a Z-resolve engine configured to determine, for each pixel, whether the pixel is to be kept or discarded based on the Z-data associated with the pixel; and
a pre-raster operations (PROP) unit configured to modify a data flow path between the shader engine and the ZROP unit to support both early Z-mode and late Z-mode, wherein the pixels associated with the at least one 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 pixels 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 the configuration of the graphics rendering pipeline from early Z-mode to late Z-mode or from late Z-mode to early Z-mode; 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