From a9cb914f49fa3810b15eb9df9f6209a16fafa491 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Sat, 3 Aug 2013 02:56:19 -0400 Subject: draw: add back separate input assembler the issue is that stream output is run before the pipeline, which means that unless we decompose the primitives before the so then things crash. we could convert the entire stream output code into a pipeline stage but it will take a bit, so for now fix the crashes by simply re-adding the old input assembler which is run before the SO. Signed-off-by: Zack Rusin --- .../auxiliary/draw/draw_prim_assembler_tmp.h | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h (limited to 'src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h') diff --git a/src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h b/src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h new file mode 100644 index 00000000000..5bbacffa2a0 --- /dev/null +++ b/src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h @@ -0,0 +1,31 @@ +#define FUNC_VARS \ + struct draw_assembler *asmblr, \ + const struct draw_prim_info *input_prims, \ + const struct draw_vertex_info *input_verts, \ + unsigned start, \ + unsigned count + +#define FUNC_ENTER \ + /* declare more local vars */ \ + const unsigned prim = input_prims->prim; \ + const unsigned prim_flags = input_prims->flags; \ + const boolean quads_flatshade_last = FALSE; \ + const boolean last_vertex_last = !asmblr->draw->rasterizer->flatshade_first; \ + switch (prim) { \ + case PIPE_PRIM_QUADS: \ + case PIPE_PRIM_QUAD_STRIP: \ + case PIPE_PRIM_POLYGON: \ + debug_assert(!"unexpected primitive type in prim assembler"); \ + return; \ + default: \ + break; \ + } \ + + +#define POINT(i0) prim_point(asmblr, i0) +#define LINE(flags, i0, i1) prim_line(asmblr, i0, i1) +#define TRIANGLE(flags, i0, i1, i2) prim_tri(asmblr, i0, i1, i2) +#define LINE_ADJ(flags, i0, i1, i2, i3) prim_line_adj(asmblr, i0, i1, i2, i3) +#define TRIANGLE_ADJ(flags,i0,i1,i2,i3,i4,i5) prim_tri_adj(asmblr,i0,i1,i2,i3,i4,i5) + +#include "draw_decompose_tmp.h" -- cgit v1.2.3