mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
vbo: added comment about max array index
This commit is contained in:
parent
9a3333f436
commit
94a020cfe6
1 changed files with 6 additions and 0 deletions
|
|
@ -678,6 +678,12 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode,
|
|||
type, indices, basevertex ))
|
||||
return;
|
||||
|
||||
/* NOTE: It's important that 'end' is a reasonable value.
|
||||
* in _tnl_draw_prims(), we use end to determine how many vertices
|
||||
* to transform. If it's too large, we can unnecessarily split prims
|
||||
* or we can read/write out of memory in several different places!
|
||||
*/
|
||||
|
||||
if (end >= ctx->Array.ArrayObj->_MaxElement) {
|
||||
/* the max element is out of bounds of one or more enabled arrays */
|
||||
_mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, "
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue