diff options
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_prim.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h index 507d12e8096..e4774442c81 100644 --- a/src/gallium/auxiliary/util/u_prim.h +++ b/src/gallium/auxiliary/util/u_prim.h @@ -213,6 +213,27 @@ u_decomposed_prims_for_vertices(int primitive, int vertices) } } +static INLINE unsigned +u_assembled_primitive(unsigned prim) +{ + switch (prim) { + case PIPE_PRIM_LINES_ADJACENCY: + return PIPE_PRIM_LINES; + case PIPE_PRIM_LINE_STRIP_ADJACENCY: + return PIPE_PRIM_LINES; + case PIPE_PRIM_TRIANGLES_ADJACENCY: + return PIPE_PRIM_TRIANGLES; + case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY: + return PIPE_PRIM_TRIANGLES; + default: + return prim; + } + + return prim; +} + + + const char *u_prim_name( unsigned pipe_prim ); #endif |