mesa: Add primitive restart support to glArrayElement

When primitive restart is enabled, and glArrayElement is called
with the restart index value, then call glPrimitiveRestartNV.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul<brianp@vmware.com>
This commit is contained in:
Jordan Justen
2012-05-01 00:01:08 -07:00
parent 0ad0bc5af5
commit 5795d3b5ae
+9 -1
View File
@@ -1643,12 +1643,20 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt )
const struct _glapi_table * const disp = GET_DISPATCH();
GLboolean do_map;
/* If PrimitiveRestart is enabled and the index is the RestartIndex
* then we call PrimitiveRestartNV and return.
*/
if (ctx->Array.PrimitiveRestart && (elt == ctx->Array.RestartIndex)) {
CALL_PrimitiveRestartNV((struct _glapi_table *)disp, ());
return;
}
if (actx->NewState) {
assert(!actx->mapped_vbos);
_ae_update_state( ctx );
}
/* Determine if w need to map/unmap VBOs */
/* Determine if we need to map/unmap VBOs */
do_map = actx->nr_vbos && !actx->mapped_vbos;
if (do_map)