From: Brian Paul Date: Fri, 22 Oct 2010 01:03:38 +0000 (-0600) Subject: st/mesa: support for primitive restart X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=053875a8b193481a7b1c209d9adf9d3d85788884;p=mesa.git st/mesa: support for primitive restart --- diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index f6f5bb17938..5387499eb94 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -703,6 +703,9 @@ st_draw_vbo(struct gl_context *ctx, } } + info.primitive_restart = st->ctx->Array.PrimitiveRestart; + info.restart_index = st->ctx->Array.RestartIndex; + /* do actual drawing */ for (i = 0; i < nr_prims; i++) { info.mode = translate_prim( ctx, prims[i].mode ); diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 96e4efcafad..2720f446450 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -432,6 +432,10 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.ARB_geometry_shader4 = GL_TRUE; } + if (screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART)) { + ctx->Extensions.NV_primitive_restart = GL_TRUE; + } + if (screen->get_param(screen, PIPE_CAP_DEPTH_CLAMP)) { ctx->Extensions.ARB_depth_clamp = GL_TRUE; }