summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2013-08-08 15:44:10 -0400
committerZack Rusin <zackr@vmware.com>2013-08-08 20:54:25 -0400
commit662a4d4a120cb0a07023f00e3c5e4a0809428a53 (patch)
treead0d0a704411cdccb2a81ea0599209bb350f8077 /src/gallium/auxiliary/draw/draw_context.c
parent1d425c4c6df2affd3b36b98e28357c59f7f02f58 (diff)
downloadexternal_mesa3d-662a4d4a120cb0a07023f00e3c5e4a0809428a53.tar.gz
external_mesa3d-662a4d4a120cb0a07023f00e3c5e4a0809428a53.tar.bz2
external_mesa3d-662a4d4a120cb0a07023f00e3c5e4a0809428a53.zip
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 <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
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 2dc6772e7f..2d4843ebe2 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);
}