diff options
author | Zack Rusin <[email protected]> | 2010-06-15 08:05:51 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2010-06-15 09:12:20 -0400 |
commit | a192b5eeafae80f9f9e7e7e442abc5b44d583d1a (patch) | |
tree | dac505a2bd9ee02cfc5d163c81a0587a7989625f /src/gallium/auxiliary/draw/draw_gs_tmp.h | |
parent | 92e521a79982f19279f72c34772d33c9c28e2bed (diff) |
draw: finish the new pipeline setup
Keith came up with a new way of running the pipeline which involves passing
a few info structs around (for fetch, vertices and prims) and allows us
to correctly handle cases where we endup with multiple primitives generated
by the pipeline itself.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs_tmp.h')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_gs_tmp.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs_tmp.h b/src/gallium/auxiliary/draw/draw_gs_tmp.h index eb4a313ca18..ded1c6012eb 100644 --- a/src/gallium/auxiliary/draw/draw_gs_tmp.h +++ b/src/gallium/auxiliary/draw/draw_gs_tmp.h @@ -1,18 +1,22 @@ static void FUNC( struct draw_geometry_shader *shader, - unsigned pipe_prim, - unsigned count ) + const struct draw_prim_info *input_prims, + const struct draw_vertex_info *input_verts, + struct draw_prim_info *output_prims, + struct draw_vertex_info *output_verts) { struct draw_context *draw = shader->draw; boolean flatfirst = (draw->rasterizer->flatshade && draw->rasterizer->flatshade_first); unsigned i; + unsigned count = input_prims->count; if (0) debug_printf("%s %d\n", __FUNCTION__, count); + debug_assert(input_prims->primitive_count == 1); - switch (pipe_prim) { + switch (input_prims->prim) { case PIPE_PRIM_POINTS: for (i = 0; i < count; i++) { POINT( shader, i + 0 ); @@ -93,16 +97,6 @@ static void FUNC( struct draw_geometry_shader *shader, /* These bitflags look a little odd because we submit the * vertices as (1,2,0) to satisfy flatshade requirements. */ - ushort edge_next, edge_finish; - - if (flatfirst) { - edge_next = DRAW_PIPE_EDGE_FLAG_2; - edge_finish = DRAW_PIPE_EDGE_FLAG_0; - } - else { - edge_next = DRAW_PIPE_EDGE_FLAG_0; - edge_finish = DRAW_PIPE_EDGE_FLAG_1; - } for (i = 0; i+2 < count; i++) { @@ -117,7 +111,7 @@ static void FUNC( struct draw_geometry_shader *shader, break; default: - assert(0); + debug_assert(!"Unsupported primitive in geometry shader"); break; } } |