• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #define FUNC_VARS struct draw_geometry_shader *gs,             \
2                   const struct draw_prim_info *input_prims,    \
3                   const struct draw_vertex_info *input_verts,  \
4                   struct draw_prim_info *output_prims,         \
5                   struct draw_vertex_info *output_verts
6 
7 #define FUNC_ENTER                                                \
8    /* declare more local vars */                                  \
9    const unsigned prim = input_prims->prim;                       \
10    const unsigned prim_flags = input_prims->flags;                \
11    const unsigned count = input_prims->count;                     \
12    const boolean quads_flatshade_last = FALSE;                    \
13    const boolean last_vertex_last = !gs->draw->rasterizer->flatshade_first;  \
14    do {                                                           \
15       switch (prim) {                                             \
16       case PIPE_PRIM_QUADS:                                       \
17       case PIPE_PRIM_QUAD_STRIP:                                  \
18       case PIPE_PRIM_POLYGON:                                     \
19          debug_assert(!"unexpected primitive type in GS");        \
20          return;                                                  \
21       default:                                                    \
22          break;                                                   \
23       }                                                           \
24    } while (0)
25 
26 #define POINT(i0)                             gs_point(gs,i0)
27 #define LINE(flags,i0,i1)                     gs_line(gs,i0,i1)
28 #define TRIANGLE(flags,i0,i1,i2)              gs_tri(gs,i0,i1,i2)
29 #define LINE_ADJ(flags,i0,i1,i2,i3)           gs_line_adj(gs,i0,i1,i2,i3)
30 #define TRIANGLE_ADJ(flags,i0,i1,i2,i3,i4,i5) gs_tri_adj(gs,i0,i1,i2,i3,i4,i5)
31 
32 #include "draw_decompose_tmp.h"
33