summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-11-22 02:46:45 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-11-22 02:46:45 +0000
commit0784c49c0f8fcc8b3abd4c9286d9fd8bc089dd7d (patch)
treea6394e3e264a0f80b57f4ce0f5d9526aa543d4b0 /lib/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h
parentd91d0007eecf589ea5699e34aa4d748fce2c57b2 (diff)
import Mesa 11.0.6
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h')
-rw-r--r--lib/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h b/lib/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h
new file mode 100644
index 000000000..282a52d1c
--- /dev/null
+++ b/lib/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h
@@ -0,0 +1,31 @@
+#define FUNC_VARS \
+ struct pt_so_emit *so, \
+ 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 = !so->draw->rasterizer->flatshade_first; \
+ do { \
+ switch (prim) { \
+ case PIPE_PRIM_LINES_ADJACENCY: \
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY: \
+ case PIPE_PRIM_TRIANGLES_ADJACENCY: \
+ case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY: \
+ debug_assert(!"unexpected primitive type in stream output"); \
+ return; \
+ default: \
+ break; \
+ } \
+ } while (0) \
+
+#define POINT(i0) so_point(so,i0)
+#define LINE(flags,i0,i1) so_line(so,i0,i1)
+#define TRIANGLE(flags,i0,i1,i2) so_tri(so,i0,i1,i2)
+
+#include "draw_decompose_tmp.h"