summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_gs_tmp.h
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2010-06-17 10:48:23 -0400
committerZack Rusin <zackr@vmware.com>2010-06-17 10:48:23 -0400
commitdc8f64c537a72d82c4c3d9e3bf6bf1e4a07c3b53 (patch)
treede49e20906b7ec0c0b86f0014d718b2edbf9f273 /src/gallium/auxiliary/draw/draw_gs_tmp.h
parent91862051f98e646647906bb15aec5c5d537f87e4 (diff)
draw: implement lines with adjacency in geometry shaders
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs_tmp.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs_tmp.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs_tmp.h b/src/gallium/auxiliary/draw/draw_gs_tmp.h
index 61ca347007..04f51a6b44 100644
--- a/src/gallium/auxiliary/draw/draw_gs_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_gs_tmp.h
@@ -95,10 +95,6 @@ static void FUNC( struct draw_geometry_shader *shader,
case PIPE_PRIM_POLYGON:
{
- /* These bitflags look a little odd because we submit the
- * vertices as (1,2,0) to satisfy flatshade requirements.
- */
-
for (i = 0; i+2 < count; i++) {
if (flatfirst) {
@@ -111,6 +107,12 @@ static void FUNC( struct draw_geometry_shader *shader,
}
break;
+ case PIPE_PRIM_LINES_ADJACENCY:
+ for (i = 0; i+3 < count; i += 4) {
+ LINE_ADJ( shader , i + 0 , i + 1, i + 2, i + 3 );
+ }
+ break;
+
default:
debug_assert(!"Unsupported primitive in geometry shader");
break;
@@ -121,4 +123,6 @@ static void FUNC( struct draw_geometry_shader *shader,
#undef TRIANGLE
#undef POINT
#undef LINE
+#undef LINE_ADJ
#undef FUNC
+#undef LOCAL_VARS