vbo: Ignore PRIMITIVE_RESTART_FIXED_INDEX for glDrawArrays(). 91/6791/1
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 25 May 2013 15:19:40 +0000 (08:19 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 29 May 2013 21:21:51 +0000 (14:21 -0700)
commit37f278000c7a1a6d15eeeed4e52cdea3063c0a0f
tree9dc8b6ed4f623db25fa6f094147413a5440b678c
parent6220cc931f15ddb428ea481e8b9a70ce26ca3304
vbo: Ignore PRIMITIVE_RESTART_FIXED_INDEX for glDrawArrays().

The derived _PrimitiveRestart enable flag combines the PrimitiveRestart
and PrimitiveRestartFixedIndex enable flags.  However, DrawArrays is not
supposed to do FixedIndex restart:

From the OpenGL 4.3 Core specification, section 10.3.5 (page 302):
"If PRIMITIVE_RESTART_FIXED_INDEX is enabled, primitive restart is not
 performed for array elements transferred by any drawing command not
 taking a type parameter, including all of the *Draw* commands other
 than *DrawElements*."

The OpenGL ES 3.0 specification agrees by omission:
"When DrawElements, DrawElementsInstanced, or DrawRangeElements
 transfers a set of generic attribute array elements to the GL..."

Notably, DrawArrays is not included in the list of draw calls that
take PRIMITIVE_RESTART_FIXED_INDEX into consideration.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/vbo/vbo_exec_array.c