mesa: add PrimitiveRestartInSoftware to gl_context.Const
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 7 May 2012 22:39:31 +0000 (15:39 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 17 May 2012 17:54:26 +0000 (10:54 -0700)
If set, then the VBO module will handle all primitive
restart scenarios before calling the driver draw_prims.

Software primitive restart support is disabled by default.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/context.c
src/mesa/main/mtypes.h

index bafd250a15c27e532364b18f92b028253538300b..df0452cd1145ae6b103efc246c3b52dd4a380aed 100644 (file)
@@ -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_FALSE;
 }
 
 
index c306ac6b9e94fc3b496ab8effa7de9626907c2f5..aa1a8ef5fc479b72edb1725d1c8d00eb425a6969 100644 (file)
@@ -2845,6 +2845,11 @@ struct gl_constants
     */
    GLboolean GLSLSkipStrictMaxVaryingLimitCheck;
    GLboolean GLSLSkipStrictMaxUniformLimitCheck;
+
+   /**
+    * Force software support for primitive restart in the VBO module.
+    */
+   GLboolean PrimitiveRestartInSoftware;
 };