diff options
author | Zack Rusin <[email protected]> | 2010-06-01 12:47:23 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2010-06-08 06:28:11 -0400 |
commit | 2c22b8e61dc4adab658c6198feea30c006aa6c58 (patch) | |
tree | 7d418ff65d704472a58722b14ae0987b621b6efa /src/gallium/drivers/softpipe | |
parent | ba5975dd3274a3cc760e79dabaf9c11b96673f4a (diff) |
gallium: make draw auto work and add relevant caps and docs
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_prim_vbuf.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_screen.c | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c index db0d1755103..06691e83953 100644 --- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c +++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c @@ -542,6 +542,15 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) } } +static void +sp_vbuf_so_info(struct vbuf_render *vbr, uint buffer, uint vertices) +{ + struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); + struct softpipe_context *softpipe = cvbr->softpipe; + + softpipe->so_target.so_count[buffer] += vertices; +} + static void sp_vbuf_destroy(struct vbuf_render *vbr) @@ -575,6 +584,7 @@ sp_create_vbuf_backend(struct softpipe_context *sp) cvbr->base.draw_elements = sp_vbuf_draw_elements; cvbr->base.draw_arrays = sp_vbuf_draw_arrays; cvbr->base.release_vertices = sp_vbuf_release_vertices; + cvbr->base.set_stream_output_info = sp_vbuf_so_info; cvbr->base.destroy = sp_vbuf_destroy; cvbr->softpipe = sp; diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 8abe7f50e17..fc57d3eb611 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -115,6 +115,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: return 1; + case PIPE_CAP_STREAM_OUTPUT: + return 1; case PIPE_CAP_MAX_VS_INSTRUCTIONS: case PIPE_CAP_MAX_FS_INSTRUCTIONS: |