diff options
author | Ian Romanick <[email protected]> | 2012-08-10 22:28:27 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-01-11 10:57:25 -0800 |
commit | 42ed81a7c3eec215a543c47239cc30536f284ada (patch) | |
tree | 0f71500ae3bf3a99f98f2481670a88124feb399e /src/mesa/main/attrib.c | |
parent | 00d8ad81ffeda1d2a10b1ee65f4a144467d0afd1 (diff) |
mesa/es3: Add support for GL_PRIMITIVE_RESTART_FIXED_INDEX
This requires some derived state. The cut vertex used is either the
value specified by glPrimitiveRestartIndex or it's hard-coded to ~0.
The derived state gl_array_attrib::_RestartIndex captures this value.
In addition, the derived state gl_array_attrib::_PrimitiveRestart is set
whenever either gl_array_attrib::PrimitiveRestart or
gl_array_attrib::PrimitiveRestartFixedIndex is set.
v2: Use _mesa_is_gles3.
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r-- | src/mesa/main/attrib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index a19d610545d..d6f298d93c6 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1377,7 +1377,10 @@ copy_array_attrib(struct gl_context *ctx, dest->LockFirst = src->LockFirst; dest->LockCount = src->LockCount; dest->PrimitiveRestart = src->PrimitiveRestart; + dest->PrimitiveRestartFixedIndex = src->PrimitiveRestartFixedIndex; + dest->_PrimitiveRestart = src->_PrimitiveRestart; dest->RestartIndex = src->RestartIndex; + dest->_RestartIndex = src->_RestartIndex; /* skip NewState */ /* skip RebindArrays */ |