summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx/nv30_vertprog.h
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-08-23 00:31:08 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-08-23 15:09:22 +0200
commitbfaa2577c6474222c79341c0d90685ed579f3414 (patch)
tree312af7416223bf2587c17e02806c9ae64a7a533c /src/gallium/drivers/nvfx/nv30_vertprog.h
parenteb430b0e948caf02b9f4095d0e1435880073c2aa (diff)
nvfx: support clip planes sensibly and fix them on nv30
Before, we were discarding the compiled vertex program on each vertex program change. Now we compile the program as if there were 6 clip planes and dynamically patch in an "end program" bit at the right place. Also, nv30 should now work.
Diffstat (limited to 'src/gallium/drivers/nvfx/nv30_vertprog.h')
-rw-r--r--src/gallium/drivers/nvfx/nv30_vertprog.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvfx/nv30_vertprog.h b/src/gallium/drivers/nvfx/nv30_vertprog.h
index df92469078..9a68f5c1fb 100644
--- a/src/gallium/drivers/nvfx/nv30_vertprog.h
+++ b/src/gallium/drivers/nvfx/nv30_vertprog.h
@@ -125,7 +125,7 @@
#define NV30_VP_INST_VDEST_WRITEMASK_SHIFT 12 /*NV20*/
#define NV30_VP_INST_VDEST_WRITEMASK_MASK (0x0F << 12) /*NV20*/
#define NV30_VP_INST_DEST_SHIFT 2
-#define NV30_VP_INST_DEST_MASK (0x0F << 2)
+#define NV30_VP_INST_DEST_MASK (0x1F << 2)
# define NV30_VP_INST_DEST_POS 0
# define NV30_VP_INST_DEST_BFC0 1
# define NV30_VP_INST_DEST_BFC1 2
@@ -133,7 +133,8 @@
# define NV30_VP_INST_DEST_COL1 4
# define NV30_VP_INST_DEST_FOGC 5
# define NV30_VP_INST_DEST_PSZ 6
-# define NV30_VP_INST_DEST_TC(n) (8+n)
+# define NV30_VP_INST_DEST_TC(n) (8+(n))
+# define NV30_VP_INST_DEST_CLP(n) (17 + (n))
/* Useful to split the source selection regs into their pieces */
#define NV30_VP_SRC0_HIGH_SHIFT 6