diff options
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index ea199d3924d..eb0c226ed79 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -1505,6 +1505,23 @@ static inline unsigned si_get_total_colormask(struct si_context *sctx) return colormask; } +#define UTIL_ALL_PRIM_LINE_MODES ((1 << PIPE_PRIM_LINES) | \ + (1 << PIPE_PRIM_LINE_LOOP) | \ + (1 << PIPE_PRIM_LINE_STRIP) | \ + (1 << PIPE_PRIM_LINES_ADJACENCY) | \ + (1 << PIPE_PRIM_LINE_STRIP_ADJACENCY)) + +static inline bool util_prim_is_lines(unsigned prim) +{ + return ((1 << prim) & UTIL_ALL_PRIM_LINE_MODES) != 0; +} + +static inline bool util_prim_is_points_or_lines(unsigned prim) +{ + return ((1 << prim) & (UTIL_ALL_PRIM_LINE_MODES | + (1 << PIPE_PRIM_POINTS))) != 0; +} + /** * Return true if there is enough memory in VRAM and GTT for the buffers * added so far. |