diff options
author | Pekka Paalanen <pq@iki.fi> | 2008-11-30 20:40:55 +0200 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2008-11-30 20:40:55 +0200 |
commit | bb29d066dc5c5188bafadf7b702d44ed571e855e (patch) | |
tree | e6bb62fabdfea65ef6aa4992f12f0ae566b6c0da /src/gallium/drivers/nv20/nv20_prim_vbuf.c | |
parent | 830e4a6ec3fb70c830d0c59eae5edc827b546eae (diff) |
Nouveau: nv{10,20} set_primitive API fix
Also changes nvgl_primitive() to return zero, i.e. error, on unknown
primitive.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Diffstat (limited to 'src/gallium/drivers/nv20/nv20_prim_vbuf.c')
-rw-r--r-- | src/gallium/drivers/nv20/nv20_prim_vbuf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv20/nv20_prim_vbuf.c b/src/gallium/drivers/nv20/nv20_prim_vbuf.c index a040d89a46..fd9cad177a 100644 --- a/src/gallium/drivers/nv20/nv20_prim_vbuf.c +++ b/src/gallium/drivers/nv20/nv20_prim_vbuf.c @@ -146,12 +146,17 @@ nv20_vbuf_render_allocate_vertices( struct vbuf_render *render, return buf; } -static void +static boolean nv20_vbuf_render_set_primitive( struct vbuf_render *render, unsigned prim ) { struct nv20_vbuf_render *nv20_render = nv20_vbuf_render(render); - nv20_render->hwprim = nvgl_primitive(prim); + unsigned hwp = nvgl_primitive(prim); + if (hwp == 0) + return FALSE; + + nv20_render->hwprim = hwp; + return TRUE; } static uint32_t |