[Mesa-dev] [PATCH 2/8] mesa: add PrimitiveRestartInSoftware to gl_context.Const

Jordan Justen jordan.l.justen at intel.com
Fri May 11 08:15:52 PDT 2012


If set, then the VBO module will handle all primitive
restart scenarios before calling the any driver
vbo_draw_func.

It defaults to forcing software primitive restart support.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/main/context.c |    3 +++
 src/mesa/main/mtypes.h  |    5 +++++
 2 files changed, 8 insertions(+)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 7e2ac98..1be245d 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -662,6 +662,9 @@ _mesa_init_constants(struct gl_context *ctx)
 
    /* GL_ARB_robustness */
    ctx->Const.ResetStrategy = GL_NO_RESET_NOTIFICATION_ARB;
+
+   /* PrimitiveRestart */
+   ctx->Const.PrimitiveRestartInSoftware = GL_TRUE;
 }
 
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 06ca0d5..6e8ff03 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2845,6 +2845,11 @@ struct gl_constants
     */
    GLboolean GLSLSkipStrictMaxVaryingLimitCheck;
    GLboolean GLSLSkipStrictMaxUniformLimitCheck;
+
+   /**
+    * Force software support for primitive restart in the VBO module.
+    */
+   GLboolean PrimitiveRestartInSoftware;
 };
 
 
-- 
1.7.9.5



More information about the mesa-dev mailing list