vbo: Implement new gs prim types in vbo_count_tessellated_primitives.
authorPaul Berry <stereotype441@gmail.com>
Wed, 28 Aug 2013 03:51:31 +0000 (20:51 -0700)
committerPaul Berry <stereotype441@gmail.com>
Mon, 9 Sep 2013 16:34:46 +0000 (09:34 -0700)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/vbo/vbo_exec.c

index 9c20bdef296a558ee973501b08ffb346679caec1..aa2c7b07bbd3320bc631fcc58acd9cf3a15c4331 100644 (file)
@@ -149,6 +149,18 @@ vbo_count_tessellated_primitives(GLenum mode, GLuint count,
    case GL_QUADS:
       num_primitives = (count / 4) * 2;
       break;
+   case GL_LINES_ADJACENCY:
+      num_primitives = count / 4;
+      break;
+   case GL_LINE_STRIP_ADJACENCY:
+      num_primitives = count >= 4 ? count - 3 : 0;
+      break;
+   case GL_TRIANGLES_ADJACENCY:
+      num_primitives = count / 6;
+      break;
+   case GL_TRIANGLE_STRIP_ADJACENCY:
+      num_primitives = count >= 6 ? (count - 4) / 2 : 0;
+      break;
    default:
       assert(!"Unexpected primitive type in count_tessellated_primitives");
       num_primitives = 0;