diff options
author | Zack Rusin <zack@kde.org> | 2010-06-09 11:13:34 -0400 |
---|---|---|
committer | Zack Rusin <zack@kde.org> | 2010-06-09 11:13:34 -0400 |
commit | d4ef0f6c67aefe06d8dd647acf8d9005df39a709 (patch) | |
tree | 00ac70cad31762c1dbc4a99abcfa985e6fe77946 /src/gallium/auxiliary/draw/draw_pt_varray.c | |
parent | cec9955acc03d292c67815371415edc3fc3fc4b0 (diff) |
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.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_varray.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_varray.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_varray.c b/src/gallium/auxiliary/draw/draw_pt_varray.c index d0e16c9bc3..5ea833032f 100644 --- a/src/gallium/auxiliary/draw/draw_pt_varray.c +++ b/src/gallium/auxiliary/draw/draw_pt_varray.c @@ -136,7 +136,8 @@ static unsigned decompose_prim[PIPE_PRIM_POLYGON + 1] = { static void varray_prepare(struct draw_pt_front_end *frontend, - unsigned prim, + unsigned in_prim, + unsigned out_prim, struct draw_pt_middle_end *middle, unsigned opt) { @@ -144,11 +145,12 @@ static void varray_prepare(struct draw_pt_front_end *frontend, varray->base.run = varray_run; - varray->input_prim = prim; - varray->output_prim = decompose_prim[prim]; + varray->input_prim = in_prim; + varray->output_prim = decompose_prim[out_prim]; varray->middle = middle; - middle->prepare(middle, varray->output_prim, opt, &varray->driver_fetch_max ); + middle->prepare(middle, varray->input_prim, + varray->output_prim, opt, &varray->driver_fetch_max ); /* check that the max is even */ assert((varray->driver_fetch_max & 1) == 0); |