diff options
author | Zack Rusin <[email protected]> | 2013-08-02 02:25:42 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-08-03 00:38:58 -0400 |
commit | c9c211fae194ac6bf50e0c579c8670590690dd6e (patch) | |
tree | 224e6f6d9fc6bc5979c5e9bc3bdd056a33458ed5 /src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c | |
parent | 8a94d15fbaf46caf1a25034acbbdbed33f46f911 (diff) |
draw: implement proper primitive assembler as a pipeline stage
we used to have a face primitive assembler that we ran after if
the gs was missing but we had adjacency primitives in the pipeline,
lets convert it to a pipeline stage, which allows us to use it
to inject outputs (primitive id) into the vertices. it's also
a lot cleaner because the decomposition is already handled for us.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index 8fcc17048d2..ffbd5482627 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -31,7 +31,6 @@ #include "draw/draw_context.h" #include "draw/draw_vbuf.h" #include "draw/draw_vertex.h" -#include "draw/draw_prim_assembler.h" #include "draw/draw_pt.h" #include "draw/draw_vs.h" #include "draw/draw_gs.h" @@ -223,8 +222,6 @@ static void fetch_pipeline_generic( struct draw_pt_middle_end *middle, struct draw_vertex_info vs_vert_info; struct draw_vertex_info gs_vert_info; struct draw_vertex_info *vert_info; - struct draw_prim_info ia_prim_info; - struct draw_vertex_info ia_vert_info; const struct draw_prim_info *prim_info = in_prim_info; boolean free_prim_info = FALSE; unsigned opt = fpme->opt; @@ -282,21 +279,10 @@ static void fetch_pipeline_generic( struct draw_pt_middle_end *middle, FREE(vert_info->verts); vert_info = &gs_vert_info; prim_info = &gs_prim_info; - } else { - if (draw_prim_assembler_is_required(draw, prim_info, vert_info)) { - draw_prim_assembler_run(draw, prim_info, vert_info, - &ia_prim_info, &ia_vert_info); - - if (ia_vert_info.count) { - FREE(vert_info->verts); - vert_info = &ia_vert_info; - prim_info = &ia_prim_info; - free_prim_info = TRUE; - } - } } + if (prim_info->count == 0) { - debug_printf("GS/IA didn't emit any vertices!\n"); + debug_printf("GS didn't emit any vertices!\n"); FREE(vert_info->verts); if (free_prim_info) { |