summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv10
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv10')
-rw-r--r--src/gallium/drivers/nv10/nv10_prim_vbuf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv10/nv10_prim_vbuf.c b/src/gallium/drivers/nv10/nv10_prim_vbuf.c
index 62a8f6d89da..e7e81d3dff8 100644
--- a/src/gallium/drivers/nv10/nv10_prim_vbuf.c
+++ b/src/gallium/drivers/nv10/nv10_prim_vbuf.c
@@ -121,12 +121,17 @@ nv10_vbuf_render_allocate_vertices( struct vbuf_render *render,
}
-static void
+static boolean
nv10_vbuf_render_set_primitive( struct vbuf_render *render,
unsigned prim )
{
struct nv10_vbuf_render *nv10_render = nv10_vbuf_render(render);
- nv10_render->hwprim = prim + 1;
+ unsigned hwp = nvgl_primitive(prim);
+ if (hwp == 0)
+ return FALSE;
+
+ nv10_render->hwprim = hwp;
+ return TRUE;
}