aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2013-08-08 15:44:10 -0400
committerZack Rusin <[email protected]>2013-08-08 20:54:25 -0400
commit662a4d4a120cb0a07023f00e3c5e4a0809428a53 (patch)
treead0d0a704411cdccb2a81ea0599209bb350f8077 /src/gallium/auxiliary/draw/draw_context.c
parent1d425c4c6df2affd3b36b98e28357c59f7f02f58 (diff)
draw: rewrite primitive assembler
We can't be injecting the primitive id's in the pipeline because by that time the primitives have already been decomposed. To properly number the primitives we need to handle the adjacency primitives by hand. This patch moves the prim id injection into the original primitive assembler and completely removes the useless pipeline stage. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 2dc6772e7fb..2d4843ebe25 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -40,6 +40,7 @@
#include "util/u_prim.h"
#include "draw_context.h"
#include "draw_pipe.h"
+#include "draw_prim_assembler.h"
#include "draw_vs.h"
#include "draw_gs.h"
@@ -95,6 +96,10 @@ draw_create_context(struct pipe_context *pipe, boolean try_llvm)
if (!draw_init(draw))
goto err_destroy;
+ draw->ia = draw_prim_assembler_create(draw);
+ if (!draw->ia)
+ goto err_destroy;
+
return draw;
err_destroy:
@@ -206,6 +211,7 @@ void draw_destroy( struct draw_context *draw )
draw->render->destroy( draw->render );
*/
+ draw_prim_assembler_destroy(draw->ia);
draw_pipeline_destroy( draw );
draw_pt_destroy( draw );
draw_vs_destroy( draw );
@@ -556,7 +562,7 @@ void
draw_prepare_shader_outputs(struct draw_context *draw)
{
draw_remove_extra_vertex_attribs(draw);
- draw_ia_prepare_outputs(draw, draw->pipeline.ia);
+ draw_prim_assembler_prepare_outputs(draw->ia);
draw_unfilled_prepare_outputs(draw, draw->pipeline.unfilled);
}