A programmable geometry engine is described. One embodiment of the programmable
geometry engine includes a programmable primitive engine configured to receive
primitive commands that include information for processing vertex data using user-developed
programs or subroutines. The programmable primitive engine also is configured to
transmit program commands that include program pointers and data pointers. In addition,
the programmable geometry engine includes a processing engine configured to receive
the program commands. The processing engine is further configured to retrieve the
user-developed programs or subroutines using the program pointers and to retrieve
vertex data using the data pointers. Also, the processing engine is configured
to process the vertex data based on instructions included in the user-developed
programs or subroutines to produce processed vertex data and to transmit results
to the programmable primitive engine.