1. A method of anti-aliasing, comprising: computing, by a graphics processing unit during a first processing pass of a plurality of graphics primitives, z data for multiple samples of each pixel in an image to generate a multi-sample z buffer; setting a stencil function to pass for only one of two or more graphics primitives that cover a sample location when tested against a stencil value stored in a multi-sample stencil buffer for the sample location; during a second processing pass of the graphics primitives: determining, by the graphics processing unit, if a sample location covered by a graphics primitive passes a z test and the stencil function, then updating, by the graphics processing unit, the stencil value to a first value when the sample location corresponds to an initial stencil value indicating that a graphics primitive that covers the sample location has not been processed during the second processing pass, or else discarding, by the graphics processing unit, the sample location for the graphics primitive when the sample location corresponds to the first value indicating that a graphics primitive that covers the sample location has been processed during the second processing pass; and accumulating, by the graphics processing unit, computed color values corresponding to each pixel into a color buffer that stores one color value for each pixel, wherein the computed color values are not stored in a multi-sample color buffer.