summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx/nvfx_draw.c
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-09-05 10:10:09 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-09-05 17:52:26 +0200
commitd46c5ce7b6a707b491a28345e3ee2adfce201632 (patch)
tree49bcdfa7790d50ec141e3b6c8dc42604fb3c8428 /src/gallium/drivers/nvfx/nvfx_draw.c
parent3bca263a92ab206d371e18ac65f6d36cadbc62a5 (diff)
nvfx: switch to rules-ng-ng register headers
This is the new register generation toolkit in use by nouveau. As far as I know, this is the best register description toolkit in existence, and you should use it too for your hardware :) Thanks to Marcin Kościelnicki for inventing it and performing invaluable reverse engineering work of nVidia chips.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_draw.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_draw.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_draw.c b/src/gallium/drivers/nvfx/nvfx_draw.c
index 4bf38a9c18..61f888a8ea 100644
--- a/src/gallium/drivers/nvfx/nvfx_draw.c
+++ b/src/gallium/drivers/nvfx/nvfx_draw.c
@@ -29,11 +29,11 @@ nvfx_render_flush(struct draw_stage *stage, unsigned flags)
struct nvfx_context *nvfx = rs->nvfx;
struct nouveau_channel *chan = nvfx->screen->base.channel;
- if (rs->prim != NV34TCL_VERTEX_BEGIN_END_STOP) {
+ if (rs->prim != NV30_3D_VERTEX_BEGIN_END_STOP) {
assert(AVAIL_RING(chan) >= 2);
- OUT_RING(chan, RING_3D(NV34TCL_VERTEX_BEGIN_END, 1));
- OUT_RING(chan, NV34TCL_VERTEX_BEGIN_END_STOP);
- rs->prim = NV34TCL_VERTEX_BEGIN_END_STOP;
+ OUT_RING(chan, RING_3D(NV30_3D_VERTEX_BEGIN_END, 1));
+ OUT_RING(chan, NV30_3D_VERTEX_BEGIN_END_STOP);
+ rs->prim = NV30_3D_VERTEX_BEGIN_END_STOP;
}
}
@@ -62,9 +62,9 @@ nvfx_render_prim(struct draw_stage *stage, struct prim_header *prim,
/* Switch primitive modes if necessary */
if (rs->prim != mode) {
- if (rs->prim != NV34TCL_VERTEX_BEGIN_END_STOP) {
- OUT_RING(chan, RING_3D(NV34TCL_VERTEX_BEGIN_END, 1));
- OUT_RING(chan, NV34TCL_VERTEX_BEGIN_END_STOP);
+ if (rs->prim != NV30_3D_VERTEX_BEGIN_END_STOP) {
+ OUT_RING(chan, RING_3D(NV30_3D_VERTEX_BEGIN_END, 1));
+ OUT_RING(chan, NV30_3D_VERTEX_BEGIN_END_STOP);
}
/* XXX: any command a lot of times seems to (mostly) fix corruption that would otherwise happen */
@@ -79,12 +79,12 @@ nvfx_render_prim(struct draw_stage *stage, struct prim_header *prim,
}
}
- OUT_RING(chan, RING_3D(NV34TCL_VERTEX_BEGIN_END, 1));
+ OUT_RING(chan, RING_3D(NV30_3D_VERTEX_BEGIN_END, 1));
OUT_RING (chan, mode);
rs->prim = mode;
}
- OUT_RING(chan, RING_3D_NI(NV34TCL_VERTEX_DATA, num_attribs * 4 * count));
+ OUT_RING(chan, RING_3D_NI(NV30_3D_VERTEX_DATA, num_attribs * 4 * count));
if(no_elements) {
OUT_RING(chan, 0);
OUT_RING(chan, 0);
@@ -107,19 +107,19 @@ nvfx_render_prim(struct draw_stage *stage, struct prim_header *prim,
static void
nvfx_render_point(struct draw_stage *draw, struct prim_header *prim)
{
- nvfx_render_prim(draw, prim, NV34TCL_VERTEX_BEGIN_END_POINTS, 1);
+ nvfx_render_prim(draw, prim, NV30_3D_VERTEX_BEGIN_END_POINTS, 1);
}
static void
nvfx_render_line(struct draw_stage *draw, struct prim_header *prim)
{
- nvfx_render_prim(draw, prim, NV34TCL_VERTEX_BEGIN_END_LINES, 2);
+ nvfx_render_prim(draw, prim, NV30_3D_VERTEX_BEGIN_END_LINES, 2);
}
static void
nvfx_render_tri(struct draw_stage *draw, struct prim_header *prim)
{
- nvfx_render_prim(draw, prim, NV34TCL_VERTEX_BEGIN_END_TRIANGLES, 3);
+ nvfx_render_prim(draw, prim, NV30_3D_VERTEX_BEGIN_END_TRIANGLES, 3);
}
static void