diff options
author | Zack Rusin <zack@kde.org> | 2010-05-31 02:20:34 -0400 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2010-06-08 06:28:10 -0400 |
commit | c9db97c8229689060fab0edee7df717f804b99ce (patch) | |
tree | 377767cfb01881eb1fc29fb2ca23d80219bd7409 /src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c | |
parent | a45b7f47ee0e38b288cc8fc4f6a1c013e8c227bc (diff) |
gallium: a lot more complete implementation of stream output
interface wise we have everything needed by d3d10 and gl transform feedback.
the draw module misses implementation of some corner cases (e.g. when stream
output wants different number of components per output than normal rendering
paths)
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 | 28 |
1 files changed, 28 insertions, 0 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 da5106463a..0d15ba2642 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -40,6 +40,7 @@ struct fetch_pipeline_middle_end { struct draw_context *draw; struct pt_emit *emit; + struct pt_so_emit *so_emit; struct pt_fetch *fetch; struct pt_post_vs *post_vs; @@ -100,6 +101,8 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, (boolean)draw->rasterizer->gl_rasterization_rules, (draw->vs.edgeflag_output ? true : false) ); + draw_pt_so_emit_prepare( fpme->so_emit, prim ); + if (!(opt & PT_PIPELINE)) { draw_pt_emit_prepare( fpme->emit, prim, @@ -174,6 +177,12 @@ static void fetch_pipeline_run( struct draw_pt_middle_end *middle, fpme->vertex_size); } + /* stream output needs to be done before clipping */ + draw_pt_so_emit( fpme->so_emit, + (const float (*)[4])pipeline_verts->data, + fetch_count, + fpme->vertex_size ); + if (draw_pt_post_vs_run( fpme->post_vs, pipeline_verts, fetch_count, @@ -258,6 +267,12 @@ static void fetch_pipeline_linear_run( struct draw_pt_middle_end *middle, fpme->vertex_size); } + /* stream output needs to be done before clipping */ + draw_pt_so_emit( fpme->so_emit, + (const float (*)[4])pipeline_verts->data, + count, + fpme->vertex_size ); + if (draw_pt_post_vs_run( fpme->post_vs, pipeline_verts, count, @@ -336,6 +351,12 @@ static boolean fetch_pipeline_linear_run_elts( struct draw_pt_middle_end *middle fpme->vertex_size); } + /* stream output needs to be done before clipping */ + draw_pt_so_emit( fpme->so_emit, + (const float (*)[4])pipeline_verts->data, + count, + fpme->vertex_size ); + if (draw_pt_post_vs_run( fpme->post_vs, pipeline_verts, count, @@ -385,6 +406,9 @@ static void fetch_pipeline_destroy( struct draw_pt_middle_end *middle ) if (fpme->emit) draw_pt_emit_destroy( fpme->emit ); + if (fpme->so_emit) + draw_pt_so_emit_destroy( fpme->so_emit ); + if (fpme->post_vs) draw_pt_post_vs_destroy( fpme->post_vs ); @@ -419,6 +443,10 @@ struct draw_pt_middle_end *draw_pt_fetch_pipeline_or_emit( struct draw_context * if (!fpme->emit) goto fail; + fpme->so_emit = draw_pt_so_emit_create( draw ); + if (!fpme->so_emit) + goto fail; + return &fpme->base; fail: |