nv30, nv40: non-trivially unify nv[34]0_vertprog.c
authorLuca Barbieri <luca@luca-barbieri.com>
Sun, 21 Feb 2010 12:33:48 +0000 (13:33 +0100)
committerYounes Manton <younes.m@gmail.com>
Mon, 15 Mar 2010 04:03:03 +0000 (00:03 -0400)
commit840c36f5e6d940343a3154af7e76fec341ca46e6
tree36dbe9be2fc50eb7818f6e76aa8a3468a38456f7
parentc65a8f3ed2ab1650df38a3ed32d1e91e84b50520
nv30, nv40: non-trivially unify nv[34]0_vertprog.c

vertprog.c is similar but has substantial differences:
1. nv40 supports clip planes
2. nv40 uses a more advanced register allocator
3. Some register setup is different
4. Constants with the same name have different values

This patch unifies the two files.
nv30 gains clip plane support and the nv40 register allocator.

A new NVFX_VP(x) macro is introduced that at runtime resolved to
either the nv30 or the nv40 constant value.

nv30 clip planes are not tested and might not work
src/gallium/drivers/nv30/Makefile
src/gallium/drivers/nv30/nv30_context.h
src/gallium/drivers/nv30/nv30_vertprog.c [deleted file]
src/gallium/drivers/nv40/Makefile
src/gallium/drivers/nv40/nv40_context.h
src/gallium/drivers/nv40/nv40_vertprog.c [deleted file]
src/gallium/drivers/nvfx/Makefile
src/gallium/drivers/nvfx/nvfx_context.h
src/gallium/drivers/nvfx/nvfx_state.c
src/gallium/drivers/nvfx/nvfx_state_emit.c
src/gallium/drivers/nvfx/nvfx_vertprog.c [new file with mode: 0644]