summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-03-17 10:10:45 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2008-03-17 10:10:45 +0000
commit9425a702bef7d3f601e9ddc2b801f00a3d52dbb8 (patch)
tree605095d5b4699b0b8c9ae66c8001f6e60ccd20aa /src/gallium/drivers/softpipe
parent49a687882a659bd03fd09ca7a7d592818914597a (diff)
gallium: improvements, or extensions at least, to the passthrough path
Passthrough is actually more tricky than you'd think...
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;
+ }
+
}