[Mesa-dev] [PATCH] vbo: Implement new gs prim types in vbo_count_tessellated_primitives.

Paul Berry stereotype441 at gmail.com
Wed Aug 28 10:44:09 PDT 2013


---
 src/mesa/vbo/vbo_exec.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index 9c20bde..aa2c7b0 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -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;
-- 
1.8.4



More information about the mesa-dev mailing list