diff options
author | Zack Rusin <[email protected]> | 2013-08-03 02:56:19 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-08-03 02:57:40 -0400 |
commit | a9cb914f49fa3810b15eb9df9f6209a16fafa491 (patch) | |
tree | 44eaf8ce61385fa8aeb8f0b182e2b06d17b8eea1 /src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h | |
parent | c9c211fae194ac6bf50e0c579c8670590690dd6e (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h | 31 |
1 files changed, 31 insertions, 0 deletions
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" |