diff options
author | Brian Paul <brianp@vmware.com> | 2010-01-29 08:31:48 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-01-29 08:31:48 -0700 |
commit | 4886f677ecf121c863f8f65a846284ab9d26cbea (patch) | |
tree | 3c576e8f7187ed4960b2253b8661af6df793fd39 /src | |
parent | 7683271e63e4527fc72f309472181c743922e7e9 (diff) |
mesa: Warn when indices are out of bounds, but do not skip the draw in debug builds.
The driver (or preferably the hardware) should handle out of bounds
indices.
If there are problems then it's better to detect those in the debug
builds.
(cherry picked from commit e3257912e006120f6ab611e77005eed1a464030a)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index d6452cb664..392da43c5e 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -722,8 +722,7 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, #ifdef DEBUG /* 'end' was out of bounds, but now let's check the actual array - * indexes to see if any of them are out of bounds. If so, warn - * and skip the draw to avoid potential segfault, etc. + * indexes to see if any of them are out of bounds. */ { GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, @@ -740,7 +739,6 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, ctx->Array.ElementArrayBufferObj->Name, ctx->Array.ElementArrayBufferObj->Size); } - return; } /* XXX we could also find the min index and compare to 'start' * to see if start is correct. But it's more likely to get the |