st/mesa: Add support for GL_ARB_base_instance
authorFredrik Höglund <fredrik@kde.org>
Mon, 18 Jun 2012 20:50:03 +0000 (22:50 +0200)
committerBrian Paul <brianp@vmware.com>
Tue, 19 Jun 2012 13:57:22 +0000 (07:57 -0600)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_draw.c
src/mesa/state_tracker/st_extensions.c

index db8caa566a2e0728a068cf4b46bebeef4abb4663..4dc09e7fb5cff0a6f8a1e407cb960813aab4bef9 100644 (file)
@@ -246,6 +246,7 @@ st_draw_vbo(struct gl_context *ctx,
       info.mode = translate_prim( ctx, prims[i].mode );
       info.start = prims[i].start;
       info.count = prims[i].count;
+      info.start_instance = prims[i].base_instance;
       info.instance_count = prims[i].num_instances;
       info.index_bias = prims[i].basevertex;
       if (!ib) {
index a9071f58c5a9f6bffb9e8f33496731699da535a9..17f271f02c1693d7bb7f784678f76340e4ee6f18 100644 (file)
@@ -337,6 +337,7 @@ void st_init_extensions(struct st_context *st)
    GLboolean *extensions = (GLboolean *) &ctx->Extensions;
 
    static const struct st_extension_cap_mapping cap_mapping[] = {
+      { o(ARB_base_instance),                PIPE_CAP_START_INSTANCE                   },
       { o(ARB_depth_clamp),                  PIPE_CAP_DEPTH_CLIP_DISABLE               },
       { o(ARB_depth_texture),                PIPE_CAP_TEXTURE_SHADOW_MAP               },
       { o(ARB_draw_buffers_blend),           PIPE_CAP_INDEP_BLEND_FUNC                 },