st/mesa: set vertices_per_patch when drawing
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 21 Jul 2014 22:49:40 +0000 (18:49 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 22 Jul 2015 22:59:30 +0000 (00:59 +0200)
src/mesa/state_tracker/st_draw.c

index 8b43582c14b4fcb6b8f1b9ef0047cbee5ea6a14d..66b2f832933c505a0c13feebfb02d1a1a2e0d826 100644 (file)
@@ -164,6 +164,7 @@ translate_prim(const struct gl_context *ctx, unsigned prim)
    STATIC_ASSERT(GL_POINTS == PIPE_PRIM_POINTS);
    STATIC_ASSERT(GL_QUADS == PIPE_PRIM_QUADS);
    STATIC_ASSERT(GL_TRIANGLE_STRIP_ADJACENCY == PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY);
+   STATIC_ASSERT(GL_PATCHES == PIPE_PRIM_PATCHES);
 
    return prim;
 }
@@ -260,6 +261,7 @@ st_draw_vbo(struct gl_context *ctx,
       info.count = prims[i].count;
       info.start_instance = prims[i].base_instance;
       info.instance_count = prims[i].num_instances;
+      info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices;
       info.index_bias = prims[i].basevertex;
       if (!ib) {
          info.min_index = info.start;