From d4ef0f6c67aefe06d8dd647acf8d9005df39a709 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 9 Jun 2010 11:13:34 -0400 Subject: geometry shaders: make gs work with changable primitives and variable number of vertices lots and lots of fixes for geometry shaders. in particular now we work when the gs emits a different primitive than the one the pipeline was started with and also we work when gs emits more vertices than would fit in the original buffer. --- src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c') diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c index f0fc591bf5..5483a25f1d 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c @@ -67,9 +67,9 @@ struct fetch_shade_emit { - static void fse_prepare( struct draw_pt_middle_end *middle, - unsigned prim, + unsigned in_prim, + unsigned out_prim, unsigned opt, unsigned *max_vertices ) { @@ -79,10 +79,10 @@ static void fse_prepare( struct draw_pt_middle_end *middle, const struct vertex_info *vinfo; unsigned i; unsigned nr_vbs = 0; - - if (!draw->render->set_primitive( draw->render, - prim )) { + + if (!draw->render->set_primitive( draw->render, + out_prim )) { assert(0); return; } @@ -90,7 +90,6 @@ static void fse_prepare( struct draw_pt_middle_end *middle, /* Must do this after set_primitive() above: */ fse->vinfo = vinfo = draw->render->get_vertex_info(draw->render); - fse->key.output_stride = vinfo->size * 4; -- cgit v1.2.3