summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_prim_vbuf.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
index e7d0cb2b87..d940718ed2 100644
--- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c
+++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
@@ -101,11 +101,20 @@ sp_vbuf_release_vertices(struct vbuf_render *vbr, void *vertices,
}
-static void
+static boolean
sp_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim)
{
struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
- cvbr->prim = prim;
+ if (prim == PIPE_PRIM_TRIANGLES ||
+ prim == PIPE_PRIM_LINES ||
+ prim == PIPE_PRIM_POINTS) {
+ cvbr->prim = prim;
+ return TRUE;
+ }
+ else {
+ return FALSE;
+ }
+
}