projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba3a879
)
util: add reduced prim helper
author
Keith Whitwell
<keithw@vmware.com>
Mon, 19 Jan 2009 19:43:21 +0000
(19:43 +0000)
committer
Keith Whitwell
<keithw@vmware.com>
Mon, 19 Jan 2009 19:44:12 +0000
(19:44 +0000)
src/gallium/auxiliary/util/u_prim.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_prim.h
b/src/gallium/auxiliary/util/u_prim.h
index e45e84ded2cc42a7fcf091f1343d0f55855f6f72..d7c3995dbf053f940c44718a9e2dc9d8309d8b34 100644
(file)
--- 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