nv50: move nv50_prim() into a header file rather than duplicating