A device for sorting image data in a three-dimensional (3D) graphics pipeline, the 3D graphics pipeline generating a two-dimensional (2D) image from a plurality of geometry primitives, the device being operatively coupled to a previous stage of the graphics pipeline, and configured to receive the image data from the previous stage, the image data comprising spatial data, mode data, and control data, the spatial data comprising a plurality of vertices, each vertex being associated with at least one of the plurality of the geometry primitives, the device comprising:
- one or more first memories storing the image data;
- a second memory storing a plurality of first pointer lists, each first pointer list comprising first pointers, the first pointers each indicating the location of at least one of the geometry primitives in the first memory;
- a third memory storing at least one second pointer list, each second pointer list comprising second pointers, the second pointers each indicating the location of some of the mode data in the first memory;
- logic determining, for at least some of the geometry primitives, the tiles touched by the geometry primitives, the tiles each being associated with at least one of the first pointer lists;
- and,
- a write control coupled to the previous stage, the first memory, the second memory, and the third memory, the write control comprising:
- logic receiving the image data from the previous stage;
- logic writing the image data into the first memories;
- logic generating the first pointers and the second pointers;
- and
- logic writing the first pointers into the second memory and the second pointers into the third memory.