summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_so_emit_tmp.h
blob: 6d8937a0b41b99c289a3fee55a9b2cd1e4a2d02c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#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 */                                  \
   struct draw_context *draw = so->draw;                          \
   const unsigned prim = input_prims->prim;                       \
   const boolean last_vertex_last =                               \
      !(draw->rasterizer->flatshade &&                            \
        draw->rasterizer->flatshade_first);                       \
   do {                                                           \
      debug_assert(input_prims->primitive_count == 1);            \
      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"