state_tracker: set PrimitiveRestartInSoftware if needed
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 7 May 2012 22:44:34 +0000 (15:44 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 17 May 2012 17:54:26 +0000 (10:54 -0700)
If the PIPE_CAP_PRIMITIVE_RESTART screen param is not set, then enable
PrimitiveRestartInSoftware to enable software primitive restart
support in the VBO module.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/state_tracker/st_extensions.c

index 1b4bca68138ed09b68d54e64551984d03e1c668c..d0f392be44a31e199c82576786663a49d46f1012 100644 (file)
@@ -602,6 +602,7 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.NV_primitive_restart = GL_TRUE;
    if (!screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART)) {
       st->sw_primitive_restart = GL_TRUE;
+      ctx->Const.PrimitiveRestartInSoftware = GL_TRUE;
    }
 
    if (screen->get_param(screen, PIPE_CAP_VERTEX_COLOR_UNCLAMPED)) {