1. A graphics rendering pipeline for processing graphics primitives, the graphics rendering pipeline comprising: a raster engine configured to receive a geometry primitive and convert the geometry primitive into one or more pixel primitives, wherein at least one work transaction is associated with each pixel primitive; a shader engine configured to perform shading operations on one or more samples associated with a pixel primitive according to a Z-mode flag extracted from the at least one work transaction associated with the pixel primitive; a Z-raster operations (ZROP) unit configured to perform Z-testing on each of the samples according to the Z-mode flag extracted from the at least one work transaction associated with the pixel primitive; a Z-resolve engine configured to determine, for each sample, whether the sample is to be kept or discarded based on the Z-test results associated with the sample; 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 PROP unit includes at least one fork and join structure that is configured to join two different data flow paths by selecting one of the two different data flow paths when a last work transaction for a packet is received; and a pipeline configuration unit upstream of the PROP unit configured to determine whether the at least one work transaction associated with the pixel primitive should be processed in early Z-mode or late Z-mode and to set the Z-mode flag within each work transaction indicating whether data included within the at least one work transaction associated with the pixel primitive should be processed in early Z-mode or late Z-mode; 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 at least one work transaction associated with the pixel primitive has a Z-mode flag setting indicating that the at least one work transaction should be processed in 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 at least one work transaction associated with the pixel primitive has a Z-mode flag setting indicating that the at least one work transaction should be processed in late Z-mode.