Mesa (gallium-0.2): util: add reduced prim helper
Keith Whitwell
keithw at kemper.freedesktop.org
Mon Jan 19 19:44:21 UTC 2009
Module: Mesa
Branch: gallium-0.2
Commit: bc0e00ad42ee651701ef1e211d36ee92acf18d6f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc0e00ad42ee651701ef1e211d36ee92acf18d6f
Author: Keith Whitwell <keithw at vmware.com>
Date: Mon Jan 19 19:43:21 2009 +0000
util: add reduced prim helper
---
src/gallium/auxiliary/util/u_prim.h | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h
index e45e84d..d7c3995 100644
--- a/src/gallium/auxiliary/util/u_prim.h
+++ b/src/gallium/auxiliary/util/u_prim.h
@@ -119,4 +119,20 @@ static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
}
+static INLINE boolean u_reduced_prim( unsigned pipe_prim )
+{
+ switch (pipe_prim) {
+ case PIPE_PRIM_POINTS:
+ return PIPE_PRIM_POINTS;
+
+ case PIPE_PRIM_LINES:
+ case PIPE_PRIM_LINE_STRIP:
+ case PIPE_PRIM_LINE_LOOP:
+ return PIPE_PRIM_LINES;
+
+ default:
+ return PIPE_PRIM_TRIANGLES;
+ }
+}
+
#endif
More information about the mesa-commit
mailing list